Interface to joint node data.
#include <AlJoint.h>
class AlJoint : public AlObject
virtual ~AlJoint();
virtual AlObject* copyWrapper() const;
virtual AlObjectType type() const;
AlIKHandle* endEffectorHandle( void ) const;
AlIKHandle* firstRootHandle( void ) const;
AlIKHandle* nextRootHandle( const AlIKHandle* ) const;
statusCode nextRootHandleD( AlIKHandle* ) const;
statusCode applyIteratorToRootHandles( AlIterator*, int& );
statusCode useTransforms( boolean[3], boolean[3] ) const;
statusCode useLimits( boolean[3], boolean[3] ) const;
statusCode rotation( double[3], double[3], int[3] ) const;
statusCode translation( double[3], double[3], int[3] ) const;
statusCode restPose( double[3], double[3] ) const;
statusCode setUseTransforms( const boolean[3], const boolean[3] );
statusCode setUseLimits( const boolean[3], const boolean[3] );
statusCode setRotation( const double[3], const double[3], const int[3] );
statusCode setTranslation( const double[3], const double[3], const int[3] );
statusCode setRestPose( const double[3], const double[3] );
statusCode assumeRestPose( void );
boolean charJoint() const;
statusCode charJointLimits(double&, double&, AlJointInterpolationType&) const;
boolean useBulge() const;
statusCode bulgeAttributes(int*, int*, double*, AlBulgeSections*, int*, int*, AlDagNodeFields*, AlBulgeRelateTo*, char*, double*) const;
statusCode setCharJoint(boolean);
statusCode setCharJointLimits(double, double, AlJointInterpolationType);
statusCode setUseBulge(boolean);
statusCode setBulgeAttributes(int, int, double, AlBulgeSections, int, int, AlDagNodeFields, AlBulgeRelateTo, const char *, double);
AlDagNode* dagNode( void ) const;
The AlJoint class allows access to the joint information on an AlDagNode.
The joint node is used by the inverse kinematic algorithm to define properties of a joint. The character joint attributes are used to define properties of the bone below the joint for skinning operations. See the Alias reference books for information on skeletons, joints, constraints, IK, and character builder.
In general, minimum values must be less than maximum values and stiffness values must be between 0 and 100 inclusive.
AlIKHandle* AlJoint::nextRootHandle( const AlIKHandle* ali ) const
statusCode AlJoint::nextRootHandleD( AlIKHandle* ali ) const
statusCode AlJoint::applyIteratorToRootHandles( AlIterator* iter, int& rc )
Applies the passed-in iterator (AlIterator) to the collection of AlIKHandles that have their roots at this AlJoint. See the documentation for AlIterator for more information.
statusCode AlJoint::useTransforms( boolean translations[3], boolean rotations[3]) const
Used to determine which transformations may be used on the joint. Transformations may be toggled on or off using the setUseTransforms() method. If this joint is the root of a single chain IK handle, then all three rotations must be used.
statusCode AlJoint::useLimits( boolean translations[3], boolean rotations[3]) const
Used to determine whether the limits for the joint transformations should be used. The use of the limits can be toggled on or off using the setUseLimits() method.
statusCode AlJoint::rotation( double Min[3], double Max[3], int stiffness[3] ) const
Used to determine min and max rotations for this joint, as well as the stiffness of the rotations. These values can be set using the setRotation() method.
statusCode AlJoint::translation( double Min[3], double Max[3], int stiffness[3] ) const
Used to determine min and max translations for this joint, as well as the stiffness of the translations. These values can be set using the setTranslation() method.
statusCode AlJoint::restPose( double rotRest[3], double transRest[3] ) const
Used to get rest pose of rotations and translations for this joint. These values can be set using the setRestPose() method.
statusCode AlJoint::setUseTransforms( const boolean translations[3], const boolean rotations[3] )
Used to toggle on or off which transformations may be used on the joint. TRUE means that the transformation is toggled on and FALSE means that it is toggled off.
statusCode AlJoint::setUseLimits(const boolean translations[3], const boolean rotations[3] )
Used to toggle on or off whether the limits for the joint transformations should be used. TRUE means that the transformation limits are toggled on and FALSE means that they are toggled off.
statusCode AlJoint::setRotation( const double Min[3], const double Max[3], const int stiffness[3] )
Used to set min and max rotations for this joint, as well as the stiffness of the rotations. The min must be less than the max, and the stiffness must be between 0 and 100 inclusive.
statusCode AlJoint::setTranslation( const double Min[3], const double Max[3], const int stiffness[3] )
Used to set min and max translations for this joint, as well as the stiffness of the translations. The min must be less than the max, and the stiffness must be between 0 and 100 inclusive.
statusCode AlJoint::setRestPose( const double rot_rest[3], const double trans_rest[3] )
Used to set rest pose of rotations and translations for this joint. If the min and max are out of rest pose, they will be adjusted to the rest pose.
Note:
If this function is used on a hierarchy of joints (a skeleton), single-chain IK handles attached to this skeleton may also need to be set with proper rest poses by using AlIKHandle::setRestRotation().
statusCode AlJoint::charJointLimits(double &upper, double &lower, AlJointInterpolationType &interpolation) const
Returns the upper and lower limits of the character joint bounds around this joint. It also returns the interpolation type used to interpolate cluster percentages on the CVs between the lower and upper bound.
statusCode AlJoint::bulgeAttributes(int *bulgeCode, int *bulgeOrient, double *bulgeScale, AlBulgeSections *bulgeSections, int *sectionsAround, int *sectionsAlong, AlDagNodeFields *relateToParameter, AlBulgeRelateTo *relateTo, char *relateToNode, double *bulgeRange) const
Used to get the bulge attributes on a character joint. If any argument is NULL, then the attributes are not returned. Note that if the ’relateToNode’ parameter is non-NULL, then a strcpy() will be used to assign the name of the node. It is up to the caller of this routine to ensure that enough memory is allocated by relateToNode.
statusCode AlJoint::setCharJointLimits(double upper, double lower,AlJointInterpolationType interpolation)
Sets the upper and lower joint bounds limits on the character joint. These bounds are the percentage along the bone above and below the joint. The values must be between 0 and 1. It also sets the interpolation type to be used between these two bounds.
statusCode AlJoint::setBulgeAttributes(int bulgeCode, int bulgeOrient, double bulgeScale, AlBulgeSections bulgeSections, int sectionsAround, int sectionsAlong, AlDagNodeFields relateToParameter, AlBulgeRelateTo relateTo, const char *relateToNode, double bulgeRange)
Used to set the bulge attributes for a character joint. The bulge attributes apply to the bone(s) below this joint. Each of the bulge attributes are described below
bulgeCode |
this is the code that identifies which bulge type will be used to create the bulge on the bone below this character joint. The bulge code can be found in the "bulge_types" file in the ’misc_data’ directory of the current project. |
bulgeOrient |
this value should be 0 (X), 1 (Y) or 2 (Z). It represents the local axis to be used to specify the direction around the bone that should be considered 0 degrees, when defining a particular bulge type. The local axis associated with a bone is at the lower end of the bone. Thus, these bulging attributes define the bulge on the bone below this character joint, and the axis used is the local axis from the joint at the other (lower) end of this bone. |
bulgeScale |
this value will scale the value of the bulge at any point by this amount. |
bulgeSections |
when doing a character builder "attach", the clusters that do the bulge can be placed one per "knot" on the defining bulge type (kBulgeDefinition), or evenly spaced around and along the bone (kBulgeEvenlySpaced). In the latter case, the number of clusters created will be up to sectionsAround*sectionsAlong. |
sectionsAround |
if bulgeSections is kBulgeEvenlySpaced, this defines the number of subdivisions around the bone. |
sectionsAlong |
if bulgeSections is kBulgeEvenlySpaced, this defines the number of subdivisions along the bone. |
relateToParameter |
when a bulge is created on a skin, expressions are created on clusters. This parameter defines the animation parameter of the node which the expression will use. |
relateTo |
if relateTo is kBulgeLowerJoint, then the expression on the cluster defining the bulge will be the joint node that is at the other end of the bone from this character joint. If relateTo is kBulgeOtherNode, then the node used in the expression will be the one defined by relateToNode. |
relateToNode |
See explanation for relateTo. A copy of this string is made. |
bulgeRange |
When an expression is created, the bulging on the bone will occur when the value of the joint used in the expression is between its current value, and its current value plus bulgeRange. |