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 
83 
84  virtual void setAttribValue(
85  HOM_Attrib &attrib, int64 attrib_value) = 0;
86  virtual void setAttribValue(
87  HOM_Attrib &attrib, double attrib_value) = 0;
88  virtual void setAttribValue(
89  HOM_Attrib &attrib, const char *attrib_value) = 0;
90  virtual void setAttribValue(
91  HOM_Attrib &attrib, const std::vector<int64> &attrib_value) = 0;
92  virtual void setAttribValue(
93  HOM_Attrib &attrib, const std::vector<double> &attrib_value) = 0;
94  virtual void setAttribValue(
95  HOM_Attrib &attrib, const std::vector<std::string> &attrib_value) = 0;
96 
97  virtual void setAttribValue(
98  const char *attrib_name, int64 attrib_value) = 0;
99  virtual void setAttribValue(
100  const char *attrib_name, double attrib_value) = 0;
101  virtual void setAttribValue(
102  const char *attrib_name, const char *attrib_value) = 0;
103  // Note that, because of strangess the with way swig works when deciding
104  // which overloaded method to call, it's very important that we list the
105  // vector of ints before the vector of floats. Otherwise, swig will call
106  // the float version when you pass in a vector of ints.
107  virtual void setAttribValue(
108  const char *attrib_name, const std::vector<int64> &attrib_value) = 0;
109  virtual void setAttribValue(
110  const char *attrib_name, const std::vector<double> &attrib_value) = 0;
111  virtual void setAttribValue(
112  const char *attrib_name,
113  const std::vector<std::string> &attrib_value) = 0;
114 
115 #ifdef SWIG
116 %extend
117 {
118  InterpreterObject attribValue(const char *name)
119  { return HOMattribValue(*self, name); }
120 
121  InterpreterObject attribValue(HOM_Attrib &attrib)
122  { return HOMattribValue(*self, attrib); }
123 }
124 #endif
125 
126  virtual std::vector<HOM_ElemPtr<HOM_Vertex> > vertices() = 0;
127  virtual std::vector<HOM_ElemPtr<HOM_Prim> > prims() = 0;
128 };
129 
130 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1053
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:344
virtual HOM_Geometry * geometry()=0
long long int64
Definition: SYS_Types.h:107
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1052
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:604
virtual ~HOM_Point()
Definition: HOM_Point.h:31
GLuint const GLchar * name
Definition: glcorearb.h:785
HOM_Point()
Definition: HOM_Point.h:27
virtual int __hash__()=0
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:590