#include <MItMeshFaceVertex.h>
This class is the iterator for face vertices on polygonal surfaces.
The iterator functions in two modes depending on whether a component is specified. When a component is not given or is NULL the iteration will be over all polygons for the surface. When a component is given this iterator will iterate over the polygons specified in the component. When iterating over components a DAG path to the surface must also be supplied.
Public Member Functions | |
| MItMeshFaceVertex (const MObject &polyObject, MStatus *ReturnStatus=NULL) | |
| MItMeshFaceVertex (const MDagPath &polyObject, MObject &component=MObject::kNullObj, MStatus *ReturnStatus=NULL) | |
| virtual | ~MItMeshFaceVertex () |
| bool | isDone (MStatus *ReturnStatus=NULL) |
| MStatus | next () |
| MStatus | reset () |
| MStatus | reset (const MObject &polyObject) |
| MStatus | reset (const MDagPath &polyObject, MObject &component=MObject::kNullObj) |
| int | vertId (MStatus *ReturnStatus=NULL) const |
| int | faceId (MStatus *ReturnStatus=NULL) const |
| int | faceVertId (MStatus *ReturnStatus=NULL) const |
| MObject | faceVertex (MStatus *ReturnStatus=NULL) const |
| This method is obsolete. | |
| MObject | currentItem (MStatus *ReturnStatus=NULL) const |
| MPoint | position (MSpace::Space space=MSpace::kObject, MStatus *ReturnStatus=NULL) |
| MStatus | getNormal (MVector &normal, MSpace::Space space=MSpace::kObject) const |
| int | normalId (MStatus *ReturnStatus=NULL) const |
| int | tangentId (MStatus *ReturnStatus=NULL) const |
| MVector | getTangent (MSpace::Space space=MSpace::kObject, const MString *uvSet=NULL, MStatus *ReturnStatus=NULL) const |
| MVector | getBinormal (MSpace::Space space=MSpace::kObject, const MString *uvSet=NULL, MStatus *ReturnStatus=NULL) const |
| bool | hasUVs (MStatus *ReturnStatus=NULL) const |
| bool | hasUVs (const MString &uvSet, MStatus *ReturnStatus=NULL) const |
| MStatus | getUV (float2 &uvPoint, const MString *uvSet=NULL) const |
| MStatus | getUVIndex (int &index, const MString *uvSet=NULL) |
| MStatus | getUVIndex (int &index, float &u, float &v, const MString *uvSet=NULL) |
| bool | hasColor (MStatus *ReturnStatus=NULL) const |
| MStatus | getColor (MColor &color, const MString *colorSetName=NULL) |
| MStatus | getColorIndex (int &colorIndex, const MString *colorSetName=NULL) |
| MStatus | updateSurface () |
| MStatus | geomChanged () |
| MStatus | setIndex (int faceId, int vertFaceId, int &prevFaceId, int &prevVertId) |
Constructor. Creates an iterator for all face vertices of the given surface.
| [in] | polyObject | The surface to iterate over |
| [out] | ReturnStatus | Status code |
| MItMeshFaceVertex::MItMeshFaceVertex | ( | const MDagPath & | polyObject, | |
| MObject & | component = MObject::kNullObj, |
|||
| MStatus * | ReturnStatus = NULL | |||
| ) |
Constructor. Creates an iterator for the face vertices of the given component. If no component is specified then the iteration will be for all polygons of the given surface.
| [in] | polyObject | The surface to iterate over |
| [in] | component | The polygons of the polyObject to iterate over |
| [out] | ReturnStatus | Status code |
| MItMeshFaceVertex::~MItMeshFaceVertex | ( | ) | [virtual] |
Destructor. Frees up storage used by the iterator.
| bool MItMeshFaceVertex::isDone | ( | MStatus * | ReturnStatus = NULL |
) |
Indicates if all of the face vertices have been traversed.
| [out] | ReturnStatus | Status code |
| MStatus MItMeshFaceVertex::next | ( | ) |
Advance to the next face vertext in the iteration.
| MStatus MItMeshFaceVertex::reset | ( | ) |
Reset the iterator to the first face vertex.
Reset the iterator to the first polygon in the supplied surface.
| [in] | polyObject | The polygonal object for the iteration |
| MStatus MItMeshFaceVertex::reset | ( | const MDagPath & | polyObject, | |
| MObject & | component = MObject::kNullObj | |||
| ) |
Reset the iterator with the given surface and component. If component is null then the iteration will be for all face vertices in the given surface.
| [in] | polyObject | The surface to iterate over |
| [in] | component | The polygons of the polyObject to iterate over |
| int MItMeshFaceVertex::vertId | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the index of the current face vertex.
| [out] | ReturnStatus | Status code |
| int MItMeshFaceVertex::faceId | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the current face index.
| [out] | ReturnStatus | Status code |
| int MItMeshFaceVertex::faceVertId | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the relative index of the vertex within the current face. This index together with the faceId can be used for a fast access to get various info stored per vertex (normals, uvs, colors).
| [out] | ReturnStatus | Status code |
This method is obsolete.
| [out] | ReturnStatus | Status code |
Returns the double componet index of the vertex and face.
| [out] | ReturnStatus | Status code |
| MPoint MItMeshFaceVertex::position | ( | MSpace::Space | space = MSpace::kObject, |
|
| MStatus * | ReturnStatus = NULL | |||
| ) |
Return the position of the current face vertex.
| [in] | space | The coordinate system for this operation |
| [out] | ReturnStatus | Status code |
| MStatus MItMeshFaceVertex::getNormal | ( | MVector & | normal, | |
| MSpace::Space | space = MSpace::kObject | |||
| ) | const |
Return the face vertex normal.
| [out] | normal | Storage for the normal |
| [in] | space | The transformation space |
| int MItMeshFaceVertex::normalId | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the normal index for the specified vertex. This index refers to an element in the normal array returned by MFnMesh::getNormals. These normals are per-polygon per-vertex normals. See the MFnMesh description for more information on normals.
| [out] | ReturnStatus | Status code |
| int MItMeshFaceVertex::tangentId | ( | MStatus * | ReturnStatus = NULL |
) | const |
Returns the tangent (or binormal) index for the specified vertex. This index refers to an element in the normal array returned by MFnMesh::getTangents. These tangent or binormals are per-polygon per-vertex. See the MFnMesh description for more information on tangents and binormals.
| [out] | ReturnStatus | Status code |
| MVector MItMeshFaceVertex::getTangent | ( | MSpace::Space | space = MSpace::kObject, |
|
| const MString * | uvSet = NULL, |
|||
| MStatus * | ReturnStatus = NULL | |||
| ) | const |
Return the face vertex tangent associated with the given UV set. The tangent is defined as the surface tangent of the polygon running in the U direction.
| [in] | space | The transformation space. |
| [in] | uvSet | The name of the uv set. |
| [out] | ReturnStatus |
| MVector MItMeshFaceVertex::getBinormal | ( | MSpace::Space | space = MSpace::kObject, |
|
| const MString * | uvSet = NULL, |
|||
| MStatus * | ReturnStatus = NULL | |||
| ) | const |
Return the face vertex binormal associated with the UV set.
| [in] | space | The transformation space |
| [in] | uvSet | The name of the associated UV set. |
| [out] | ReturnStatus |
| bool MItMeshFaceVertex::hasUVs | ( | MStatus * | ReturnStatus = NULL |
) | const |
Does this face vertex has UV's mapped or not.
| [in] | ReturnStatus | Status Code |
Does this face vertex has UV's mapped or not in a given uv set.
| [in] | uvSet | UV set to work with |
| [in] | ReturnStatus | Status Code |
Return the texture coordinate for the current face vertex.
| [out] | uvPoint | Storage for u and v values |
| [in] | uvSet | UV set to work with |
Returns the index of the texture coordinate for the current face vertex. This index refers to an element of the texture coordinate array for the polygonal object returned by MFnMesh::getUVs.
| [out] | index | Storage for the texture coordinate index of the current face vertex |
| [in] | uvSet | UV set to work with |
| MStatus MItMeshFaceVertex::getUVIndex | ( | int & | index, | |
| float & | u, | |||
| float & | v, | |||
| const MString * | uvSet = NULL | |||
| ) |
Return the index of the texture coordinate for the current face vertex. This index refers to an element of the texture coordinate array for the polygonal object returned by MFnMesh::getUVs.
| [out] | index | Storage for the texture coordinate index of the specified vertex |
| [out] | u | Storage for u value |
| [out] | v | Storage for v value |
| [in] | uvSet | UV set to work with |
| bool MItMeshFaceVertex::hasColor | ( | MStatus * | ReturnStatus = NULL |
) | const |
This method determines whether the current face vertex has color-per-vertex set.
| [out] | ReturnStatus | Status code |
Return a color of the current face vertex.
| [out] | color | Current face vertex color |
| [in] | colorSetName | Name of the color set. |
Return a color index of the current face vertex.
| [out] | colorIndex | Storage for the color index |
| [in] | colorSetName | Name of the color set. |
| MStatus MItMeshFaceVertex::updateSurface | ( | ) |
Signal that this polygonal surface has changed and needs to redraw itself.
| MStatus MItMeshFaceVertex::geomChanged | ( | ) |
Reset the geom pointer in the MItMeshFaceVertex.
| MStatus MItMeshFaceVertex::setIndex | ( | int | faceIndex, | |
| int | faceVertIndex, | |||
| int & | prevFaceId, | |||
| int & | prevVertId | |||
| ) |
This method sets the index of the current face vertex to be accessed. The current face vertex will no longer be in sync with any previous iteration.
| [in] | faceIndex | The index of desired face to access. |
| [in] | faceVertIndex | The relative (local to face) index of desired vertex to access. |
| Autodesk® Maya® 2010 © 1997-2009 Autodesk, Inc. All rights reserved. |
Generated with
|