C++ API Reference
|
Iterator for NURBS curve CVs. More...
#include <MItCurveCV.h>
Public Member Functions | |
MItCurveCV (MObject &curve, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MItCurveCV (const MDagPath &curve, MObject &component=MObject::kNullObj, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
virtual | ~MItCurveCV () |
Class destructor. More... | |
bool | isDone (MStatus *ReturnStatus=NULL) const |
Returns true if the iteration is finished, i.e. More... | |
MStatus | next () |
Advance to the next CV in the iteration. More... | |
MStatus | reset () |
Reset the iterator to the first CV. More... | |
MStatus | reset (MObject &curve) |
Reset the iterator to the specified curve. More... | |
MStatus | reset (const MDagPath &curve, MObject &component=MObject::kNullObj) |
Reset the iterator to the specified curve and component. More... | |
MPoint | position (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
Return the position of the current CV. More... | |
MStatus | setPosition (const MPoint &pt, MSpace::Space space=MSpace::kObject) |
Set the position of the current CV to the specified point. More... | |
MStatus | translateBy (const MVector &vec, MSpace::Space space=MSpace::kObject) |
Translates the current CV by the amount specified in vec. More... | |
int | index (MStatus *ReturnStatus=NULL) const |
This method returns the index of the current CV in the CV array for this curve. More... | |
MObject | cv (MStatus *ReturnStatus=NULL) const |
This method is obsolete. More... | |
MObject | currentItem (MStatus *ReturnStatus=NULL) const |
This method returns the current CV as an MObject. More... | |
bool | hasHistoryOnCreate (MStatus *ReturnStatus=NULL) const |
This method determines if the shape was created with history. More... | |
MStatus | updateCurve () |
This method is used to signal the curve that it has been changed and needs to redraw itself. More... | |
Static Public Member Functions | |
static const char * | className () |
Returns the name of this class. More... | |
Iterator for NURBS curve CVs.
This class is the iterator class for NURBS curve control vertices (CVs). The iteration can be for a given curve or for a group of CVs.
Example: Translates the CVs for a curve in the X direction (world space).
MItCurveCV | ( | MObject & | curve, |
MStatus * | ReturnStatus = NULL |
||
) |
Constructor.
This constructor is used when iterating over an entire curve.
[in] | curve | The curve for the iteration |
[out] | ReturnStatus | Status code |
MItCurveCV | ( | const MDagPath & | curve, |
MObject & | component = MObject::kNullObj , |
||
MStatus * | ReturnStatus = NULL |
||
) |
Constructor.
This constructor is used when iterating over a group of CVs. If the component is not given then the iteration will be for the whole curve.
[in] | curve | Dag path to the curve for the iteration |
[in] | component | A group of CVs to be iterated on |
[out] | ReturnStatus | Status code |
|
virtual |
Class destructor.
Deallocates memory used by this iterator.
bool isDone | ( | MStatus * | ReturnStatus = NULL | ) | const |
Returns true if the iteration is finished, i.e.
there are no more CVs to iterate on.
[out] | ReturnStatus | Status code |
MStatus next | ( | ) |
Advance to the next CV in the iteration.
If the iterator is already at the last CV then this method has no effect. Use isDone to determine if the iterator is at the last CV.
MStatus reset | ( | ) |
Reset the iterator to the first CV.
Reset the iterator to the specified curve.
[in] | curve | The curve for the iteration |
MStatus reset | ( | const MDagPath & | curve, |
MObject & | component = MObject::kNullObj |
||
) |
Reset the iterator to the specified curve and component.
The component is a group of CVs belonging to the specified curve. The component defaults to MObject::kNullObj. If a component is not given then the iterator will be reset for the whole curve.
[in] | curve | Dag path to the curve for the iteration |
[in] | component | A group of CVs to be iterated on |
MPoint position | ( | MSpace::Space | space = MSpace::kObject , |
MStatus * | ReturnStatus = NULL |
||
) | const |
Return the position of the current CV.
[in] | space | the co-oordinate system for the returned point |
[out] | ReturnStatus | Status code |
MStatus setPosition | ( | const MPoint & | pt, |
MSpace::Space | space = MSpace::kObject |
||
) |
Set the position of the current CV to the specified point.
[in] | pt | new position of CV |
[in] | space | the co-ordinate system for this transformation. |
MStatus translateBy | ( | const MVector & | vec, |
MSpace::Space | space = MSpace::kObject |
||
) |
Translates the current CV by the amount specified in vec.
[in] | vec | translation to be applied to the CV |
[in] | space | the co-oordinate system for this transformation. |
int index | ( | MStatus * | ReturnStatus = NULL | ) | const |
This method returns the index of the current CV in the CV array for this curve.
[out] | ReturnStatus | Status code |
This method is obsolete.
This method returns the current CV as an MObject.
[as of Maya 2019]
[out] | ReturnStatus | Status code |
This method returns the current CV as an MObject.
[out] | ReturnStatus | Status code |
bool hasHistoryOnCreate | ( | MStatus * | ReturnStatus = NULL | ) | const |
This method determines if the shape was created with history.
If the object that this iterator is attached to is not a shape then this method will fail.
[out] | ReturnStatus |
MStatus updateCurve | ( | ) |
This method is used to signal the curve that it has been changed and needs to redraw itself.
When modifying a large number of CVs, it is most efficient to call this method after all of the CVs have been modified.
|
static |
Returns the name of this class.