HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Drawable2D.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef HOM_Drawable2D_h
10 #define HOM_Drawable2D_h
11 
12 #include "HOM_API.h"
13 #include "HOM_Color.h"
14 #include "HOM_Drawable.h"
15 #include "HOM_EnumModules.h"
16 #include "HOM_Vector2.h"
17 #include "HOM_Vector4.h"
18 
19 SWIGOUT(%rename(Drawable2D) HOM_Drawable2D;)
20 SWIGOUT(%feature("notabstract") HOM_Drawable2D;)
21 
22 class HOM_EnumValue;
23 class HOM_Vector2;
24 class HOM_ImageLayer;
25 
26 class HOM_API HOM_Drawable2D : virtual public HOM_Drawable
27 {
28 public:
29  typedef int64 DrawH;
30  typedef std::map<std::string, hboost::any> Params;
31 
32 #ifdef SWIG
33 %extend
34 {
35  %kwargs HOM_Drawable2D;
36  HOM_Drawable2D(
37  HOM_PaneTab& hpanetab,
38  HOM_EnumValue const & type,
39  std::string const & name = std::string(),
40  std::string const & label = std::string(),
41  bool pickable = true,
42  bool fixed_size = false,
43  Params const & params = Params())
44  {
45  return HOM().newDrawable2D(hpanetab, type, name, label, pickable, fixed_size, params);
46  }
47 }
48 #else
50  { HOM_CONSTRUCT_OBJECT(this) }
51 #endif
52 
53  ~HOM_Drawable2D() override
54  { HOM_DESTRUCT_OBJECT(this) }
55 
56  virtual std::string __repr__() = 0;
57 
58  virtual void setParams(Params const & params) = 0;
59  virtual Params params() const = 0;
60 
61  SWIGOUT(%kwargs draw;)
62  virtual void draw(DrawH handle, Params const & params = Params()) = 0;
63 
64  SWIGOUT(%warnfilter(321) type;)
65  virtual HOM_EnumValue& type() const = 0;
66 
67  virtual void setPickable(bool value) = 0;
68  virtual bool isPickable() const = 0;
69 
70  virtual void setFixedSize(bool value) = 0;
71  virtual bool isFixedSize() const = 0;
72  virtual double fixedSizeScale() const = 0;
73 
74  virtual HOM_Vector3* mapToModel(float x, float y, float z=0) = 0;
75 
76  virtual HOM_Vector3 postScale() const = 0;
77  virtual HOM_Matrix4 postTransform() const = 0;
78  virtual HOM_Matrix4 drawTransform() const = 0;
79  virtual HOM_Matrix4 layerTransform() const = 0;
80  virtual void postMulTransform(HOM_Matrix4 const & xform) = 0;
81  virtual void preMulTransform(HOM_Matrix4 const & xform) = 0;
82 
83  SWIGOUT(%newobject imageLayer;)
84  virtual HOM_ImageLayer *imageLayer() const = 0;
85  virtual void setImageLayer(HOM_ImageLayer* hom_layer) = 0;
86 };
87 
88 #endif // HOM_Drawable2D_h
89 
type
Definition: core.h:556
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1398
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
GLsizei const GLfloat * value
Definition: glcorearb.h:824
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:848
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:312
GLint y
Definition: glcorearb.h:103
GLenum const GLfloat * params
Definition: glcorearb.h:105
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:108
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1397
long long int64
Definition: SYS_Types.h:116
GLuint const GLchar * name
Definition: glcorearb.h:786
GLint GLenum GLint x
Definition: glcorearb.h:409
virtual HOM_Drawable2D * newDrawable2D(HOM_PaneTab &hpanetab, HOM_EnumValue const &type, std::string const &name, std::string const &label, bool pickable, bool fixed_size, std::map< std::string, hboost::any > const &params)=0
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
GU_API void xform(CE_Context &context, bool recompile, int npts, const cl::Buffer &outPos, const cl::Buffer &inPos, const cl::Buffer &surfacexform, const cl::Buffer *grp=nullptr)
std::map< std::string, hboost::any > Params
HOM_API HOM_Module & HOM()
~HOM_Drawable2D() override