HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ObjNode.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_ObjNode_h__
10 #define __HOM_ObjNode_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Errors.h"
15 #include "HOM_OpNode.h"
16 
17 class HOM_Geometry;
18 class HOM_Point;
19 class HOM_Matrix4;
20 class HOM_Vector3;
21 
22 SWIGOUT(%rename(ObjNode) HOM_ObjNode;)
23 
24 class HOM_API HOM_ObjNode : virtual public HOM_OpNode
25 {
26 public:
28  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
29  { HOM_CONSTRUCT_OBJECT(this) }
30  HOM_ObjNode(const HOM_ObjNode &obj_node)
31  : HOM_OpNode(obj_node),
32  HOM_NetworkMovableItem(obj_node)
33  { HOM_CONSTRUCT_OBJECT(this) }
34  ~HOM_ObjNode() override
35  { HOM_DESTRUCT_OBJECT(this) }
36 
37  // Let swig know we're overriding __repr__ for this class so it doesn't
38  // provide its own __repr__.
39  SWIGOUT(virtual std::string __repr__() = 0;)
40  SWIGOUT(%newobject origin;)
41  virtual HOM_Vector3 *origin() = 0;
42 
43  SWIGOUT(%newobject localTransform;)
44  virtual HOM_Matrix4 *localTransform() = 0;
45  SWIGOUT(%newobject localTransformAtTime;)
46  virtual HOM_Matrix4 *localTransformAtTime(double time) = 0;
47 
48  SWIGOUT(%newobject worldTransform;)
49  virtual HOM_Matrix4 *worldTransform() = 0;
50 
51  SWIGOUT(%newobject worldTransformAtTime;)
52  virtual HOM_Matrix4 *worldTransformAtTime(double time) = 0;
53 
54  SWIGOUT(%kwargs setWorldTransform;)
55  virtual void setWorldTransform(
56  HOM_Matrix4 &matrix, bool fail_on_locked_parms = false) = 0;
57 
58  virtual void setCookTransform(HOM_Matrix4 &matrix) = 0;
59 
60  SWIGOUT(%newobject parmTransform;)
61  virtual HOM_Matrix4 *parmTransform() = 0;
62 
63  SWIGOUT(%kwargs setParmTransform;)
64  virtual void setParmTransform(
65  HOM_Matrix4 &matrix, bool fail_on_locked_parms = false) = 0;
66 
67  SWIGOUT(%newobject parmPivotTransform;)
68  virtual HOM_Matrix4 *parmPivotTransform() = 0;
69 
70  SWIGOUT(%kwargs setParmPivotTransform;)
71  virtual void setParmPivotTransform(
72  HOM_Matrix4 &matrix, bool fail_on_locked_parms = false) = 0;
73 
74  SWIGOUT(%newobject preTransform;)
75  virtual HOM_Matrix4 *preTransform() = 0;
76 
77  virtual void setPreTransform(HOM_Matrix4 &matrix) = 0;
78 
79  virtual void movePreTransformIntoParmTransform() = 0;
80 
81  virtual void moveParmTransformIntoPreTransform() = 0;
82  virtual void moveParmTranslateIntoPreTransform() = 0;
83  virtual void moveParmRotateIntoPreTransform() = 0;
84  virtual void moveParmScaleIntoPreTransform() = 0;
85 
86  virtual HOM_Matrix4 *parentAndSubnetTransform() = 0;
87 
88  SWIGOUT(%newobject getTransformToNode;)
89  virtual HOM_Matrix4 *getTransformToNode(HOM_ObjNode &obj_node) = 0;
90 
91  SWIGOUT(%newobject getTransformFromPointToPoint;)
92  virtual HOM_Matrix4 *getTransformFromPointToPoint(
93  HOM_Vector3 &pos3, HOM_ObjNode &other_node,
94  HOM_Vector3 &other_pos3) = 0;
95 
96  SWIGOUT(%newobject buildLookatRotation;)
97  virtual HOM_Matrix4 *buildLookatRotation(HOM_ObjNode &to_node,
98  HOM_Vector3 *up_vector = NULL) = 0;
99 
100  virtual bool isObjectDisplayed() = 0;
101  virtual bool isObjectDisplayedAtFrame(double frame) = 0;
102 
103  virtual bool isDisplayFlagSet() = 0;
104  virtual void setDisplayFlag(bool on) = 0;
105  virtual bool isSelectableInViewport() = 0;
106  virtual void setSelectableInViewport(bool on) = 0;
107  virtual bool isShowingOrigin() = 0;
108  virtual void showOrigin(bool on) = 0;
109  virtual bool isUsingXray() = 0;
110  virtual void useXray(bool on) = 0;
111 
112  SWIGOUT(%newobject displayNode;)
113  virtual HOM_Node *displayNode() = 0;
114 
115  SWIGOUT(%newobject renderNode;)
116  virtual HOM_Node *renderNode() = 0;
117 
118  virtual void combine(const std::vector<HOM_Node *> &nodes) = 0;
119 
120  SWIGOUT(%kwargs material;)
121  virtual void material(const char *operation,
122  const std::vector<std::string> &parms=std::vector<std::string>()) = 0;
123 
124  // Override HOM_Node's _parmClipData() and _saveParmClip() methods
125  // to handle animation data when constraints are enabled
126  HOM_BinaryString _parmClipData(double start,
127  double end,
128  bool binary = true,
129  bool use_blosc_compression = true,
130  double sample_rate = 0,
131  bool scoped_only = false) override = 0;
132 
133  void _saveParmClip(std::string file_name,
134  double start,
135  double end,
136  double sample_rate = 0,
137  bool scoped_only = false) override = 0;
138 };
139 
140 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1303
HOM_ObjNode(const HOM_ObjNode &obj_node)
Definition: HOM_ObjNode.h:30
Definition: Node.h:52
GT_API const UT_StringHolder time
GLuint start
Definition: glcorearb.h:475
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
~HOM_ObjNode() override
Definition: HOM_ObjNode.h:34
#define HOM_API
Definition: HOM_API.h:13
GLuint GLuint end
Definition: glcorearb.h:475
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)