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