HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_Prim.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_Prim_h__
10 #define __HOM_Prim_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_BoundingBox.h"
16 #include "HOM_Vertex.h"
17 #include "HOM_IterableList.h"
18 #include "HOM_PtrOrNull.h"
19 #include <vector>
20 #include <hboost/tuple/tuple.hpp>
21 class HOM_EnumValue;
22 class HOM_Geometry;
23 class HOM_PrimGroup;
24 class HOM_Edge;
25 class HOM_Vector3;
26 
27 SWIGOUT(%rename(Prim) HOM_Prim;)
28 
30 {
31 public:
33  { HOM_CONSTRUCT_OBJECT(this) }
34  HOM_Prim(const HOM_Prim &)
35  { HOM_CONSTRUCT_OBJECT(this) }
36  virtual ~HOM_Prim()
37  { HOM_DESTRUCT_OBJECT(this) }
38 
39  virtual bool operator==(HOM_PtrOrNull<HOM_Prim> prim) = 0;
40  virtual bool operator!=(HOM_PtrOrNull<HOM_Prim> prim) = 0;
41 
42  virtual int __hash__() = 0;
43  virtual std::string __repr__() = 0;
44 
45  SWIGOUT(%newobject geometry;)
46  virtual HOM_Geometry *geometry() = 0;
47 
48  virtual int number() = 0;
49 
50  virtual HOM_EnumValue &type() = 0;
51  virtual HOM_EnumValue &attribType() = 0;
52 
53 
54  SWIGOUT(%newobject vertices;)
55  virtual HOM_IterableList<HOM_Vertex> *vertices() = 0;
56 
57  virtual int numVertices() = 0;
58 
59 
60  virtual std::vector<HOM_ElemPtr<HOM_Edge> > edges() = 0;
61 
62  virtual int numEdges() = 0;
63 
64  virtual double floatAttribValue(const char *name) = 0;
65 
66  virtual double floatAttribValue(HOM_Attrib &attrib) = 0;
67 
68  virtual std::vector<double> floatListAttribValue(const char *name) = 0;
69 
70  virtual std::vector<double> floatListAttribValue(HOM_Attrib &attrib) = 0;
71 
72  virtual int64 intAttribValue(const char *name) = 0;
73 
74  virtual int64 intAttribValue(HOM_Attrib &attrib) = 0;
75 
76  virtual std::vector<int64> intListAttribValue(const char *name) = 0;
77 
78  virtual std::vector<int64> intListAttribValue(HOM_Attrib &attrib) = 0;
79 
80  virtual std::string stringAttribValue(const char *name) = 0;
81 
82  virtual std::string stringAttribValue(HOM_Attrib &attrib) = 0;
83 
84  virtual std::vector<std::string> stringListAttribValue(const char *name) = 0;
85 
86  virtual std::vector<std::string> stringListAttribValue(HOM_Attrib &attrib) = 0;
87 
88 
89  virtual void setAttribValue(
90  HOM_Attrib &attrib, int64 attrib_value) = 0;
91  virtual void setAttribValue(
92  HOM_Attrib &attrib, double attrib_value) = 0;
93  virtual void setAttribValue(
94  HOM_Attrib &attrib, const char *attrib_value) = 0;
95  virtual void setAttribValue(
96  HOM_Attrib &attrib, const std::vector<int64> &attrib_value) = 0;
97  virtual void setAttribValue(
98  HOM_Attrib &attrib, const std::vector<double> &attrib_value) = 0;
99  virtual void setAttribValue(
100  HOM_Attrib &attrib, const std::vector<std::string> &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  virtual void setAttribValue(
113  const char *attrib_name, const std::vector<int64> &attrib_value) = 0;
114  virtual void setAttribValue(
115  const char *attrib_name, const std::vector<double> &attrib_value) = 0;
116  virtual void setAttribValue(
117  const char *attrib_name,
118  const std::vector<std::string> &attrib_value) = 0;
119 
120 
121  virtual std::vector<std::string> intrinsicNames() = 0;
122 
123  virtual hboost::any intrinsicValue(
124  const char *intrinsic_name) = 0;
125  virtual size_t intrinsicSize(const char *intrinsic_name) = 0;
126  virtual bool intrinsicReadOnly(const char *intrinsic_name) = 0;
127 
128  virtual void setIntrinsicValue(const char *intrinsic_name, double value) = 0;
129  virtual void setIntrinsicValue(const char *intrinsic_name, int value) = 0;
130  virtual void setIntrinsicValue(const char *intrinsic_name, int64 value) = 0;
131  virtual void setIntrinsicValue(
132  const char *intrinsic_name, const char *value) = 0;
133  virtual void setIntrinsicValue(
134  const char *intrinsic_name, const std::vector<double> &value) = 0;
135  virtual void setIntrinsicValue(
136  const char *intrinsic_name, const std::vector<int> &value) = 0;
137  virtual void setIntrinsicValue(
138  const char *intrinsic_name, const std::vector<int64> &value) = 0;
139  virtual void setIntrinsicValue(
140  const char *intrinsic_name, const std::vector<std::string> &value) = 0;
141 
142 #ifdef SWIG
143 %extend
144 {
145  InterpreterObject attribValue(const char *name)
146  { return HOMattribValue(*self, name); }
147 
148  InterpreterObject attribValue(HOM_Attrib &attrib)
149  { return HOMattribValue(*self, attrib); }
150 }
151 #endif
152 
153  SWIGOUT(%newobject positionAtInterior;)
154  virtual HOM_Vector3 *positionAtInterior(double u, double v, double w = 0.0) = 0;
155 
156  SWIGOUT(%ignore boostAnyAttribValueAtInterior;)
157  virtual hboost::any boostAnyAttribValueAtInterior(
158  const char *name, double u, double v, double w) = 0;
159 
160  SWIGOUT(%ignore boostAnyAttribValueAtInterior;)
161  virtual hboost::any boostAnyAttribValueAtInterior(
162  HOM_Attrib &attrib, double u, double v, double w) = 0;
163 
164 #ifdef SWIG
165 %extend
166 {
167  InterpreterObject attribValueAtInterior(
168  const char *name, double u, double v, double w = 0.0)
169  {
170  return HOMboostAnyToInterpreterObject(
171  self->boostAnyAttribValueAtInterior(name, u, v, w));
172  }
173 
174  InterpreterObject attribValueAtInterior(
175  HOM_Attrib &attrib, double u, double v, double w = 0.0)
176  {
177  return HOMboostAnyToInterpreterObject(
178  self->boostAnyAttribValueAtInterior(attrib, u, v, w));
179  }
180 }
181 #endif
182 
183  virtual HOM_BoundingBox boundingBox() = 0;
184 
185  virtual hboost::tuple<double, double, double> nearestToPosition(
186  const std::vector<double> &position) = 0;
187 
188  virtual std::vector< HOM_ElemPtr<HOM_PrimGroup> > groups() = 0;
189 
190 };
191 
192 #endif
HOM_Prim()
Definition: HOM_Prim.h:32
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:974
const GLdouble * v
Definition: glcorearb.h:836
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
long long int64
Definition: SYS_Types.h:100
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:973
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:610
GLuint const GLchar * name
Definition: glcorearb.h:785
GLsizei const GLfloat * value
Definition: glcorearb.h:823
virtual ~HOM_Prim()
Definition: HOM_Prim.h:36
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
GLubyte GLubyte GLubyte GLubyte w
Definition: glcorearb.h:856
HOM_Prim(const HOM_Prim &)
Definition: HOM_Prim.h:34
std::string __repr__()
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:596
int __hash__()