C++ API Reference

Component weight data. More...

#include <MWeight.h>

Public Member Functions

 MWeight ()
 Default constructor. More...
 
 MWeight (const MWeight &src)
 Copy constructor. More...
 
 ~MWeight ()
 Class destructor.
 
MWeightoperator= (const MWeight &other)
 Assignment operator. More...
 
float influence () const
 Current influence weight. More...
 
float seam () const
 Current seam weight. More...
 
void setInfluence (float influence)
 Set the influence weight. More...
 
void setSeam (float seam)
 Set the seam weight. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Detailed Description

Component weight data.

Methods for accessing component weight data. This class is currently only used to access soft select and symmetry selection weights. Other weight data (e.g. deformer weights) does not use this class and can be accessed through the corresponding MFn class or directly from the node's attributes.

Examples:
listRichSelectionCmd/listRichSelectionCmd.cpp, and richMoveCmd/richMoveCmd.cpp.

Constructor & Destructor Documentation

OPENMAYA_MAJOR_NAMESPACE_OPEN MWeight ( )

Default constructor.

Initialize the MWeight instance to fully weighted (i.e. as if the item has no weight associated with it).

MWeight ( const MWeight src)

Copy constructor.

Parameters
[in]srcThe source MWeight object.

Member Function Documentation

MWeight & operator= ( const MWeight src)

Assignment operator.

Parameters
[in]srcThe source MWeight object.
Returns
Reference to the MWeight
float influence ( ) const

Current influence weight.

Return the influence weight. This value controls how much of a given operation is applied to the entity associated with this weight structure. A value of 1 means the full effect should be applied. A value of 0 means the operation should not affect the entity at all.

Returns
The current influence weight
Examples:
apiMeshShape/apiMeshShape.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, and richMoveCmd/richMoveCmd.cpp.
float seam ( ) const

Current seam weight.

Return the seam weight. This value indicates how close the entity associated with this weight is to the plane of reflection (the seam), and hence, how strongly it should be associated with the seam. A value of 0 means the entity is free to move independent of the seam. A value of 1 means the entity is full on the seam, and should ideally maintain it's distance relative to the plane of symmetry. This value is only relevant when symmetry is enabled.

Returns
The current seam weight
Examples:
apiMeshShape/apiMeshShape.cpp, listRichSelectionCmd/listRichSelectionCmd.cpp, and richMoveCmd/richMoveCmd.cpp.
void setInfluence ( float  influence)

Set the influence weight.

Parameters
[in]influenceThe influence weight to set
void setSeam ( float  seam)

Set the seam weight.

Parameters
[in]seamThe seam weight to set
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files: