HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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) }
30  : HOM_Prim(surface)
31  { HOM_CONSTRUCT_OBJECT(this) }
32  ~HOM_Surface() override
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
SIM_API const UT_StringHolder vertex
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1303
const GLdouble * v
Definition: glcorearb.h:837
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:349
bool any(const vbool4 &v)
Definition: simd.h:3468
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
HOM_Surface(const HOM_Surface &surface)
Definition: HOM_Surface.h:29
GLuint const GLchar * name
Definition: glcorearb.h:786
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
~HOM_Surface() override
Definition: HOM_Surface.h:32