HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_Surface.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_Surface_h__
10 #define __HOM_Surface_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_Prim.h"
16 #include "HOM_Vertex.h"
17 #include <vector>
18 #include <stdexcept>
19 class HOM_Vector3;
20 class HOM_Vector4;
21 
22 SWIGOUT(%rename(Surface) HOM_Surface;)
23 
24 class HOM_API HOM_Surface : virtual public HOM_Prim
25 {
26 public:
28  { HOM_CONSTRUCT_OBJECT(this) }
29  HOM_Surface(const HOM_Surface &surface)
30  : HOM_Prim(surface)
31  { HOM_CONSTRUCT_OBJECT(this) }
32  virtual ~HOM_Surface()
33  { HOM_DESTRUCT_OBJECT(this) }
34 
35  // Let swig know we're overriding __repr__ for this class so it doesn't
36  // provide its own __repr__.
37  SWIGOUT(virtual std::string __repr__() = 0;)
38 
39 
40  virtual int numRows() = 0;
41  virtual int numCols() = 0;
42 
43  SWIGOUT(%newobject vertex;)
44  virtual HOM_Vertex *vertex(int u_index, int v_index) = 0;
45 
46  virtual std::vector<HOM_ElemPtr<HOM_Vertex> > verticesInRow(int v_index) = 0;
47 
48  virtual std::vector<HOM_ElemPtr<HOM_Vertex> > verticesInCol(int u_index) = 0;
49 
50 
51  virtual bool isClosedInU() = 0;
52  virtual bool isClosedInV() = 0;
53 
54  SWIGOUT(%newobject positionAt;)
55  virtual HOM_Vector3 *positionAt(double u, double v) = 0;
56 
57  SWIGOUT(%newobject normalAt;)
58  virtual HOM_Vector3 *normalAt(double u, double v) = 0;
59 
60 
61  // These methods return hboost::any objects and are not wrapped directly
62  // by swig.
63  SWIGOUT(%ignore boostAnyAttribValueAt;)
64  virtual hboost::any boostAnyAttribValueAt(
65  const char *name, double u, double v, int du=0, int dv=0) = 0;
66 
67  SWIGOUT(%ignore boostAnyAttribValueAt;)
68  virtual hboost::any boostAnyAttribValueAt(
69  HOM_Attrib &attrib, double u, double v, int du=0, int dv=0) = 0;
70 
71 #ifdef SWIG
72 %extend
73 {
74  InterpreterObject attribValueAt(
75  const char *name, double u, double v, int du=0, int dv=0)
76  {
77  return HOMboostAnyToInterpreterObject(
78  self->boostAnyAttribValueAt(name, u, v, du, dv));
79  }
80 
81  InterpreterObject attribValueAt(
82  HOM_Attrib &attrib, double u, double v, int du=0, int dv=0)
83  {
84  return HOMboostAnyToInterpreterObject(
85  self->boostAnyAttribValueAt(attrib, u, v, du, dv));
86  }
87 }
88 #endif
89 
90 
91  SWIGOUT(%kwargs addRow;)
92  virtual void addRow(int after=-1) = 0;
93 
94  SWIGOUT(%kwargs addCol;)
95  virtual void addCol(int after=-1) = 0;
96 };
97 
98 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:981
const GLdouble * v
Definition: glcorearb.h:836
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:980
HOM_Surface(const HOM_Surface &surface)
Definition: HOM_Surface.h:29
GLuint const GLchar * name
Definition: glcorearb.h:785
std::string __repr__()
virtual ~HOM_Surface()
Definition: HOM_Surface.h:32