C++ API Reference
|
NURBS surface CV iterator. More...
#include <MItSurfaceCV.h>
Public Member Functions | |
MItSurfaceCV (const MObject &surface, bool useURows=true, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
MItSurfaceCV (const MDagPath &surface, const MObject &component=MObject::kNullObj, bool useURows=true, MStatus *ReturnStatus=NULL) | |
Constructor. More... | |
virtual | ~MItSurfaceCV () |
Class destructor. | |
bool | isDone (MStatus *ReturnStatus=NULL) const |
Returns true if the iteration is finished, i.e. More... | |
bool | isRowDone (MStatus *ReturnStatus=NULL) const |
Returns true if the current row has no more CVs to iterate over. More... | |
MStatus | next () |
Advance to the next CV in the iteration. More... | |
MStatus | nextRow () |
Advance to the next row in the iteration. More... | |
MStatus | reset () |
Reset the iterator to the first CV. More... | |
MStatus | reset (const MObject &surface, bool useURows=true) |
Reset the iterator to iterate over all CVs on the specified surface. More... | |
MStatus | reset (const MDagPath &surface, const MObject &component=MObject::kNullObj, bool useURows=true) |
Reset the iterator to iterate over the CVs of the given surface that are specified in the given component. More... | |
MPoint | position (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) const |
Returns the position of the current CV in the iteration in the specified space. More... | |
MStatus | setPosition (const MPoint &point, MSpace::Space space=MSpace::kObject) |
Set the position of the current CV in the iteration to the specified point. More... | |
MStatus | translateBy (const MVector &vector, MSpace::Space space=MSpace::kObject) |
Move the current CV in the iteration by the sepcified vector. More... | |
int | index (MStatus *ReturnStatus=NULL) const |
Get the index of the current CV as it appears in CV array for this surface. More... | |
MStatus | getIndex (int &indexU, int &indexV) const |
Get the index of the current CV as it appears in CV array for this surface. More... | |
MObject | cv (MStatus *ReturnStatus=NULL) const |
This method is obsolete. More... | |
MObject | currentItem (MStatus *ReturnStatus=NULL) const |
Get the current CV in the iteration as a component. More... | |
bool | hasHistoryOnCreate (MStatus *ReturnStatus=NULL) const |
This method determines if the shape was created with history. More... | |
MStatus | updateSurface () |
This method is used to signal the surface 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... | |
NURBS surface CV iterator.
Iterator class for NURBS surface CVs.
Example: Translates the CVs for a surface in the X direction (world space).
MItSurfaceCV | ( | const MObject & | surface, |
bool | useURows = true , |
||
MStatus * | ReturnStatus = NULL |
||
) |
Constructor.
This constructor is used when iterating over all the CVs on the given surface.
[in] | surface | The surface for the iteration |
[in] | useURows | If true then the iterator will iterate in the U direction, otherwise it will be in the V direction. |
[out] | ReturnStatus | Status code |
MItSurfaceCV | ( | const MDagPath & | surface, |
const MObject & | component = MObject::kNullObj , |
||
bool | useURows = true , |
||
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 surface.
[in] | surface | The surface for the iteration |
[in] | component | A group of CVs to be iterated on |
[in] | useURows | If true then the iterator will iterate in the U direction, otherwise it will be in the V direction. |
[out] | ReturnStatus | Status code |
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 |
bool isRowDone | ( | MStatus * | ReturnStatus = NULL | ) | const |
Returns true if the current row has no more CVs to iterate over.
The row can be in the U or V direction depending on what value of useURows has been set in the constructor.
[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 nextRow | ( | ) |
Advance to the next row in the iteration.
The row can be in the U or V direction depending on what value of useURows has been set in the constructor.
MStatus reset | ( | ) |
Reset the iterator to the first CV.
Reset the iterator to iterate over all CVs on the specified surface.
[in] | surface | The surface for the iteration |
[in] | useURows | If true then the iterator will iterate in the U direction, otherwise it will be in the V direction. |
MStatus reset | ( | const MDagPath & | surface, |
const MObject & | component = MObject::kNullObj , |
||
bool | useURows = true |
||
) |
Reset the iterator to iterate over the CVs of the given surface that are specified in the given component.
If the component is NULL then the iteration will be over all CVs on the surface.
[in] | surface | The surface for the iteration |
[in] | component | A group of CVs to be iterated on |
[in] | useURows | If true then the iterator will iterate in the U direction, otherwise it will be in the V direction. |
MPoint position | ( | MSpace::Space | space = MSpace::kObject , |
MStatus * | ReturnStatus = NULL |
||
) | const |
Returns the position of the current CV in the iteration in the specified space.
[in] | space | The coordinate space in which the CV is set |
[out] | ReturnStatus | Status code |
MStatus setPosition | ( | const MPoint & | point, |
MSpace::Space | space = MSpace::kObject |
||
) |
Set the position of the current CV in the iteration to the specified point.
[out] | point | The new position for the current CV in the iteration |
[in] | space | The coordinate space in which the CV is set |
MStatus translateBy | ( | const MVector & | vector, |
MSpace::Space | space = MSpace::kObject |
||
) |
Move the current CV in the iteration by the sepcified vector.
[out] | vector | The translation vector |
[in] | space | The coordinate space in which the CV is set |
int index | ( | MStatus * | ReturnStatus = NULL | ) | const |
Get the index of the current CV as it appears in CV array for this surface.
The index returned is a single index. To convert this into a double (U,V) index:
[out] | ReturnStatus | Status code |
MStatus getIndex | ( | int & | indexU, |
int & | indexV | ||
) | const |
Get the index of the current CV as it appears in CV array for this surface.
The index returned is a double (U,V) index. To convert this into a single index:
[out] | indexU | Storage for the u index |
[out] | indexV | Storage for the v index |
This method is obsolete.
[From Maya 2019]
Get the current CV in the iteration as a component.
Components are used to specify one or more CVs and are usefull in operating on groups of non-contiguous CVs for a curve or surface. Components do not contain any information about the surface that they refer to so an MDagPath must be specified when dealing with components.
[out] | ReturnStatus | Status code |
Get the current CV in the iteration as a component.
Components are used to specify one or more CVs and are usefull in operating on groups of non-contiguous CVs for a curve or surface. Components do not contain any information about the surface that they refer to so an MDagPath must be specified when dealing with components.
[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 updateSurface | ( | ) |
This method is used to signal the surface 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.