HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_Face.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_Face_h__
10 #define __HOM_Face_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_IterableList.h"
17 #include <vector>
18 #include <stdexcept>
19 class HOM_Vector3;
20 class HOM_Point;
21 
22 SWIGOUT(%rename(Face) HOM_Face;)
23 
24 class HOM_API HOM_Face : virtual public HOM_Prim
25 {
26 public:
28  { HOM_CONSTRUCT_OBJECT(this) }
29  HOM_Face(const HOM_Face &face)
30  : HOM_Prim(face)
31  { HOM_CONSTRUCT_OBJECT(this) }
32  ~HOM_Face() override
33  { HOM_DESTRUCT_OBJECT(this) }
34 
35  // TODO: Do we need to explicitly add operator== and operator!=, or
36  // does swig pick up the base class ones?
37 
38  // Let swig know we're overriding __repr__ for this class so it doesn't
39  // provide its own __repr__.
40  SWIGOUT(virtual std::string __repr__() = 0;)
41 
42  virtual bool isClosed() = 0;
43 
44  // This method is deprecated in favour of isClosed().
45  bool closed()
46  { return isClosed(); }
47 
48  virtual void setIsClosed(bool on) = 0;
49 
50  SWIGOUT(%newobject normal;)
51  virtual HOM_Vector3 *normal() = 0;
52 
53  SWIGOUT(%newobject positionAt;)
54  virtual HOM_Vector3 *positionAt(double u) = 0;
55 
56  // These methods return hboost::any objects and are not wrapped directly
57  // by swig.
58  SWIGOUT(%ignore boostAnyAttribValueAt;)
59  virtual hboost::any boostAnyAttribValueAt(
60  const char *name, double u, int du=0) = 0;
61 
62  SWIGOUT(%ignore boostAnyAttribValueAt;)
63  virtual hboost::any boostAnyAttribValueAt(
64  HOM_Attrib &attrib, double u, int du=0) = 0;
65 
66 #ifdef SWIG
67 %extend
68 {
69  InterpreterObject attribValueAt(
70  const char *name, double u, int du=0)
71  {
72  return HOMboostAnyToInterpreterObject(
73  self->boostAnyAttribValueAt(name, u, du));
74  }
75 
76  InterpreterObject attribValueAt(
77  HOM_Attrib &attrib, double u, int du=0)
78  {
79  return HOMboostAnyToInterpreterObject(
80  self->boostAnyAttribValueAt(attrib, u, du));
81  }
82 }
83 #endif
84 
85  SWIGOUT(%newobject vertex;)
86  virtual HOM_Vertex *vertex(int index) = 0;
87 
88  SWIGOUT(%newobject addVertex;)
89  virtual HOM_Vertex *addVertex(HOM_Point &point) = 0;
90 
91  virtual double arcLength(double u_start, double u_stop, int divs=10) = 0;
92 };
93 
94 #endif
SIM_API const UT_StringHolder vertex
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1303
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
HOM_Face(const HOM_Face &face)
Definition: HOM_Face.h:29
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
bool closed()
Definition: HOM_Face.h:45
~HOM_Face() override
Definition: HOM_Face.h:32
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
HOM_Face()
Definition: HOM_Face.h:27
GLuint const GLchar * name
Definition: glcorearb.h:786
IMATH_HOSTDEVICE constexpr int divs(int x, int y) IMATH_NOEXCEPT
Definition: ImathFun.h:140
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
GLuint index
Definition: glcorearb.h:786