HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Handle.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_Handle.h (Custom Library, C++)
7  *
8  * COMMENTS: An object to describe a motion capture handle
9  *
10  */
11 
12 #ifndef __OBJ_Handle__
13 #define __OBJ_Handle__
14 
15 #include "OBJ_API.h"
16 #include "OBJ_Geometry.h"
17 
18 class OBJ_Bone;
19 
21 {
26 
33  I_N_HANDLE_INDICES // should always be last in the list
34 };
35 
36 
37 #define FLOAT_OBJ_PARM(name, idx, vi, t) \
38  return evalFloat(name, &getIndirect()[idx], vi, t);
39 #define INT_OBJ_PARM(name, idx, vi, t) \
40  return evalInt(name, &getIndirect()[idx], vi, t);
41 #define STR_OBJ_PARM(name, idx, vi, t) \
42  evalString(str, name, &getIndirect()[idx], vi, t);
43 
45 {
46 public:
48  const char *name,
49  OP_Operator *op);
50  ~OBJ_Handle() override;
51 
52  static OP_Node *myConstructor(OP_Network *net,
53  const char *name,
54  OP_Operator *entry);
55 
56  static PRM_Template *getObsolete();
58  PRM_ParmList *obsolete) override;
59 
60  OBJ_OBJECT_TYPE getObjectType() const override;
61 
62 
63  OBJ_Node *getTarget();
64 
66  { FLOAT_OBJ_PARM("weight", I_WEIGHT, 0, t); }
68  { FLOAT_OBJ_PARM("falloff", I_FALLOFF, 0, t); }
69 
70  int TWIST_ONLY()
71  { INT_OBJ_PARM("twistonly", I_TWISTONLY, 0, 0); }
72 
73  int DORXLIMIT()
74  { INT_OBJ_PARM("dorxlimit", I_DORXLIMIT, 0, 0); }
75 
76  int DORYLIMIT()
77  { INT_OBJ_PARM("dorylimit", I_DORYLIMIT, 0, 0); }
78 
79  int DORZLIMIT()
80  { INT_OBJ_PARM("dorzlimit", I_DORZLIMIT, 0, 0); }
81 
83  { FLOAT_OBJ_PARM("lrx", I_LIMRX, 0, t); }
85  { FLOAT_OBJ_PARM("lrx", I_LIMRX, 1, t); }
86 
88  { FLOAT_OBJ_PARM("lry", I_LIMRY, 0, t); }
90  { FLOAT_OBJ_PARM("lry", I_LIMRY, 1, t); }
91 
93  { FLOAT_OBJ_PARM("lrz", I_LIMRZ, 0, t); }
95  { FLOAT_OBJ_PARM("lrz", I_LIMRZ, 1, t); }
96 
97  void TARGET(UT_String &str)
98  { STR_OBJ_PARM ("obj_targetpath", I_TARGET, 0, 0); }
99 
100  static PRM_Template *getTemplateList();
101 
102  OBJ_Handle *castToOBJHandle() override { return this; }
103 
104 protected:
105  bool updateParmsFlags() override;
106 
107  // Used to get pointer to indirection indices for each object type
108  int *getIndirect() const override
109  { return handleIndirect; }
110 
111  int isObjectRenderable(fpreal t) const override;
112 
113 private:
114  static int *handleIndirect;
115 };
116 
117 #undef FLOAT_OBJ_PARM
118 #undef STR_OBJ_PARM
119 #undef INT_OBJ_PARM
120 
121 #endif
OBJ_Handle * castToOBJHandle() override
Definition: OBJ_Handle.h:102
OBJ_OBJECT_TYPE getObjectType() const override
fpreal WEIGHT(fpreal t)
Definition: OBJ_Handle.h:65
fpreal FALLOFF(fpreal t)
Definition: OBJ_Handle.h:67
void resolveObsoleteParms(PRM_ParmList *obsolete_parms) override
void TARGET(UT_String &str)
Definition: OBJ_Handle.h:97
#define STR_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Handle.h:41
int TWIST_ONLY()
Definition: OBJ_Handle.h:70
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
int DORXLIMIT()
Definition: OBJ_Handle.h:73
int DORZLIMIT()
Definition: OBJ_Handle.h:79
static PRM_Template * getObsolete()
int * getIndirect() const override
Definition: OBJ_Handle.h:108
fpreal MAXRZ(fpreal t)
Definition: OBJ_Handle.h:94
fpreal MINRZ(fpreal t)
Definition: OBJ_Handle.h:92
GLuint const GLchar * name
Definition: glcorearb.h:786
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
GLdouble t
Definition: glad.h:2397
#define INT_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Handle.h:39
OBJ_HandleIndex
Definition: OBJ_Handle.h:20
virtual int isObjectRenderable(fpreal t) const
fpreal64 fpreal
Definition: SYS_Types.h:277
fpreal MAXRY(fpreal t)
Definition: OBJ_Handle.h:89
#define FLOAT_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Handle.h:37
bool updateParmsFlags() override
fpreal MINRX(fpreal t)
Definition: OBJ_Handle.h:82
fpreal MINRY(fpreal t)
Definition: OBJ_Handle.h:87
int DORYLIMIT()
Definition: OBJ_Handle.h:76
#define OBJ_API
Definition: OBJ_API.h:10
fpreal MAXRX(fpreal t)
Definition: OBJ_Handle.h:84
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:73