MPxSpringNode allows the creation and manipulation of dependency graph nodes representing a spring law. The class is a DAG node and Maya manages the drawing, creation, and selection of springs.
A user defined spring node is a DAG node that can have attributes and a applySpringLaw() method. To derive the full benefit of the MPxSpringNode class, it is suggested that you do not write your own compute() method. Instead, write the applySpringLaw() method. All of the parameters passed into this method will be supplied by Maya.
To create a user defined spring node, derive from this class and override the applySpringLaw() method. The other methods of the parent class MPxNode may also be overridden to perform dependency node capabilities.
Public Member Functions
|virtual MPxNode::Type||type () const|
|virtual MStatus||applySpringLaw (double stiffness, double damping, double restLength, double endMass1, double endMass2, const MVector &endP1, const MVector &endP2, const MVector &endV1, const MVector &endV2, MVector &forceV1, MVector &forceV2)|
Static Public Attributes
|from end weight attribute |
|to end weight attribute |
|delta time attribute |
|MPxNode::Type MPxSpringNode::type||(||)|| const
|const MVector &||endP1,|
|const MVector &||endP2,|
|const MVector &||endV1,|
|const MVector &||endV2,|
This method should be overridden in user defined nodes.
|[in]||stiffness||The strength with which springs are trying to maintain their length.|
|[in]||damping||How strongly the motion of springs are damped by the 'physical' properties of the springs. A larger value makes the springs converge faster to their rest length.|
|[in]||restLength||The length at which springs try to stay.|
|[in]||endMass1||The mass value at one end of the spring.|
|[in]||endMass2||The mass value at the other end of the spring.|
|[in]||endP1||The position of one end of the spring.|
|[in]||endP2||The position of the other end of the spring.|
|[in]||endV1||The velocity of one end of the spring.|
|[in]||endV2||The velocity of the other end of the spring.|
|[in]||forceV1||The output force vector at one end of the spring.|
|[in]||forceV2||The output force vector at the other end of the spring.|
|Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved.||Generated with 1.5.6|