Interface to IK constraint data.
#include <AlConstraint.h> class AlConstraint : public AlObject , public AlAnimatable virtual ~AlConstraint(); virtual statusCode deleteObject(); virtual AlObjectType type() const; virtual AlAnimatable* asAnimatablePtr( void ); AlConstraint* next( void ) const; boolean on() const; double weight() const; boolean isUVConstraint() const; statusCode uv( double[2] ) const; statusCode setOn( boolean ); statusCode setWeight( double ); statusCode setUV( double[2] ); AlDagNode* sourceNode( void ) const; AlDagNode* destinationNode( void ) const;
The AlConstraint class allows access to the IK constraint information on an AlJoint.
(See the discussion of skeletons, joints, constraints, ik, and so on, in the printed reference manuals for a full description.)
Briefly, the constraint data constrains the joint node to another object. The constraint can be a point constraint, an orientation constraint, or an aim constraint.
This is the base class for constraints. Point, orientation, and aim constraints are derived from this class.
Destructor for the AlConstraint wrapper.
Destructor for AlConstraint.
sSuccess - the constraint was deleted
sInvalidObject - the constraint was invalid
sFailure - the constraint could not be deleted
Returns the class identifier kConstraintType;
Returns the next constraint after this one. If no constraint follows, NULL is returned.
Indicates whether this constraint is active or not.
TRUE - this constraint is active
FALSE - this constraint is not active
Returns the weight on this constraint. The weight will be between 0.0 and 100.0 inclusive (or -1 on error).
This method returns TRUE if the constraint is an uv constraint.
This method returns uv values of the uv constraint.
> uv[2] - the u and v parameter of the constraint. If the dest node is a curve, only uv[0] is valid.
sSuccess - the uv or u parameter(s) were returned
sInvalidArgument - the uv was NULL
sInvalidObject - this constraint is invalid or is not a uv constraint
sFailure - this constraint is not a uv constraint.
Returns the AlDagNode that the constraint is on.
Returns the AlDagNode that the source node is constrained to.
Turns the effect of the constraint on or off.
< onOff - TRUE turns the effect on, FALSE turns it off
sSuccess - effect set
sInvalidObject - object invalid
Sets the weight of the constraint. The weight must be between 0.0 and 100.0 inclusive. If the weight is outside this range it will be clipped.
< weight - the percentage effect of this constraint
sSuccess - weight set
sInvalidObject - object invalid
Sets the constraint’s uv values.
< uv[2] - the u and v parameter for the constraint.
sSuccess - the uv or u parameter(s) were set
sInvalidArgument - the uv was NULL
sInvalidObject - this constraint is invalid or is not a uv constraint
sFailure - this constraint is not a uv constraint