HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_AgentShapeBinding.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_AgentShapeBinding_h__
10 #define __HOM_AgentShapeBinding_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Module.h"
14 #include "HOM_PtrOrNull.h"
15 #include "HOM_Module.h"
16 
17 class HOM_AgentShape;
19 class HOM_Vector3;
20 
21 SWIGOUT(%rename(AgentShapeBinding) HOM_AgentShapeBinding;)
22 // Force SWIG to output an __init__ method even though it determines this
23 // class is abstract.
24 SWIGOUT(%feature("notabstract") HOM_AgentShapeBinding;)
25 
27 {
28 public:
29 #ifdef SWIG
30 %extend
31 {
33  bool deforming, double bounds_scale = 1.0)
34  {
35  return HOM().newAgentShapeBinding(transform, shape, deforming,
36  bounds_scale);
37  }
38 
39  HOM_AgentShapeBinding(int transform, const HOM_AgentShape &shape,
40  const HOM_AgentShapeDeformer *deformer,
41  double bounds_scale = 1.0)
42  {
43  return HOM().newAgentShapeBinding(transform, shape, deformer,
44  HOM_Vector3(bounds_scale, bounds_scale, bounds_scale));
45  }
46 
48  const HOM_AgentShapeDeformer *deformer,
49  double bounds_scale = 1.0)
50  {
51  return HOM().newAgentShapeBinding(-1, shape, deformer,
52  HOM_Vector3(bounds_scale, bounds_scale, bounds_scale));
53  }
54 
55  HOM_AgentShapeBinding(int transform, const HOM_AgentShape &shape,
56  const HOM_AgentShapeDeformer *deformer,
57  const HOM_Vector3 &bounds_scale)
58  {
59  return HOM().newAgentShapeBinding(transform, shape, deformer,
60  bounds_scale);
61  }
62 
64  const HOM_AgentShapeDeformer *deformer,
65  const HOM_Vector3 &bounds_scale)
66  {
67  return HOM().newAgentShapeBinding(-1, shape, deformer, bounds_scale);
68  }
69 }
70 #else
72  { HOM_CONSTRUCT_OBJECT(this) }
73 #endif
74 
76  { HOM_DESTRUCT_OBJECT(this) }
77 
78  virtual bool
81  { return !operator==(binding); }
82 
83  virtual int __hash__() const = 0;
84  virtual std::string __repr__() const = 0;
85 
86  virtual std::string shapeName() const = 0;
87  virtual int shapeId() const = 0;
88  virtual int transformId() const = 0;
89  virtual bool isDeforming() const = 0;
90  SWIGOUT(%newobject boundsScale;)
91  virtual HOM_Vector3 *boundsScale() const = 0;
92 
93  SWIGOUT(%newobject shape;)
94  virtual HOM_AgentShape *shape() const = 0;
95 
96  SWIGOUT(%newobject deformer;)
97  virtual HOM_AgentShapeDeformer *deformer() const = 0;
98 };
99 
100 #endif
#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
bool operator!=(HOM_PtrOrNull< HOM_AgentShapeBinding > binding) const
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
virtual HOM_AgentShapeBinding * newAgentShapeBinding(int transform, const HOM_AgentShape &shape, bool deforming, double bounds_scale)=0
GA_API const UT_StringHolder transform
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
HOM_API HOM_Module & HOM()
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:542
int __hash__()