MFnLattice Class Reference
[OpenMayaAnim - API module for animationFunctionSet classes]

#include <MFnLattice.h>
Inheritance diagram for MFnLattice:
Inheritance graph
[legend]
Collaboration diagram for MFnLattice:
Collaboration graph
[legend]

List of all members.


Detailed Description

Lattice function set.

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.

Examples:

latticeNoiseCmd.cpp, and latticeNoiseNode.cpp.


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.

Constructor & Destructor Documentation

MFnLattice::~MFnLattice (  )  [virtual]

Destructor.

Class destructor.

MFnLattice::MFnLattice ( MObject object,
MStatus ReturnStatus = NULL  
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in]  object  The MObject to attach the function set to
[out]  ReturnStatus  the return status
Status Codes:

MFnLattice::MFnLattice ( const MDagPath object,
MStatus ReturnStatus = NULL  
)

Constructor.

Class constructor that initializes the function set to the given constant MDagPath object.

Parameters:
[in]  object  The const MDagPath to attach the function set to
[out]  ReturnStatus  The return status
Status Codes:

MFnLattice::MFnLattice ( const MObject object,
MStatus ReturnStatus = NULL  
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters:
[in]  object  The MObject to attach the function set to
[out]  ReturnStatus  the return status
Status Codes:

Member Function Documentation

MFn::Type MFnLattice::type (  )  const [virtual]

Function set type.

Return the class type : MFn::kLattice

Reimplemented from MFnDagNode.

const char * MFnLattice::className (  )  const [protected, virtual]

Class name.

Return the class name : "MFnLattice"

Reimplemented from MFnDagNode.

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.

Parameters:
[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.
Returns:
A handle to the new lattice data, lattice node or transform node. See the discussion of the parentOrOwner parameter above for more details.
Status Codes:

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

Parameters:
[in]  sSize  size in s dimension
[in]  tSize  size in t dimension
[in]  uSize  size in u dimension
Returns:
Return status
Status Codes:

MStatus MFnLattice::getDivisions ( unsigned int &  s,
unsigned int &  t,
unsigned int &  u  
)

Get the number of divisions in the lattice

Parameters:
[out]  s  divisions in s dimension
[out]  t  divisions in t dimension
[out]  u  divisions in u dimension
Returns:
Return status
Status Codes:

MStatus MFnLattice::setDivisions ( unsigned int  s,
unsigned int  t,
unsigned int  u  
)

Set the number of divisions in the lattice

Parameters:
[in]  s  divisions in s dimension
[in]  t  divisions in t dimension
[in]  u  divisions in u dimension
Returns:
Return status
Status Codes:

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

Parameters:
[in]  s  s index
[in]  t  t index
[in]  u  u index
[out]  ReturnStatus  return status
Returns:
The point
Status Codes:

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6