|
| MPxGeometryIterator (void *userGeometry, MObjectArray &components) |
| Class constructor. More...
|
|
| MPxGeometryIterator (void *userGeometry, MObject &components) |
| Class constructor. More...
|
|
virtual | ~MPxGeometryIterator () |
| Class destructor.
|
|
virtual bool | isDone () const |
| Indicates if all the items have been traversed yet. More...
|
|
virtual MStatus | next () |
| Advances to the next component.
|
|
virtual void | reset () |
| Resets the iterator to the start of the components so that another pass over them may be made.
|
|
virtual void | component (MObject &component) |
| Returns a component for the current item in the iteration. More...
|
|
virtual bool | hasPoints () const |
| Indicates whether the underlying geometry has point data. More...
|
|
virtual int | iteratorCount () const |
| Returns an estimate of how many items will be iterated over. More...
|
|
virtual MPoint | point () const |
| Returns the current component's positional data. More...
|
|
virtual void | setPoint (const MPoint &) const |
| Sets the current component's positional data. More...
|
|
virtual int | setPointGetNext (MPoint &) |
| Sets the current component's positional data, gets the next point. More...
|
|
virtual int | index () const |
| Returns a unique index for the current item in the iteration. More...
|
|
virtual bool | hasNormals () const |
| Indicates whether the underlying geometry has normals. More...
|
|
virtual int | indexUnsimplified () const |
| Returns a unique index for the current item in the iteration Rather than being the iterator index this is the index for the actual item when simplification is skipping items. More...
|
|
int | currentPoint () const |
| Returns the index that is being iterated on. More...
|
|
void | setCurrentPoint (int) |
| Set the current index of the iteration. More...
|
|
int | maxPoints () const |
| Returns the largest index that will be iterated over. More...
|
|
void | setMaxPoints (int) |
| Sets the largest index that will be iterated over. More...
|
|
void | setObject (MPxSurfaceShape &) |
| Optional method to set a shape object to iterate over to allow tweaking of the shape's history (input geometry). More...
|
|
void * | geometry () const |
| Returns a pointer to the geometry that this iterator is iterating over.
|
|
Base class for user defined geometry iterators.
This is the base class for user defined geometry iterators. Geometry iterator allow iterating over components in geometry in a geometry independent manner. This base class defines the interface to be used by maya when a generic component iteration is required.
This class is used in conjunction with MPxSurfaceShape to provide an iterator for components in a user defined shape. Also this method can is used by MPxGeometryData to provide an iterator over geometry that is passed through DG connections.
The main methods to override in this class are point and setPoint. The reset, isDone, and next methods have a default implementation and should only be overridden if the component being iterator on is not a single indexed component type.
The iterator works in two modes, over components or over all elements in some geometry. If the components passed into the constructors are null or empty then the iteration is meant to be over the entire object.
- Examples:
- apiMeshShape/apiMeshData.cpp, apiMeshShape/apiMeshData.h, apiMeshShape/apiMeshIterator.cpp, apiMeshShape/apiMeshIterator.h, apiMeshShape/apiMeshShape.cpp, and apiMeshShape/apiMeshShape.h.