HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Point.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_Point_h__
10 #define __HOM_Point_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_Vector3.h"
16 #include "HOM_PtrOrNull.h"
17 #include <vector>
18 
19 class HOM_Geometry;
20 class HOM_Attrib;
21 
22 SWIGOUT(%rename(Point) HOM_Point;)
23 
25 {
26 public:
28  { HOM_CONSTRUCT_OBJECT(this) }
30  { HOM_CONSTRUCT_OBJECT(this) }
31  virtual ~HOM_Point()
32  { HOM_DESTRUCT_OBJECT(this) }
33 
34  virtual bool operator==(HOM_PtrOrNull<HOM_Point> point) = 0;
35 
36  virtual bool operator!=(HOM_PtrOrNull<HOM_Point> point) = 0;
37 
38 
39  virtual int __hash__() = 0;
40  virtual std::string __repr__() = 0;
41 
42  SWIGOUT(%newobject geometry;)
43  virtual HOM_Geometry *geometry() = 0;
44 
45  virtual int number() = 0;
46 
47 
48  SWIGOUT(%newobject position;)
49  virtual HOM_Vector3 *position() = 0;
50  virtual void setPosition(const std::vector<double> &position) = 0;
51 
52  virtual double weight() = 0;
53  virtual void setWeight(double weight) = 0;
54 
55 
56  virtual HOM_EnumValue& attribType() = 0;
57 
58 
59  virtual double floatAttribValue(const char *name) = 0;
60 
61  virtual double floatAttribValue(HOM_Attrib &attrib) = 0;
62 
63  virtual std::vector<double> floatListAttribValue(const char *name) = 0;
64 
65  virtual std::vector<double> floatListAttribValue(HOM_Attrib &attrib) = 0;
66 
67  virtual int64 intAttribValue(const char *name) = 0;
68 
69  virtual int64 intAttribValue(HOM_Attrib &attrib) = 0;
70 
71  virtual std::vector<int64> intListAttribValue(const char *name) = 0;
72 
73  virtual std::vector<int64> intListAttribValue(HOM_Attrib &attrib) = 0;
74 
75  virtual std::string stringAttribValue(const char *name) = 0;
76 
77  virtual std::string stringAttribValue(HOM_Attrib &attrib) = 0;
78 
79  virtual std::vector<std::string> stringListAttribValue(const char *name) = 0;
80 
81  virtual std::vector<std::string> stringListAttribValue(HOM_Attrib &attrib) = 0;
82  virtual std::map<std::string,hboost::any> dictAttribValue(const char *name) = 0;
83  virtual std::map<std::string,hboost::any> dictAttribValue(HOM_Attrib &name) = 0;
84  virtual std::vector<std::map<std::string,hboost::any> > dictListAttribValue(const char *name) = 0;
85  virtual std::vector<std::map<std::string,hboost::any> > dictListAttribValue(HOM_Attrib &name) = 0;
86 
87 
88  virtual void setAttribValue(
89  HOM_Attrib &attrib, int64 attrib_value) = 0;
90  virtual void setAttribValue(
91  HOM_Attrib &attrib, double attrib_value) = 0;
92  virtual void setAttribValue(
93  HOM_Attrib &attrib, const char *attrib_value) = 0;
94  virtual void setAttribValue(
95  HOM_Attrib &attrib, const std::vector<int64> &attrib_value) = 0;
96  virtual void setAttribValue(
97  HOM_Attrib &attrib, const std::vector<double> &attrib_value) = 0;
98  virtual void setAttribValue(
99  HOM_Attrib &attrib, const std::vector<std::string> &attrib_value) = 0;
100  virtual void setAttribValue(
101  HOM_Attrib &attrib, const std::map<std::string, hboost::any> &attrib_value) = 0;
102  virtual void setAttribValue(
103  HOM_Attrib &attrib, const std::vector<std::map<std::string,hboost::any> > &attrib_value) = 0;
104 
105  virtual void setAttribValue(
106  const char *attrib_name, int64 attrib_value) = 0;
107  virtual void setAttribValue(
108  const char *attrib_name, double attrib_value) = 0;
109  virtual void setAttribValue(
110  const char *attrib_name, const char *attrib_value) = 0;
111  // Note that, because of strangess the with way swig works when deciding
112  // which overloaded method to call, it's very important that we list the
113  // vector of ints before the vector of floats. Otherwise, swig will call
114  // the float version when you pass in a vector of ints.
115  // It isn't that simple, the order is important but also depends on
116  // everything else in the override, so you may have to switch these
117  // until SWIG generates the right code...
118  virtual void setAttribValue(
119  const char *attrib_name, const std::vector<int64> &attrib_value) = 0;
120  virtual void setAttribValue(
121  const char *attrib_name, const std::vector<double> &attrib_value) = 0;
122  virtual void setAttribValue(
123  const char *attrib_name,
124  const std::vector<std::string> &attrib_value) = 0;
125  virtual void setAttribValue(
126  const char *attrib_name,
127  const std::map<std::string, hboost::any> &attrib_value) = 0;
128  virtual void setAttribValue(
129  const char *attrib_name,
130  const std::vector<std::map<std::string,hboost::any> > &attrib_value) = 0;
131 
132  SWIGOUT(%newobject _getPointParent;)
133  virtual HOM_Point *_getPointParent() = 0;
134 
135  SWIGOUT(%newobject _getPointTransform;)
136  virtual HOM_Matrix4 *_getPointTransform() = 0;
137 
138  virtual void _attribInfo( const char *name, int &attr_data_type, int &attr_size, bool &is_array_type) = 0;
139 
140 #ifdef SWIG
141 %extend
142 {
143  InterpreterObject attribValue(const char *name)
144  { return HOMattribValue(*self, name); }
145 
146  InterpreterObject attribValue(HOM_Attrib &attrib)
147  { return HOMattribValue(*self, attrib); }
148 }
149 #endif
150 
151  virtual std::vector<HOM_ElemPtr<HOM_Vertex> > vertices() = 0;
152  virtual std::vector<HOM_ElemPtr<HOM_Prim> > prims() = 0;
153 };
154 
155 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1291
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:352
virtual HOM_Geometry * geometry()=0
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1290
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:556
long long int64
Definition: SYS_Types.h:116
virtual ~HOM_Point()
Definition: HOM_Point.h:31
GLuint const GLchar * name
Definition: glcorearb.h:786
HOM_Point()
Definition: HOM_Point.h:27
virtual int __hash__()=0
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
SIM_API const UT_StringHolder position
HOM_Point(const HOM_Point &)
Definition: HOM_Point.h:29
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:542