HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Null.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  * NAME: OBJ_Null.h (Custom Library, C++)
7  *
8  * COMMENTS: An object to describe a motion capture handle
9  *
10  */
11 
12 #ifndef __OBJ_Null__
13 #define __OBJ_Null__
14 
15 #include "OBJ_API.h"
16 #include "OBJ_Geometry.h"
17 
19 {
30  I_N_NULL_INDICES // should always be last in the list
31 };
32 
34 {
35 public:
36  OBJ_Null(OP_Network *net,
37  const char *name,
38  OP_Operator *op);
39  ~OBJ_Null() override;
40 
41  static OP_Node *myConstructor(OP_Network *net,
42  const char *name,
43  OP_Operator *entry);
44 
45  static PRM_Template *getTemplateList();
46 
47  OBJ_OBJECT_TYPE getObjectType() const override
48  { return OBJ_STD_NULL; }
49 
51  {
52  return evalInt("renderspace",
54  0, t);
55  }
56 
57  fpreal GEOSCALE(fpreal t, int i=0)
58  {
59  return evalFloat("geoscale",
61  0, t)
62  * evalFloat("geosize",
64  i, t);
65  }
66 
68  {
69  return evalFloat("geocenter",
71  i, t);
72  }
73 
75  {
76  return evalFloat("georotate",
78  i, t);
79  }
80 
82  {
83  evalStringRaw( s,
84  "geocustom",
86  0, 0);
87  }
88 
90  {
91  return evalInt("displayicon",
93  0, t);
94  }
95 
97  {
98  return evalInt("controltype",
100  0, t);
101  }
102 
104  {
105  return evalInt("orientation",
107  0, t);
108  }
109 
111  {
112  return evalInt("shadedmode",
114  0, t);
115  }
116 
117  OBJ_Null *castToOBJNull() override { return this; }
118 
119  void syncNodeVersion(const char *old_version,
120  const char *cur_version,
121  bool *node_deleted) override;
122 
123 protected:
124  bool updateParmsFlags() override;
125 
126  // Used to get pointer to indirection indices for each object type
127  int *getIndirect() const override
128  { return nullIndirect; }
129 
130  int isObjectRenderable(fpreal t) const override;
131 
132 private:
133  static int *nullIndirect;
134 };
135 
136 #endif
GLdouble s
Definition: glew.h:1390
GLuint const GLchar * name
Definition: glew.h:1814
void syncNodeVersion(const char *old_version, const char *current_version, bool *node_deleted) override
int * getIndirect() const override
Definition: OBJ_Geometry.h:112
fpreal evalFloat(int pi, int vi, fpreal t) const
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
int * getIndirect() const override
Definition: OBJ_Null.h:127
void GEOCUSTOM(UT_String &s)
Definition: OBJ_Null.h:81
OBJ_Null * castToOBJNull() override
Definition: OBJ_Null.h:117
int SHADEDMODE(fpreal t)
Definition: OBJ_Null.h:110
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
void evalStringRaw(UT_String &val, int pi, int vi, fpreal t) const
fpreal GEOROTATE(fpreal t, int i=0)
Definition: OBJ_Null.h:74
int DISPLAYICON(fpreal t)
Definition: OBJ_Null.h:89
OBJ_NullIndex
Definition: OBJ_Null.h:18
virtual int isObjectRenderable(fpreal t) const
fpreal64 fpreal
Definition: SYS_Types.h:277
bool updateParmsFlags() override
int ORIENTATION(fpreal t)
Definition: OBJ_Null.h:103
OBJ_OBJECT_TYPE getObjectType() const override
Definition: OBJ_Null.h:47
exint evalInt(int pi, int vi, fpreal t) const
fpreal GEOCENTER(fpreal t, int i=0)
Definition: OBJ_Null.h:67
fpreal GEOSCALE(fpreal t, int i=0)
Definition: OBJ_Null.h:57
#define OBJ_API
Definition: OBJ_API.h:10
int RENDERSPACE(fpreal t)
Definition: OBJ_Null.h:50
GLdouble GLdouble t
Definition: glew.h:1398
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:74
int CONTROLTYPE(fpreal t)
Definition: OBJ_Null.h:96