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  virtual ~OBJ_Handle();
51 
52  static OP_Node *myConstructor(OP_Network *net,
53  const char *name,
54  OP_Operator *entry);
55 
56  static PRM_Template *getObsolete();
57  void resolveObsoleteParms(PRM_ParmList *obsolete);
58 
59  virtual OBJ_OBJECT_TYPE getObjectType() const;
60 
61 
62  OBJ_Node *getTarget();
63 
65  { FLOAT_OBJ_PARM("weight", I_WEIGHT, 0, t); }
67  { FLOAT_OBJ_PARM("falloff", I_FALLOFF, 0, t); }
68 
69  int TWIST_ONLY()
70  { INT_OBJ_PARM("twistonly", I_TWISTONLY, 0, 0); }
71 
72  int DORXLIMIT()
73  { INT_OBJ_PARM("dorxlimit", I_DORXLIMIT, 0, 0); }
74 
75  int DORYLIMIT()
76  { INT_OBJ_PARM("dorylimit", I_DORYLIMIT, 0, 0); }
77 
78  int DORZLIMIT()
79  { INT_OBJ_PARM("dorzlimit", I_DORZLIMIT, 0, 0); }
80 
82  { FLOAT_OBJ_PARM("lrx", I_LIMRX, 0, t); }
84  { FLOAT_OBJ_PARM("lrx", I_LIMRX, 1, t); }
85 
87  { FLOAT_OBJ_PARM("lry", I_LIMRY, 0, t); }
89  { FLOAT_OBJ_PARM("lry", I_LIMRY, 1, t); }
90 
92  { FLOAT_OBJ_PARM("lrz", I_LIMRZ, 0, t); }
94  { FLOAT_OBJ_PARM("lrz", I_LIMRZ, 1, t); }
95 
96  void TARGET(UT_String &str)
97  { STR_OBJ_PARM ("obj_targetpath", I_TARGET, 0, 0); }
98 
99  static PRM_Template *getTemplateList();
100 
101  virtual OBJ_Handle *castToOBJHandle() { return this; }
102 
103 protected:
104  virtual bool updateParmsFlags();
105 
106  // Used to get pointer to indirection indices for each object type
107  virtual int *getIndirect() const
108  { return handleIndirect; }
109 
110  virtual int isObjectRenderable(fpreal t) const;
111 
112 private:
113  static int *handleIndirect;
114 };
115 
116 #undef FLOAT_OBJ_PARM
117 #undef STR_OBJ_PARM
118 #undef INT_OBJ_PARM
119 
120 #endif
virtual OBJ_Handle * castToOBJHandle()
Definition: OBJ_Handle.h:101
virtual void resolveObsoleteParms(PRM_ParmList *obsolete_parms)
fpreal WEIGHT(fpreal t)
Definition: OBJ_Handle.h:64
fpreal FALLOFF(fpreal t)
Definition: OBJ_Handle.h:66
void TARGET(UT_String &str)
Definition: OBJ_Handle.h:96
#define STR_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Handle.h:41
int TWIST_ONLY()
Definition: OBJ_Handle.h:69
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
int DORXLIMIT()
Definition: OBJ_Handle.h:72
int DORZLIMIT()
Definition: OBJ_Handle.h:78
static PRM_Template * getObsolete()
fpreal MAXRZ(fpreal t)
Definition: OBJ_Handle.h:93
fpreal MINRZ(fpreal t)
Definition: OBJ_Handle.h:91
GLuint const GLchar * name
Definition: glcorearb.h:785
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
#define INT_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Handle.h:39
double fpreal
Definition: SYS_Types.h:270
OBJ_HandleIndex
Definition: OBJ_Handle.h:20
virtual int isObjectRenderable(fpreal t) const
virtual int * getIndirect() const
Definition: OBJ_Handle.h:107
fpreal MAXRY(fpreal t)
Definition: OBJ_Handle.h:88
#define FLOAT_OBJ_PARM(name, idx, vi, t)
Definition: OBJ_Handle.h:37
fpreal MINRX(fpreal t)
Definition: OBJ_Handle.h:81
fpreal MINRY(fpreal t)
Definition: OBJ_Handle.h:86
int DORYLIMIT()
Definition: OBJ_Handle.h:75
virtual OBJ_OBJECT_TYPE getObjectType() const
#define OBJ_API
Definition: OBJ_API.h:10
virtual bool updateParmsFlags() override
fpreal MAXRX(fpreal t)
Definition: OBJ_Handle.h:83
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:71