#include <MFnSubdNames.h>
Manipulate Subdivision Surface vertex, edge and face ids.
This function set provides some simple utilities for the interpretation and manipulation of the subdivision surface vertex, edge and face ids.
Public Member Functions | |
MFnSubdNames () | |
Class constructor. | |
~MFnSubdNames () | |
Class destructor. | |
Static Public Member Functions | |
static int | base (MUint64 id) |
Given a 64-bit name, return the base mesh face. More... | |
static int | first (MUint64 id) |
Given a 64-bit name, return the index of the first child of the base face. More... | |
static int | level (MUint64 id) |
Given a 64-bit name, return the level of the component. More... | |
static int | path (MUint64 id) |
Given a 64-bit name, return from level 1 face down to the face in question. More... | |
static int | corner (MUint64 id) |
One of the 4 possible choices of the vertex or an edge once we're at the particular face. More... | |
static MStatus | fromMUint64 (MUint64 id, int &base, int &first, int &level, int &path, int &corner) |
Given a 64-bit name, compute the base face, first level face index, level, path to the face and the corner choice at the finest face. More... | |
static MStatus | toMUint64 (MUint64 &id, int base, int first, int level, int path, int corner) |
Compute the 64-bit name given the base face index, first level face index, level, path to the finest face and the corner choice. More... | |
static MUint64 | baseFaceId (MUint64 id) |
Given a 64-bit name, return the 64-bit name of the base face that is the parent of the given component. More... | |
static long | baseFaceIndex (MUint64 id) |
This method is obsolete. More... | |
static unsigned int | baseFaceIndexFromId (MUint64 id) |
Same as ::base(). More... | |
static MUint64 | levelOneFaceId (MUint64 id) |
Given a 64-bit name, return the level one face that is the parent for the given component. More... | |
static long | levelOneFaceAsLong (MUint64 id) |
This method is obsolete. More... | |
static unsigned int | levelOneFaceIndexFromId (MUint64 id) |
Given a 64-bit name, return the level one mesh face as an integer, instead of 64-bit name. More... | |
static MUint64 | levelOneFaceIdFromLong (long one) |
This method is obsolete. More... | |
static MUint64 | levelOneFaceIdFromIndex (unsigned int index) |
Given a level 1 face name as integer, return it as a 64-bit name. More... | |
static MUint64 | baseFaceIdFromLong (long base) |
This method is obsolete. More... | |
static MUint64 | baseFaceIdFromIndex (unsigned int index) |
Given the index of the base face (0, 1, ... More... | |
static MUint64 | parentFaceId (MUint64 id) |
Given a 64-bit name of the face, return its parent face id. More... | |
static MStatus | nonBaseFaceVertices (MUint64 id, MUint64 &vertex1, MUint64 &vertex2, MUint64 &vertex3, MUint64 &vertex4) |
Return the four vertices on the given face. More... | |
static MStatus | nonBaseFaceEdges (MUint64 id, MUint64 &edge1, MUint64 &edge2, MUint64 &edge3, MUint64 &edge4) |
Return the four edges on the given face. More... | |
static MStatus | fromSelectionIndices (MUint64 &id, unsigned int firstIndex, unsigned int secondIndex) |
Given the two integers that would show as selection indices for the subd component, return the 64-bit name for that component. More... | |
static MStatus | toSelectionIndices (MUint64 id, unsigned int &firstIndex, unsigned int &secondIndex) |
Given a 64-bit name, return the two integers that will show up as selection indices for that subd component. More... | |
static const char * | className () |
Returns the name of this class. More... | |
|
static |
Given a 64-bit name, return the base mesh face.
[in] | id | The 64-bit name of the component |
|
static |
Given a 64-bit name, return the index of the first child of the base face.
[in] | id | The 64-bit name of the component |
|
static |
Given a 64-bit name, return the level of the component.
[in] | id | The 64-bit name of the component |
|
static |
Given a 64-bit name, return from level 1 face down to the face in question.
Two bits per level for the four possible choices.
[in] | id | The 64-bit name of the component |
|
static |
One of the 4 possible choices of the vertex or an edge once we're at the particular face.
[in] | id | The 64-bit name of the component |
|
static |
Given a 64-bit name, compute the base face, first level face index, level, path to the face and the corner choice at the finest face.
[in] | id | The 64-bit name of the component |
[in] | base | Base face index |
[in] | first | First level face choice |
[in] | level | Level |
[in] | path | Path to the finest level |
[in] | corner | Corner choice at the finest level |
|
static |
Compute the 64-bit name given the base face index, first level face index, level, path to the finest face and the corner choice.
The corner is zero (ignore) if the component is to be the face.
[in] | id | The 64-bit name of the component |
[in] | base | Base face index |
[in] | first | First level face choice |
[in] | level | Level |
[in] | path | Path to the finest level |
[in] | corner | Corner choice at the finest level |
|
static |
Given a 64-bit name, return the 64-bit name of the base face that is the parent of the given component.
[in] | id | The 64-bit name of the component |
|
static |
This method is obsolete.
[in] | id | The 64-bit name of the component |
|
static |
Same as ::base().
[in] | id | The 64-bit name of the component |
|
static |
Given a 64-bit name, return the level one face that is the parent for the given component.
[in] | id | The 64-bit name of the component |
|
static |
This method is obsolete.
[in] | id | The 64-bit name of the component |
|
static |
Given a 64-bit name, return the level one mesh face as an integer, instead of 64-bit name.
[in] | id | The 64-bit name of the component |
|
static |
This method is obsolete.
[in] | one | The 64-bit name of the component |
|
static |
Given a level 1 face name as integer, return it as a 64-bit name.
[in] | index | The 64-bit name of the component |
|
static |
This method is obsolete.
[in] | base | The base face name as integer 0, ... N-1 |
|
static |
Given the index of the base face (0, 1, ...
N-1), return its 64-bit name.
[in] | index | The base face name as integer 0, ... N-1 |
|
static |
Given a 64-bit name of the face, return its parent face id.
Note that if the given face id is from a base face (ie. it is a face at level 0), the returned face will be exactly the same.
[in] | id | The 64-bit name of the component |
|
static |
Return the four vertices on the given face.
Note that the face should not be a base mesh face (the level > 0).
[in] | id | The id of the face |
[in] | vertex1 | The first vertex |
[in] | vertex2 | The second vertex |
[in] | vertex3 | The third vertex |
[in] | vertex4 | The fourth vertex |
|
static |
Return the four edges on the given face.
Note that the face should not be a base mesh face (the level > 0).
[in] | id | The id of the face |
[in] | edge1 | The first edge |
[in] | edge2 | The second edge |
[in] | edge3 | The third edge |
[in] | edge4 | The fourth edge |
|
static |
Given the two integers that would show as selection indices for the subd component, return the 64-bit name for that component.
[in] | id | The 64-bit name of the component |
[in] | firstIndex | The first selection index |
[in] | secondIndex | The second selection index |
|
static |
Given a 64-bit name, return the two integers that will show up as selection indices for that subd component.
[in] | id | The 64-bit name of the component |
[in] | firstIndex | The first selection index |
[in] | secondIndex | The second selection index |
|
static |
Returns the name of this class.