#include
<MFnLattice.h>
MFnLattice is the function set for lattice shapes and lattice geometry. It can be used on lattices in the DAG or on lattice geometry from a dependency node attribute.
Lattices are most commonly used for specifying FFDs (free-form deformations). See MFnLatticeDeformer for more information on those.
MFnLatticeData can be used to create new lattice data objects for use with dependency node attributes.
Public Member Functions |
|
virtual MFn::Type | type () const |
Function set type. |
|
virtual | ~MFnLattice () |
Destructor. |
|
MFnLattice () | |
Default constructor. |
|
MFnLattice (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
MFnLattice (const MDagPath &object, MStatus *ret=NULL) | |
Constructor. |
|
MObject | create (unsigned int xDiv, unsigned int yDiv, unsigned int zDiv, MObject parentOrOwner=MObject::kNullObj, MStatus *ReturnStatus=NULL) |
MStatus | reset (double sSize=1.0, double tSize=1.0, double uSize=1.0) |
MStatus | getDivisions (unsigned int &s, unsigned int &t, unsigned int &u) |
MStatus | setDivisions (unsigned int s, unsigned int t, unsigned int u) |
MPoint & | point (unsigned int s, unsigned int t, unsigned int u, MStatus *ReturnStatus=NULL) |
MFnLattice (const MObject &object, MStatus *ret=NULL) | |
Constructor. |
|
Protected Member Functions |
|
virtual const char * | className () const |
Class name. |
MFnLattice::~MFnLattice | ( | ) | [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 MFnLattice::type | ( | ) | const [virtual] |
const char * MFnLattice::className | ( | ) | const [protected, virtual] |
MObject MFnLattice::create | ( | unsigned int | xDiv, | |
unsigned int | yDiv, | |||
unsigned int | zDiv, | |||
MObject | parentOrOwner = MObject::kNullObj , |
|||
MStatus * | ReturnStatus =
NULL |
|||
) |
Create a new lattice. This can be used to create either a new lattice shape in the DAG, or to place new lattice geometry into a dependency graph lattice data object. Lattice data objects can be created with MFnLatticeData or can be obtained from an MDataHandle in the compute method of a dependency node.
The parentOrOwner argument is used to specify the owner of the new lattice.
If parentOrOwner is a kLatticeData data wrapper (e.g. as returned by MFnLatticeData::create) then a new kLattice object will be created and placed inside the wrapper. No nodes will be created and the method will return the kLattice object.
If parentOrOwner is NULL then new lattice and transform nodes will be created and added to the DAG, with the lattice parented under the transform. The method will return the transform node.
If parentOrOwner is a DAG node then a new lattice node will be created and parented under that DAG node. The method will return the lattice node.
[in] | xDiv | Lattice divisions in x (must be at least 2). |
[in] | yDiv | Lattice divisions in y (must be at least 2). |
[in] | zDiv | Lattice divisions in z (must be at least 2). |
[in] | parentOrOwner | Parent node or data wrapper. See discussion above. |
[out] | ReturnStatus | Status code. |
MStatus MFnLattice::reset | ( | double | sSize = 1.0 , |
|
double | tSize = 1.0 , |
|||
double | uSize = 1.0 |
|||
) |
Reset the lattice points to a uniform parallelipiped shape with the specified dimensions: sSize x tSize x uSize
[in] | sSize | size in s dimension |
[in] | tSize | size in t dimension |
[in] | uSize | size in u dimension |
MStatus MFnLattice::getDivisions | ( | unsigned int & | s, | |
unsigned int & | t, | |||
unsigned int & | u | |||
) |
Get the number of divisions in the lattice
[out] | s | divisions in s dimension |
[out] | t | divisions in t dimension |
[out] | u | divisions in u dimension |
MStatus MFnLattice::setDivisions | ( | unsigned int | s, | |
unsigned int | t, | |||
unsigned int | u | |||
) |
Set the number of divisions in the lattice
[in] | s | divisions in s dimension |
[in] | t | divisions in t dimension |
[in] | u | divisions in u dimension |
MPoint & MFnLattice::point | ( | unsigned int | s, | |
unsigned int | t, | |||
unsigned int | u, | |||
MStatus * | ReturnStatus =
NULL |
|||
) |
Returns the point in the lattice that is at the given indices
[in] | s | s index |
[in] | t | t index |
[in] | u | u index |
[out] | ReturnStatus | return status |
Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |