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_Vector4.h"
17 
18 SWIGOUT(%rename(Drawable2D) HOM_Drawable2D;)
19 SWIGOUT(%feature("notabstract") HOM_Drawable2D;)
20 
21 class HOM_EnumValue;
22 class HOM_Vector2;
23 
24 class HOM_API HOM_Drawable2D : virtual public HOM_Drawable
25 {
26 public:
27  typedef int64 DrawH;
28  typedef std::map<std::string, hboost::any> Params;
29 
30 #ifdef SWIG
31 %extend
32 {
33  %kwargs HOM_Drawable2D;
34  HOM_Drawable2D(
35  HOM_PaneTab& hpanetab,
36  HOM_EnumValue const & type,
37  std::string const & name = std::string(),
38  std::string const & label = std::string(),
39  bool pickable = true,
40  Params const & params = Params())
41  {
42  return HOM().newDrawable2D(hpanetab, type, name, label, pickable, params);
43  }
44 }
45 #else
47  { HOM_CONSTRUCT_OBJECT(this) }
48 #endif
49 
50  ~HOM_Drawable2D() override
51  { HOM_DESTRUCT_OBJECT(this) }
52 
53  virtual std::string __repr__() = 0;
54 
55  virtual void setParams(Params const & params) = 0;
56  virtual Params params() const = 0;
57 
58  SWIGOUT(%kwargs draw;)
59  virtual void draw(DrawH handle, Params const & params = Params()) = 0;
60 
61  SWIGOUT(%warnfilter(321) type;)
62  virtual HOM_EnumValue& type() const = 0;
63 
64  virtual void setPickable(bool value) = 0;
65  virtual bool isPickable() const = 0;
66 
67  virtual HOM_Vector3* mapToModel(float x, float y, float z=0) = 0;
68 };
69 
70 #endif // HOM_Drawable2D_h
71 
type
Definition: core.h:556
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1343
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:1342
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, std::map< std::string, hboost::any > const &params)=0
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
std::map< std::string, hboost::any > Params
HOM_API HOM_Module & HOM()
~HOM_Drawable2D() override