#include <MFnIkHandle.h>
This is the function set for inverse kinematics (IK) handles. An ik handle specifies the joints in a skeleton that are effected by an attached ik solver.
Public Types | |
enum | Stickiness { kStickyOff, kStickyOn, kSuperSticky } |
Specifies a handle's stickiness when the skeleton is being manipulated interactively. More... | |
Public Member Functions | |
virtual MFn::Type | type () const |
Function set type. | |
virtual | ~MFnIkHandle () |
Destructor. | |
MFnIkHandle () | |
Default constructor. | |
MFnIkHandle (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. | |
MFnIkHandle (const MDagPath &object, MStatus *ret=NULL) | |
Constructor. | |
MObject | create (MDagPath &startJoint, MDagPath &effector, MStatus *ReturnStatus=NULL) |
MStatus | getStartJoint (MDagPath &jointPath) |
MStatus | setStartJoint (const MDagPath &jointPath) |
MStatus | getEffector (MDagPath &effectorPath) |
MStatus | setEffector (const MDagPath &effectorPath) |
MStatus | setStartJointAndEffector (const MDagPath &jointPath, const MDagPath &effectorPath) |
unsigned int | priority (MStatus *ReturnStatus=NULL) |
MStatus | setPriority (unsigned int priority) |
Stickiness | stickiness (MStatus *ReturnStatus=NULL) |
MStatus | setStickiness (Stickiness stickiness) |
double | weight (MStatus *ReturnStatus=NULL) |
MStatus | setWeight (double weight) |
double | poWeight (MStatus *ReturnStatus=NULL) |
MStatus | setPOWeight (double weight) |
MObject | solver (MStatus *ReturnStatus=NULL) |
MStatus | setSolver (const MObject &solver) |
MStatus | setSolver (const MString &solverName) |
MFnIkHandle (const MObject &object, MStatus *ret=NULL) | |
Constructor. | |
Protected Member Functions | |
virtual const char * | className () const |
Class name. |
MFnIkHandle::~MFnIkHandle | ( | ) | [virtual] |
Destructor.
Class destructor.
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
Constructor.
Class constructor that initializes the function set to the given constant MDagPath object.
[in] | object | The const MDagPath to attach the function set to |
[out] | ReturnStatus | The return status |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnIkHandle::type | ( | ) | const [virtual] |
const char * MFnIkHandle::className | ( | ) | const [protected, virtual] |
MObject MFnIkHandle::create | ( | MDagPath & | startJoint, | |
MDagPath & | effector, | |||
MStatus * | ReturnStatus = NULL | |||
) |
Creates a new ik handle. The effector and startJoint specify the joint chain controlled by this handle. The effector is the joint that is moved by the handle forcing the solver to recalculate the joint chain.
[in] | startJoint | a path to the start joint in the joint chain |
[in] | effector | a path to the end-effector (last joint) in the chain |
[out] | ReturnStatus | Status Code (see below) |
This method will get a dag path to the starting joint of the handle's joint chain.
[out] | jointPath | storage for the dag path to the joint |
This method will set the dag path for the starting joint of the handle's joint chain. The start joint must be on the same skeletal chain as the end effector or this method will fail.
[in] | jointPath | The dag path to the joint that will be set |
Get a dag path to the end-effector of the handle's joint chain.
[out] | effectorPath | Storage for the effector path |
Set the dag path to the end-effector of the handle's joint chain. The end-effector/joint must be on the same skeletal chain as the start joint or this method will fail.
The end effector may be specified with a joint or an end-effector. If a joint is used, an end-effector will be created at the same position as the joint and this new end-effector will be used as the end effector.
[in] | effectorPath | The path for the effector |
MStatus MFnIkHandle::setStartJointAndEffector | ( | const MDagPath & | jointPath, | |
const MDagPath & | effectorPath | |||
) |
This method will set the dag path for the starting joint and the end-effector of the handle's joint chain. This method must be used when setting the joints for a handle that are in a different skeletal chain then the current one.
The end effector may be specified with a joint or an end-effector. If a joint is used, an end-effector will be created at the same position as the joint and this new end-effector will be used as the end effector.
[in] | jointPath | The dag path to the joint that will be set |
[in] | effectorPath | The path for the effector |
unsigned int MFnIkHandle::priority | ( | MStatus * | ReturnStatus = NULL |
) |
Get the priority of this handle in case a solution is affected by more than one handle.
Logically, all handles with a lower number priority are solved before any handles with a higher numbered priority. (All handles of priority 1 are solved before any handles of priority 2 and so on.) Handle priorities must be > 0.
[out] | ReturnStatus | Status Code (see below) |
MStatus MFnIkHandle::setPriority | ( | unsigned int | priority | ) |
Set the priority of this handle in case a solution is affected by more than one handle
Logically, all handles with a lower number priority are solved before any handles with a higher numbered priority. (All handles of priority 1 are solved before any handles of priority 2 and so on.) Handle priorities must be > 0.
[in] | priority | The priority to set for this handle |
MFnIkHandle::Stickiness MFnIkHandle::stickiness | ( | MStatus * | ReturnStatus = NULL |
) |
Get the stickiness of this handle.
Sticky handles are solved when the skeleton is being manipulated interactively. If a character has sticky feet, the solver will attempt to keep them in the same position as the user moves the character's root. If they were not sticky, they would move along with the root.
[out] | ReturnStatus | Status Code (see below) |
MStatus MFnIkHandle::setStickiness | ( | Stickiness | stickiness | ) |
Set the stickiness of this handle. Sticky handles are solved when the skeleton is being manipulated interactively. If a character has sticky feet, the solver will attempt to keep them in the same position as the user moves the character's root. If they were not sticky, they would move along with the root.
[in] | stickiness | The stickiness value to be set. |
double MFnIkHandle::weight | ( | MStatus * | ReturnStatus = NULL |
) |
Get the handles weight in error calculations. The weight only applies when handle goals are in conflict and cannot be solved simultaneously. When this happens, a solution is computed that weights the "distance" from each goal to the solution by the handle's weight and attempts to minimize this value. The weight must be >= 0.
[out] | ReturnStatus | Status Code (see below) |
MStatus MFnIkHandle::setWeight | ( | double | weight | ) |
Specifies the handles weight in error calculations. The weight only applies when handle goals are in conflict and cannot be solved simultaneously. When this happens, a solution is computed that weights the "distance" from each goal to the solution by the handle's weight and attempts to minimize this value. The weight must be >= 0.
[in] | weight | The weight value to be set |
double MFnIkHandle::poWeight | ( | MStatus * | ReturnStatus = NULL |
) |
Gets the position/orientation weight of a handle. This is used to compute the "distance" between the goal position and the end-effector position.
A positionWeight of 1.0 computes the distance as the distance between positions only and ignores the orientations.
A positionWeight of 0.0 computes the distance as the distance between the orientations only and ignores the positions.
A positionWeight of 0.5 attempts to weight the distances equally but cannot actually compute this due to units differences. Because there is no way to add linear units and angular units.
[out] | ReturnStatus | Status Code (see below) |
MStatus MFnIkHandle::setPOWeight | ( | double | poWeight | ) |
Sets the position/orientation weight of a handle. This is used to compute the "distance" between the goal position and the end-effector position.
A positionWeight of 1.0 computes the distance as the distance between positions only and ignores the orientations.
A positionWeight of 0.0 computes the distance as the distance between the orientations only and ignores the positions.
A positionWeight of 0.5 attempts to weight the distances equally but cannot actually compute this due to units differences. Because there is no way to add linear units and angular units.
[in] | poWeight | The position/orientation weight to be set |
Returns the solver attached to this handle.
[out] | ReturnStatus | Status Code (see below) |
Set the solver for this handle.
[in] | solver | The solver for this handle |
Set the solver associated with this handle by name.
[in] | solverName | The type name of the solver to be set |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |