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