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