#include
<MPxIkSolverNode.h>
This is the base class for writing user-defined IK solvers. Users must at least override the following methods in order to write a solver:
userSolver::creator() { return new userSolver; }
In order to create and register the solver, execute the mel command:
createNode userSolver;
Once the solver is registered it can be assigned to IK handles and its solve methods will be called in the same manner as the solvers within Maya.
Public Member Functions |
|
virtual | ~MPxIkSolverNode () |
virtual MPxNode::Type | type () const |
virtual MStatus | preSolve () |
virtual MStatus | doSolve () |
virtual MStatus | postSolve (MStatus) |
virtual MString | solverTypeName () const |
bool | rotatePlane (MStatus *ReturnStatus=NULL) const |
MStatus | setRotatePlane (bool rotatePlane) |
bool | singleChainOnly (MStatus *ReturnStatus=NULL) const |
MStatus | setSingleChainOnly (bool singleChainOnly) |
bool | positionOnly (MStatus *ReturnStatus=NULL) const |
MStatus | setPositionOnly (bool positionOnly) |
bool | supportJointLimits (MStatus *ReturnStatus=NULL) const |
MStatus | setSupportJointLimits (bool supportJointLimits) |
bool | uniqueSolution (MStatus *ReturnStatus=NULL) const |
MStatus | setUniqueSolution (bool uniqueSolution) |
virtual bool | isSingleChainOnly () const |
This method is obsolete. |
|
virtual bool | isPositionOnly () const |
This method is obsolete. |
|
virtual bool | hasJointLimitSupport () const |
This method is obsolete. |
|
virtual bool | hasUniqueSolution () const |
This method is obsolete. |
|
virtual bool | groupHandlesByTopology () const |
This method is obsolete. |
|
virtual MStatus | setFuncValueTolerance (double tolerance) |
virtual MStatus | setMaxIterations (int value) |
MIkHandleGroup * | handleGroup () const |
virtual void | setHandleGroup (MIkHandleGroup *) |
const MMatrix * | toWorldSpace () const |
const MMatrix * | toSolverSpace () const |
double | funcValueTolerance () const |
int | maxIterations () const |
virtual void | snapHandle (MObject &handle) |
Protected Member Functions |
|
MStatus | getJointAngles (MDoubleArray &) const |
This method is not available in
Python. |
|
MStatus | setJointAngles (const MDoubleArray &) |
This method is not available in
Python. |
|
void | setToRestAngles () |
This method is not available in
Python. |
|
MPxIkSolverNode () |
MPxIkSolverNode::~MPxIkSolverNode | ( | ) | [virtual] |
Destructor.
MPxIkSolverNode::MPxIkSolverNode | ( | ) | [protected] |
Constructor.
MPxNode::Type MPxIkSolverNode::type | ( | ) | const [virtual] |
This method returns the type of the node. This method should not be overridden by the user. It will return MPxNode::kIkSolverNode.
Reimplemented from MPxNode.
MStatus MPxIkSolverNode::preSolve | ( | ) | [virtual] |
This method is called before doSolve. Users should override this method if there is any preprocessing that needs to be done before solving..
MStatus MPxIkSolverNode::doSolve | ( | ) | [virtual] |
This is where the main solving takes place. The user must override this method.
The purpose of this method is to calculate joint angles in a skeleton based upon the position of the end effector of the handle associated with this solver.
This method is called after doSolve has finished. The user should override this method if there are any post calculations to be done.
The status argument indicates whether doSolve was successful.
[out] | stat | The status returned from doSolve |
MString MPxIkSolverNode::solverTypeName | ( | ) | const [virtual] |
This method returns the type name of the solver. The user must override this method in order for the solver to be identifiable when it is registered.
Once the solver is registered, the type name can be used to assign the solver to an IK handle.
bool MPxIkSolverNode::rotatePlane | ( | MStatus * | ReturnStatus =
NULL |
) | const |
This method indicates whether this solver supports the rotate plane. Solvers that support the rotate plane allow the user to manipulate the IK handle's pole vector with the rotate plane manipulators.
MStatus MPxIkSolverNode::setRotatePlane | ( | bool | rotatePlane | ) |
This method sets whether or not this solver supports the rotate plane. Solvers that support the rotate plane allow the user to manipulate the IK handle's pole vector with the rotate plane manipulators.
[in] | rotatePlane | whether or not the solver supports the rotate plane |
bool MPxIkSolverNode::singleChainOnly | ( | MStatus * | ReturnStatus =
NULL |
) | const |
This method indicates whether this solver is a single chain solver. Single chain solvers are solvers which act on one handle only, i.e. the handle groups have only one handle if they are for single chain solvers.
MStatus MPxIkSolverNode::setSingleChainOnly | ( | bool | singleChainOnly | ) |
This method sets whether or not this solver is a single chain solver. Single chain solvers are solvers which act on one handle only, i.e. the handle groups have only one handle if they are for single chain solvers.
[in] | singleChainOnly | whether or not the solver is a single chain solver |
bool MPxIkSolverNode::positionOnly | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Indicates whether the ik solution is dependent on the ikHandle position only or also uses the orientation.
MStatus MPxIkSolverNode::setPositionOnly | ( | bool | positionOnly | ) |
Sets whether or not the solver supports handle orientation.
[in] | positionOnly | whether or not the solver is positionOnly |
bool MPxIkSolverNode::supportJointLimits | ( | MStatus * | ReturnStatus =
NULL |
) | const |
This method indicates whether the solver supports limits on joint angles.
MStatus MPxIkSolverNode::setSupportJointLimits | ( | bool | supportJointLimits | ) |
This method sets whether or not the solver supports limits on joint angles.
[in] | supportJointLimits | whether or not the solver supports joint limits |
bool MPxIkSolverNode::uniqueSolution | ( | MStatus * | ReturnStatus =
NULL |
) | const |
This method indicates whether the solver provides a unique solution.
MStatus MPxIkSolverNode::setUniqueSolution | ( | bool | uniqueSolution | ) |
This method sets whether or not the solver provides a unique solution.
[in] | uniqueSolution | whether or not the solver provides a unique solution |
bool MPxIkSolverNode::isSingleChainOnly | ( | ) | const [virtual] |
This method is obsolete.
This method indicates whether this solver is a single chain solver. Single chain solvers are solvers which act on one handle only, i.e. the handle groups have only one handle if they are for single chain solvers.bool MPxIkSolverNode::isPositionOnly | ( | ) | const [virtual] |
This method is obsolete.
Indicates whether the solver supports handle orientation. This method must be overriden to reflect the users solver.bool MPxIkSolverNode::hasJointLimitSupport | ( | ) | const [virtual] |
This method is obsolete.
This method indicates whether the solver supports limits on joint angles. This method must be overriden to reflect the users solver.bool MPxIkSolverNode::hasUniqueSolution | ( | ) | const [virtual] |
This method is obsolete.
This method indicates whether the solver provides a unique solution. This method must be overriden to reflect the users solver.bool MPxIkSolverNode::groupHandlesByTopology | ( | ) | const [virtual] |
This method is obsolete.
Indicates whether the IK system should group handles according to skeletal topology. This method must be overriden to reflect the users solver.MStatus MPxIkSolverNode::setFuncValueTolerance | ( | double | tolerance | ) | [virtual] |
Set the error value for this solver. The user can override this if any other calcluations should be done here.
[in] | tolerance | Error value |
MStatus MPxIkSolverNode::setMaxIterations | ( | int | value | ) | [virtual] |
Set the maximum iterations for a solution by this solver. The user can override this if any other calcluations should be done here.
[in] | value | value to set |
MIkHandleGroup * MPxIkSolverNode::handleGroup | ( | ) | const |
Returns the handle group for this solver. The handle group provides access to handles associated with the solver.
void MPxIkSolverNode::setHandleGroup | ( | MIkHandleGroup * | group | ) | [virtual] |
Set the handle group of this solver.
[in] | group | The handle group to be set |
const MMatrix * MPxIkSolverNode::toWorldSpace | ( | ) | const |
Returns the world space matrix for this solver.
const MMatrix * MPxIkSolverNode::toSolverSpace | ( | ) | const |
Returns the local space matrix for this solver.
double MPxIkSolverNode::funcValueTolerance | ( | ) | const |
Return the error value for this solver.
int MPxIkSolverNode::maxIterations | ( | ) | const |
Return the the maximum nuber of itertations for a solution by this solver.
void MPxIkSolverNode::snapHandle | ( | MObject & | handle | ) | [virtual] |
This function positions the handle at the end effector position. The user can override this method.
[in] | handle | handle to be set |
MStatus MPxIkSolverNode::getJointAngles | ( | MDoubleArray & | angles | ) | const [protected] |
This method is not available in Python.
Returns the joint angles. Use MPxIkSolverNode::_getJointAngles in scripts.
[out] | angles | The array of doubles to hold the angles. |
MStatus MPxIkSolverNode::setJointAngles | ( | const MDoubleArray & | angles | ) | [protected] |
This method is not available in Python.
Set joint angles to the given values. Use MPxIkSolverNode::_setJointAngles in scripts.
[in] | angles | The array of angles to set the joints to. |
void MPxIkSolverNode::setToRestAngles | ( | ) | [protected] |
This method is not available in Python.
Sets all joints to thier prefered orientations. Use MPxIkSolverNode::_setToRestAngles in scripts.
Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |