HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
OBJ_Bone.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_Bone.h ( Object Library, C++)
7  *
8  * COMMENTS:
9  * Object that implements bones
10  */
11 
12 #ifndef __OBJ_Bone__
13 #define __OBJ_Bone__
14 
15 #include "OBJ_API.h"
16 #include "OBJ_Geometry.h"
17 #include <UT/UT_ValArray.h>
18 #include <UT/UT_XformOrder.h>
19 #include <SYS/SYS_Inline.h>
20 
21 class UT_String;
22 class SOP_CaptureRegion;
23 
24 #define BONESTATE_CHOPNET "KIN_Chops"
25 
26 // NOTE: IF YOU ADD ANYTHING HERE, YOU MUST UPDATE
27 // THE switcher[] INSIDE OBJ_Bone.C
29 {
30  // Bone
45 
46  // Capture
48 
49  // Capture-Deform SOPs
65  // Capture Bone Pose Xform (translate, rotate, scale)
71 
72  I_N_BONE_INDICES // should always be last in the list
73 };
74 
75 #define EVAL_FLOAT(name, idx, vi, t) \
76  return evalFloat(name, &getIndirect()[idx], vi, t);
77 #define EVAL_FLOAT_T(name, idx, vi, t, thread) \
78  return evalFloatT(name, &getIndirect()[idx], vi, t, thread);
79 #define EVAL_FLOATS(name, idx, v, t) \
80  evalFloats(name, &getIndirect()[idx], v, t);
81 #define EVAL_FLOATS_T(name, idx, v, t, stid) \
82  evalFloatsT(name, &getIndirect()[idx], v, t, stid);
83 #define EVAL_INT(name, idx, vi, t) \
84  return evalInt(name, &getIndirect()[idx], vi, t);
85 #define EVAL_STR(name, idx, vi, t) \
86  evalString(str, name, &getIndirect()[idx], vi, t);
87 
88 #define SET_FLOAT(name, parm_index, vector_index, t, val) \
89  setFloat(name, getIndirect()[parm_index], vector_index, t, val)
90 #define SET_FLOATREF(name, vector_index, t, val) \
91  setChRefFloat(getParmList()->getParmIndex(name), vector_index, t, val)
92 #define SET_INT(name, parm_index, vector_index, t, val) \
93  setInt(name, getIndirect()[parm_index], vector_index, t, val)
94 #define SET_STRING(val, meaning, name, parm_index, vector_index, t) \
95  setString(val, meaning, name, getIndirect()[parm_index], \
96  vector_index, t)
97 
98 class SOP_Node;
99 class CHOP_Node;
100 
102 {
103 public:
105  enum KinOverride {
109  NUM_KIN_OVERRIDES
110  };
111 
112  OBJ_Bone(OP_Network *, const char *,
113  OP_Operator *);
114  virtual ~OBJ_Bone();
115 
116  virtual int isObjectRenderable(fpreal t) const;
117  void setIsObjectRenderable(bool val);
118 
119  virtual void getNodeSpecificInfoText(OP_Context &context,
120  OP_NodeInfoParms &iparms);
121  virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree,
122  const OP_NodeInfoTreeParms &parms);
123 
124  CHOP_Node * getKinChop();
125  void cleanBoneTransform( OP_Context &context );
126 
127  SOP_Node * getBoneSOP() const;
128 
129  virtual bool getParmTransform(OP_Context &context,
130  UT_DMatrix4 &xform);
131  virtual bool getParmTransformRotates(OP_Context &context,
132  UT_DMatrix4 &xform );
133  virtual bool getParmTransformTranslates(OP_Context &context,
134  UT_DMatrix4 &xform );
135  virtual bool getParmTransformScales(OP_Context &context,
136  UT_DMatrix4 &xform );
137 
138  // capture transform relative to "to" node (float and double versions)
139  virtual int getRelativeCaptureTransform( OP_Node &to,
140  UT_Matrix4 &xform,
141  OP_Context &context );
142  virtual int getRelativeCaptureTransform( OP_Node &to,
143  UT_DMatrix4 &xform,
144  OP_Context &context );
145 
146  // get the transform such that bone is transformed to capture position
147  // NB: this is a local to world transform (but for the capture pose)
148  virtual void getCaptureParmTransform( OP_Context &context,
149  UT_DMatrix4 &mat );
150  // sets the capture trs parameters so that they represent the given xform
151  // NB: this is a local to world transform (but for the capture pose)
152  virtual void setCaptureParmTransform( OP_Context &context,
153  const UT_DMatrix4& xform );
154  // next two methods obtain local to world transform of the animation
155  // bone pose (independently of the current override: that is
156  // they return what getLocalToWorldTransform would in the OVERRIDE_NONE)
157  void getAnimLocalToWorldTransform( OP_Context &context,
158  UT_DMatrix4 &mat );
159  void getAnimInverseLocalToWorldTransform(OP_Context &context,
160  UT_DMatrix4 &mat );
161 
162 
163  // set the given world position by only modifying the pre-transform
164  virtual int keepWorldTransform(
165  OP_Context &context,
166  const UT_DMatrix4 &world_xform );
167 
168  // obtains the transformation from the reference frame associated with
169  // the rest position, to the world
170  int getChildToWorldRestTransform(const char *frame,
171  UT_DMatrix4 &xform, fpreal t)
172  {
173  return getCustomChildToWorldTransform( frame, t,
174  xform);
175  }
176  bool getObjectToChainParentTransform(
177  OBJ_Bone *start_bone,
178  UT_DMatrix4 &xform, fpreal t );
179 
180  // methods to set the bone-specific parm values
181 
182  void setUseSolver( int onoff )
183  { myUseSolverFlag = onoff ? 1 : 0; }
184  int getUseSolver() const
185  { return myUseSolverFlag; }
186  int isUsingSolver() const
187  { return myIsUsingSolverFlag; }
188 
189  // sets the capture parameters for the bone.
190  // Capture parameters "freeze" the current parameters by storing them
191  // (or accumulation of them) in the capture parameters. The capture
192  // parameters are used for capturing geometry by bone's capture regions.
193  // They are also used for displaying the capture pose when
194  // kinematic override is set to "CAPTURE"
195  void setCaptureParameters(OP_Context &context,
196  UT_String &errors);
197 
198  // sets the capture parameters so that bone capture position
199  // is the same as the animation position. Also aligns the
200  // capture and deform pills (ie capture and animate regions) of each
201  // capture region contained by the bone.
202  // NB: both bone and capture region capture parameters are changed
203  // to aligh capture region to deform region.
204  void alignRegionCaptureWithDeform(OP_Context &context,
205  UT_String &errors);
206 
207  // adjust the cregions within the bone so that their animation
208  // region is aligned with capture region in the world space (through
209  // the use of the SOP rig adjustment xform)
210  // NB: If keep_bone_pos is true, only the rig adjustment parameters are
211  // changed to aligh animation (deform) region with capture region. Bone
212  // parameters do not change at all.
213  void alignRegionDeformWithCapture(OP_Context &context,
214  bool keep_bone_pos,
215  UT_String &errors);
216  void alignRegionDeformWithCapture(OP_Context &context,
217  UT_String &errors);
218 
219  // set the parameters
220  void setLinkDisplay(int onOff)
221  { SET_INT("displaylink", I_LINK, 0, 0, onOff); }
223  { SET_FLOAT("length", I_LENGTH, 0, t, v); }
225  { SET_FLOAT("R", I_REST_ANGLE, 0, t, v); }
227  { SET_FLOAT("R", I_REST_ANGLE, 1, t, v); }
229  { SET_FLOAT("R", I_REST_ANGLE, 2, t, v); }
230 
231  void setSOLVER( const char *solver,
232  CH_StringMeaning meaning )
233  {SET_STRING(solver, meaning, "solver",
234  I_SOLVER, 0, 0.0f);}
235 
237  { SET_FLOAT("xrange", I_XRANGE, 0, t, v); }
239  { SET_FLOAT("xrange", I_XRANGE, 1, t, v); }
241  { SET_FLOAT("yrange", I_YRANGE, 0, t, v); }
243  { SET_FLOAT("yrange", I_YRANGE, 1, t, v); }
245  { SET_FLOAT("zrange", I_ZRANGE, 0, t, v); }
247  { SET_FLOAT("zrange", I_ZRANGE, 1, t, v); }
248 
249  // 0 is skeleton SOP type, 1 is Capture/Deform type
250  void setCaptureDisplay(int onOff)
251  { SET_INT("displaycapture", I_CAPTURE, 0, 0, onOff); }
252 
254  { SET_FLOAT("crcenter", I_CRCENTER, 0, t, x);
255  SET_FLOAT("crcenter", I_CRCENTER, 1, t, y);
256  SET_FLOAT("crcenter", I_CRCENTER, 2, t, z);
257  }
259  { SET_FLOAT("crrotate", I_CRROTATE, 0, t, x);
260  SET_FLOAT("crrotate", I_CRROTATE, 1, t, y);
261  SET_FLOAT("crrotate", I_CRROTATE, 2, t, z);
262  }
264  { SET_FLOAT("crscale", I_CRSCALE, 0, t, x);
265  SET_FLOAT("crscale", I_CRSCALE, 1, t, y);
266  SET_FLOAT("crscale", I_CRSCALE, 2, t, z);
267  }
269  { SET_FLOAT("crtopheight", I_CRTOPHEIGHT,0,t, v); }
271  { SET_FLOAT("crtopcap", I_CRTOPCAP, 0, t, x);
272  SET_FLOAT("crtopcap", I_CRTOPCAP, 1, t, y);
273  SET_FLOAT("crtopcap", I_CRTOPCAP, 2, t, z);
274  }
276  { SET_FLOAT("crbotheight", I_CRBOTHEIGHT,0,t, v); }
278  { SET_FLOAT("crbotcap", I_CRBOTCAP, 0, t, x);
279  SET_FLOAT("crbotcap", I_CRBOTCAP, 1, t, y);
280  SET_FLOAT("crbotcap", I_CRBOTCAP, 2, t, z);
281  }
282 
283  // the three following methods change the capture length capture pose
284  // of the bone, and propagate the change to the descentent bones,
285  // chaning their capture pose (as if they were "parented" to this bone)
286  void setCaptLengthAndTranslateDescendents( fpreal t,
287  fpreal length );
288  void setCaptTransformAndDescendents( fpreal t,
289  const UT_DMatrix4 &xform );
291  OP_Context &context,
292  const UT_DMatrix4 &xform);
293 
294  // set the capture parameters
296  { SET_FLOATREF("captposelen", 0, t, l);
297  }
299  { SET_FLOATREF("captposet", 0, t, x);
300  SET_FLOATREF("captposet", 1, t, y);
301  SET_FLOATREF("captposet", 2, t, z);
302  }
304  { SET_FLOATREF("captposer", 0, t, x);
305  SET_FLOATREF("captposer", 1, t, y);
306  SET_FLOATREF("captposer", 2, t, z);
307  }
309  { SET_FLOATREF("captposes", 0, t, x);
310  SET_FLOATREF("captposes", 1, t, y);
311  SET_FLOATREF("captposes", 2, t, z);
312  }
313 
314  // depending on the kinematic override mode get/set either the current
315  // or capture bone length
316  fpreal getOverrideDependentBoneLength( fpreal t );
317  void setOverrideDependentBoneLength( fpreal t, fpreal l );
318 
319  // methods to retrieve the bone-specific parm values
320 
321  int DISPLAYLINK() { EVAL_INT("displaylink", I_LINK, 0, 0) }
322  fpreal BONELENGTH(fpreal t) { EVAL_FLOAT("length", I_LENGTH, 0, t) }
323  fpreal BONELENGTH(fpreal t, int thread)
324  { EVAL_FLOAT_T("length", I_LENGTH, 0, t, thread) }
325  void SOLVER(UT_String &str){ EVAL_STR("solver", I_SOLVER, 0, 0) }
327  { return getStringMeaning("solver", 0, 0.0f); }
328  void REST(fpreal *v, fpreal t) { EVAL_FLOATS("R", I_REST_ANGLE, v, t) }
330  void REST(fpreal *v, fpreal t, int stid)
331  { EVAL_FLOATS_T("R", I_REST_ANGLE, v, t, stid) }
332  fpreal IKDAMPENING(fpreal t) { EVAL_FLOAT("ikdamp", I_DAMPEN, 0, t) }
333  fpreal XMIN(fpreal t) { EVAL_FLOAT("xrange", I_XRANGE, 0, t) }
334  fpreal XMAX(fpreal t) { EVAL_FLOAT("xrange", I_XRANGE, 1, t) }
335  fpreal XDAMP(fpreal t) { EVAL_FLOAT("xdamp", I_XDAMP, 0, t) }
336  fpreal XROLLOFF(fpreal t) { EVAL_FLOAT("xrolloff",I_XROLLOFF, 0, t) }
337  fpreal YMIN(fpreal t) { EVAL_FLOAT("yrange", I_YRANGE, 0, t) }
338  fpreal YMAX(fpreal t) { EVAL_FLOAT("yrange", I_YRANGE, 1, t) }
339  fpreal YDAMP(fpreal t) { EVAL_FLOAT("ydamp", I_YDAMP, 0, t) }
340  fpreal YROLLOFF(fpreal t) { EVAL_FLOAT("yrolloff",I_YROLLOFF, 0, t) }
341  fpreal ZMIN(fpreal t) { EVAL_FLOAT("zrange", I_ZRANGE, 0, t) }
342  fpreal ZMAX(fpreal t) { EVAL_FLOAT("zrange", I_ZRANGE, 1, t) }
343  fpreal ZDAMP(fpreal t) { EVAL_FLOAT("zdamp", I_ZDAMP, 0, t) }
344  fpreal ZROLLOFF(fpreal t) { EVAL_FLOAT("zrolloff",I_ZROLLOFF, 0, t) }
345  int CAPTURE() { EVAL_INT ("displaycapture",I_CAPTURE, 0, 0) }
346 
347  fpreal CRCEN(fpreal t, int i) { EVAL_FLOAT("crcenter",I_CRCENTER, i,t); }
348  fpreal CRROTATE(fpreal t, int i){ EVAL_FLOAT("crrotate",I_CRROTATE, i,t);}
349  fpreal CRSCALE(fpreal t, int i){ EVAL_FLOAT("crscale",I_CRSCALE, i,t);}
350  fpreal CRTOPH(fpreal t) { EVAL_FLOAT("crtopheight", I_CRTOPHEIGHT,0,t);}
351  fpreal CRTOPC(fpreal t, int i){ EVAL_FLOAT("crtopcap",I_CRTOPCAP, i,t);}
352  fpreal CRBOTH(fpreal t) { EVAL_FLOAT("crbotheight", I_CRBOTHEIGHT,0,t);}
353  fpreal CRBOTC(fpreal t, int i){ EVAL_FLOAT("crbotcap",I_CRBOTCAP, i,t);}
354 
355 
357  { EVAL_FLOAT("captposelen",I_CAPTPOSE_LENGTH,0,t); }
367 
368  static OP_Node *myConstructor(OP_Network *net,
369  const char *name, OP_Operator *entry);
370 
371  // sets the kinematic override and if the mode is changed and recook_bones
372  // is true, then the all bones are forced to recook
373  // NB: if bones are not forced to cook, they may return invalid
374  // world transform since it is cached and only recomputed at cook time
375  static void setGlobalKinOverride( KinOverride val,
376  bool recook_bones = true );
377  static KinOverride getGlobalKinOverride() { return theGlobalKinOverride; }
378 
379  // traverses all existing bones and invoke function on each of them
380  // If function returns nonzero the traversal continues, otherwise it stops.
381  // The void pointer is passed to the call of the function.
382  typedef int (*OBJ_BoneCallbackFunction)( const OBJ_Bone *, void *);
383 
384  static void traverseAllBones( OBJ_BoneCallbackFunction fnct,
385  void *data );
386 
387  static const char **getReferenceFrames()
388  { return theReferenceFrames; }
389  static const char **getReferenceFrameNames()
390  { return theReferenceFrameNames; }
391  int getRestPosition(const char *frame,
392  UT_Vector3R &pos,
393  fpreal t);
394  int setRestPosition(const char *frame,
395  UT_Vector3R &pos,
396  fpreal t);
397 
398  enum FrameType { FRAME_INVALID = -1, FRAME_WORLD = 0, FRAME_PARENT };
399  int getPosition( FrameType frame_type,
400  UT_Vector3R &pos,
401  fpreal t);
402  int getPosition(const char *frame,
403  UT_Vector3R &pos,
404  fpreal t);
405  int setPosition(const char *frame,
406  UT_Vector3R &pos,
407  fpreal t);
408 
409  virtual OBJ_OBJECT_TYPE getObjectType() const;
410 
411  // get actual rotates (in degrees) that were used for cooking
412  // (this may replace local xform with the chop rotates solution)
413  void getCookedLocalRotates( OP_Context &context,
414  UT_Vector3R &rot );
415 
416  // two specialized methods for calculating translation/scale transform
417  // and rotation angles of the bone with respect to the parent bone.
418  // If parent is not a bone, the xforms are with respect to world.
419  void getBoneToParentCaptureTranslate(
420  OP_Context &context,
421  UT_Vector3R &transl );
422  void getBoneToParentCaptureRotate(
423  OP_Context &context,
424  UT_DMatrix4 &xform );
425  // return roatation angles rot (in degrees to keep it consistent with
426  // getCookedLocalRotates). Angles are orienting bone w.r.t. parent space
427  void getBoneToParentCaptureRotate(
428  OP_Context &context,
429  UT_Vector3R &rot );
430 
431  // sets capture rotate parameter based on the given rotation angle vector
432  // rot - contains angles (in degrees) in parent bone space
433  void setCaptureRotateInParentSpace(
434  OP_Context &context,
435  const UT_Vector3R &rot );
436 
437  // this method obtains a parent to world transform in the capture position.
438  // If parent is a bone, the transformation positions the origin
439  // at the parent's tip (not base!) and aligns axis with parent's
440  // reference frame.
441  // If parent is not a bone, the transform is identity.
442  void getBoneParentCaptureTransform(
443  OP_Context &context,
444  UT_DMatrix4 &xform );
445 
446 
447  // Only affect bone length
448  virtual void setScaleFromHandle(fpreal t,
449  const UT_Vector3R &s,
450  bool create_keys = false,
451  int key_idx = -1,
452  bool check_modified = true);
453 
454  // Affect rotation and rest angles
455  virtual void setRotateFromHandle(fpreal t,
456  const UT_Vector3R &r,
457  bool create_keys = false,
458  int key_idx = -1,
459  bool check_modified = true);
460 
461  virtual const char * getSetRotateParmName() const;
462 
463  virtual void transferLocalToPreTransform(fpreal gtime);
464  virtual void transferPreToLocalTransform(
465  fpreal gtime, bool follow_chan_refs = false);
467 
468  void getCaptureRegions(
470 
471 
472  static PRM_Template *getTemplateList();
473  static PRM_Template *getObsolete();
474 
475 
476  virtual OBJ_Bone *castToOBJBone() { return this; }
477 
478 protected:
479  // Used to get pointer to indirection indices for each object type
480  virtual int *getIndirect() const
481  { return boneIndirect; }
482 
483  // This method considers the effect of the LOOKAT fields and produces
484  // a matrix that should be premultiplied to the orientation to get the
485  // lookat. It takes the local->world transform (myWorldXform) as this
486  // is used to figure out where this is outside cookpaths.
487  // If 'interest' is supplied, then interest will be onto this other node
488  // instead.
489  // This returns 0 if no lookat is needed, in which case the matrix
490  // provided will not be altered!
491  // NOTE: this function is virtual, because OBJ_Bone has a "capture"
492  // mode in which the lookAt parameter (or input node's transform
493  // for that matter) is not considered. For that reason, bones override
494  // this method to provide the mode-dependent transorm
495  virtual int buildLookAt(OP_Context &context,
496  const UT_DMatrix4 &world,
497  UT_DMatrix4 &lookat,
498  OP_Node *interest = 0);
499 
500  // Override these to pre-multiply a transform for the given matrix.
501  // These return 1 if the matrix was modified, 0 otherwise
502  virtual int applyInputIndependentTransform(
503  OP_Context &context, UT_DMatrix4 &mat);
504  virtual int applyPreTransform(OP_Context &context, UT_DMatrix4 &mat);
505 
506 private:
507  static int getReferenceFrame(const char *frame);
508 
509  static int *boneIndirect;
510  static KinOverride theGlobalKinOverride;
511  static const char *theReferenceFrames[];
512  static const char *theReferenceFrameNames[];
513 
514 
515  bool getParmTransformHelper( OP_Context &context,
516  UT_DMatrix4 &mat,
517  OBJ_TransformComponent type );
518 
519  void transferLocalToPreTransformHelper(fpreal gtime,
520  OBJ_TransformComponent type );
521 
522  bool getParmTransformFromBaseClass(
523  OP_Context &context, UT_DMatrix4 &mat,
524  OBJ_TransformComponent type );
525 
526  bool getParmTransformFromKin( OP_Context &context,
527  UT_DMatrix4 &mat, OBJ_TransformComponent type );
528 
529 private:
530 // Callback for building custom world transforms from objects.
531 // The callback is responsible for setting the given matrix by
532 // the local transform of the object.
533 // Return 0 to stop processing, 1 to continue.
534  static int applyCustomParmTransform(
535  void *data, OBJ_Node *node, OP_Context &context, UT_DMatrix4 &mat);
536 
537  int getCustomChildToWorldTransform(
538  const char *frame, fpreal t, UT_DMatrix4 &mat);
539  int getCustomObjectToWorldTransform(
540  const char *frame, fpreal t, UT_DMatrix4 &mat);
541 
542  void adjustCaptureAndRestAngles(
543  fpreal gtime, UT_DMatrix4 &rest_xform);
544 
545  int myCurrentReferenceFrame;
546  int myLastKinSolverOpId;
547  unsigned myUseSolverFlag:1,
548  myIsUsingSolverFlag:1;
549 };
550 
551 
552 #undef EVAL_FLOAT
553 #undef EVAL_FLOATS
554 #undef EVAL_INT
555 #undef EVAL_STR
556 
557 #undef SET_FLOAT
558 #undef SET_FLOATREF
559 #undef SET_INT
560 #undef SET_STRING
561 
562 #endif
virtual void transferPreToLocalTransform(fpreal gtime, bool follow_chan_refs=false)
int CAPTURE()
Definition: OBJ_Bone.h:345
int DISPLAYLINK()
Definition: OBJ_Bone.h:321
fpreal CRROTATE(fpreal t, int i)
Definition: OBJ_Bone.h:348
fpreal XDAMP(fpreal t)
Definition: OBJ_Bone.h:335
void setCRbotHeight(fpreal t, fpreal v)
Definition: OBJ_Bone.h:275
fpreal getCaptPoseTz(fpreal t)
Definition: OBJ_Bone.h:360
#define SET_INT(name, parm_index, vector_index, t, val)
Definition: OBJ_Bone.h:92
void setYMIN(fpreal t, fpreal v)
Definition: OBJ_Bone.h:240
CH_StringMeaning
fpreal YMAX(fpreal t)
Definition: OBJ_Bone.h:338
virtual void getNodeSpecificInfoText(OP_Context &context, OP_NodeInfoParms &iparms) override
static const char ** getReferenceFrameNames()
Definition: OBJ_Bone.h:389
const GLdouble * v
Definition: glcorearb.h:836
#define EVAL_FLOAT_T(name, idx, vi, t, thread)
Definition: OBJ_Bone.h:77
int getUseSolver() const
Definition: OBJ_Bone.h:184
void setLength(fpreal t, fpreal v)
Definition: OBJ_Bone.h:222
GA_API const UT_StringHolder rot
GLdouble GLdouble GLdouble z
Definition: glcorearb.h:847
virtual const char * getSetRotateParmName() const
Definition: OBJ_Node.h:929
fpreal XMAX(fpreal t)
Definition: OBJ_Bone.h:334
void setCaptPoseT(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:298
Parameters for OP_Node::getInfoText()/OP_Node::getNodeSpecificInfoText()
virtual void transferLocalToPreTransform(fpreal gtime)
GLint y
Definition: glcorearb.h:102
fpreal ZDAMP(fpreal t)
Definition: OBJ_Bone.h:343
CH_StringMeaning getStringMeaning(int pi, int vi, fpreal t) const
fpreal getCaptPoseBoneLength(fpreal t)
Definition: OBJ_Bone.h:356
fpreal YROLLOFF(fpreal t)
Definition: OBJ_Bone.h:340
fpreal IKDAMPENING(fpreal t)
Definition: OBJ_Bone.h:332
virtual bool getParmTransform(OP_Context &context, UT_DMatrix4 &xform)
void setCRtopCap(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:270
fpreal CRBOTC(fpreal t, int i)
Definition: OBJ_Bone.h:353
void setZMIN(fpreal t, fpreal v)
Definition: OBJ_Bone.h:244
void setCRscale(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:263
png_uint_32 i
Definition: png.h:2877
fpreal BONELENGTH(fpreal t)
Definition: OBJ_Bone.h:322
fpreal CRTOPH(fpreal t)
Definition: OBJ_Bone.h:350
void SOLVER(UT_String &str)
Definition: OBJ_Bone.h:325
virtual void setScaleFromHandle(fpreal t, const UT_Vector3R &s, bool create_keys=false, int key_idx=-1, bool check_modified=true)
static PRM_Template * getTemplateList(OBJ_ParmsStyle style)
fpreal XMIN(fpreal t)
Definition: OBJ_Bone.h:333
#define EVAL_INT(name, idx, vi, t)
Definition: OBJ_Bone.h:83
GLfloat f
Definition: glcorearb.h:1925
static PRM_Template * getObsolete()
#define SET_FLOAT(name, parm_index, vector_index, t, val)
Definition: OBJ_Bone.h:88
void setXMIN(fpreal t, fpreal v)
Definition: OBJ_Bone.h:236
void setXMAX(fpreal t, fpreal v)
Definition: OBJ_Bone.h:238
void setCaptPoseBoneLength(fpreal t, fpreal l)
Definition: OBJ_Bone.h:295
void setLinkDisplay(int onOff)
Definition: OBJ_Bone.h:220
fpreal XROLLOFF(fpreal t)
Definition: OBJ_Bone.h:336
void setUseSolver(int onoff)
Definition: OBJ_Bone.h:182
virtual void applyToCaptTransformAndDescendents(OP_Context &context, const UT_DMatrix4 &xform)
fpreal getCaptPoseRx(fpreal t)
Definition: OBJ_Bone.h:361
virtual int applyInputIndependentTransform(OP_Context &context, UT_DMatrix4 &mat)
virtual bool getParmTransformTranslates(OP_Context &context, UT_DMatrix4 &xform)
int isUsingSolver() const
Definition: OBJ_Bone.h:186
fpreal getCaptPoseRy(fpreal t)
Definition: OBJ_Bone.h:362
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
int getChildToWorldRestTransform(const char *frame, UT_DMatrix4 &xform, fpreal t)
Definition: OBJ_Bone.h:170
void setZMAX(fpreal t, fpreal v)
Definition: OBJ_Bone.h:246
fpreal getCaptPoseSz(fpreal t)
Definition: OBJ_Bone.h:366
fpreal YDAMP(fpreal t)
Definition: OBJ_Bone.h:339
void setCRotate(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:258
fpreal CRSCALE(fpreal t, int i)
Definition: OBJ_Bone.h:349
virtual int getRelativeCaptureTransform(OP_Node &to, UT_Matrix4 &xform, OP_Context &context)
fpreal BONELENGTH(fpreal t, int thread)
Definition: OBJ_Bone.h:323
GLboolean * data
Definition: glcorearb.h:130
virtual int * getIndirect() const
Definition: OBJ_Bone.h:480
GLuint const GLchar * name
Definition: glcorearb.h:785
#define EVAL_STR(name, idx, vi, t)
Definition: OBJ_Bone.h:85
virtual bool getParmTransformScales(OP_Context &context, UT_DMatrix4 &xform)
fpreal YMIN(fpreal t)
Definition: OBJ_Bone.h:337
static OP_Node * myConstructor(OP_Network *net, const char *name, OP_Operator *entry)
fpreal ZMAX(fpreal t)
Definition: OBJ_Bone.h:342
void setCRbotCap(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:277
OBJ_BoneIndex
Definition: OBJ_Bone.h:28
virtual void fillInfoTreeNodeSpecific(UT_InfoTree &tree, const OP_NodeInfoTreeParms &parms) override
static KinOverride getGlobalKinOverride()
Definition: OBJ_Bone.h:377
double fpreal
Definition: SYS_Types.h:270
fpreal getCaptPoseTy(fpreal t)
Definition: OBJ_Bone.h:359
fpreal ZROLLOFF(fpreal t)
Definition: OBJ_Bone.h:344
void setCaptureDisplay(int onOff)
Definition: OBJ_Bone.h:250
Parameters for OP_Node::fillInfoTree()/OP_Node::fillInfoTreeNodeSpecific()
virtual int applyPreTransform(OP_Context &context, UT_DMatrix4 &mat)
virtual void transferLocalToPreTransformRotates(fpreal gtime)
Transfers only the rotate portion of the matrix to pre-transform.
typedef int
Definition: png.h:1175
virtual int isObjectRenderable(fpreal t) const
SYS_FORCE_INLINE void REST(fpreal *v, fpreal t, int stid)
Definition: OBJ_Bone.h:330
#define EVAL_FLOATS_T(name, idx, v, t, stid)
Definition: OBJ_Bone.h:81
fpreal CRCEN(fpreal t, int i)
Definition: OBJ_Bone.h:347
#define EVAL_FLOAT(name, idx, vi, t)
Definition: OBJ_Bone.h:75
static UT_XformOrder XFORM_ORDER
Definition: OBJ_Bone.h:104
fpreal getCaptPoseTx(fpreal t)
Definition: OBJ_Bone.h:358
fpreal getCaptPoseSx(fpreal t)
Definition: OBJ_Bone.h:364
fpreal getCaptPoseRz(fpreal t)
Definition: OBJ_Bone.h:363
void setCRcenter(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:253
fpreal CRTOPC(fpreal t, int i)
Definition: OBJ_Bone.h:351
GLint GLenum GLint x
Definition: glcorearb.h:408
virtual void setRotateFromHandle(fpreal t, const UT_Vector3R &r, bool create_keys=false, int key_idx=-1, bool check_modified=true)
GLuint GLfloat * val
Definition: glcorearb.h:1607
#define SET_FLOATREF(name, vector_index, t, val)
Definition: OBJ_Bone.h:90
void setYMAX(fpreal t, fpreal v)
Definition: OBJ_Bone.h:242
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
virtual int buildLookAt(OP_Context &context, const UT_DMatrix4 &world, UT_DMatrix4 &lookat, OP_Node *interest=0)
fpreal getCaptPoseSy(fpreal t)
Definition: OBJ_Bone.h:365
virtual int keepWorldTransform(OP_Context &context, const UT_DMatrix4 &world_xform)
void REST(fpreal *v, fpreal t)
Definition: OBJ_Bone.h:328
virtual OBJ_Bone * castToOBJBone()
Definition: OBJ_Bone.h:476
GLboolean r
Definition: glcorearb.h:1221
#define EVAL_FLOATS(name, idx, v, t)
Definition: OBJ_Bone.h:79
void setRestY(fpreal t, fpreal v)
Definition: OBJ_Bone.h:226
CH_StringMeaning SOLVERmeaning()
Definition: OBJ_Bone.h:326
void setCaptPoseR(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:303
void setRestX(fpreal t, fpreal v)
Definition: OBJ_Bone.h:224
virtual OBJ_OBJECT_TYPE getObjectType() const
#define OBJ_API
Definition: OBJ_API.h:10
static const char ** getReferenceFrames()
Definition: OBJ_Bone.h:387
void setCaptPoseS(fpreal t, fpreal x, fpreal y, fpreal z)
Definition: OBJ_Bone.h:308
virtual bool getParmTransformRotates(OP_Context &context, UT_DMatrix4 &xform)
void setCRtopHeight(fpreal t, fpreal v)
Definition: OBJ_Bone.h:268
void setRestZ(fpreal t, fpreal v)
Definition: OBJ_Bone.h:228
OBJ_OBJECT_TYPE
Definition: OBJ_Node.h:71
fpreal ZMIN(fpreal t)
Definition: OBJ_Bone.h:341
#define SET_STRING(val, meaning, name, parm_index, vector_index, t)
Definition: OBJ_Bone.h:94
GLuint GLsizei GLsizei * length
Definition: glcorearb.h:794
void setSOLVER(const char *solver, CH_StringMeaning meaning)
Definition: OBJ_Bone.h:231
fpreal CRBOTH(fpreal t)
Definition: OBJ_Bone.h:352