MFnSubdNames Class Reference

#include <MFnSubdNames.h>

Class Description

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...
 

Member Function Documentation

int base ( MUint64  id)
static

Given a 64-bit name, return the base mesh face.

Parameters
[in]idThe 64-bit name of the component
int first ( MUint64  id)
static

Given a 64-bit name, return the index of the first child of the base face.

Parameters
[in]idThe 64-bit name of the component
int level ( MUint64  id)
static

Given a 64-bit name, return the level of the component.

Parameters
[in]idThe 64-bit name of the component
int path ( MUint64  id)
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.

Parameters
[in]idThe 64-bit name of the component
int corner ( MUint64  id)
static

One of the 4 possible choices of the vertex or an edge once we're at the particular face.

Parameters
[in]idThe 64-bit name of the component
MStatus fromMUint64 ( MUint64  id,
int &  base,
int &  first,
int &  level,
int &  path,
int &  corner 
)
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.

Parameters
[in]idThe 64-bit name of the component
[in]baseBase face index
[in]firstFirst level face choice
[in]levelLevel
[in]pathPath to the finest level
[in]cornerCorner choice at the finest level
MStatus toMUint64 ( MUint64 &  id,
int  base,
int  first,
int  level,
int  path,
int  corner 
)
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.

Parameters
[in]idThe 64-bit name of the component
[in]baseBase face index
[in]firstFirst level face choice
[in]levelLevel
[in]pathPath to the finest level
[in]cornerCorner choice at the finest level
MUint64 baseFaceId ( MUint64  id)
static

Given a 64-bit name, return the 64-bit name of the base face that is the parent of the given component.

Parameters
[in]idThe 64-bit name of the component
long baseFaceIndex ( MUint64  id)
static

This method is obsolete.

Deprecated:
Use MFnSubdNames::baseFaceIndexFromId instead.
Parameters
[in]idThe 64-bit name of the component
unsigned int baseFaceIndexFromId ( MUint64  id)
static

Same as ::base().

Parameters
[in]idThe 64-bit name of the component
MUint64 levelOneFaceId ( MUint64  id)
static

Given a 64-bit name, return the level one face that is the parent for the given component.

Parameters
[in]idThe 64-bit name of the component
long levelOneFaceAsLong ( MUint64  id)
static

This method is obsolete.

Deprecated:
Use MFnSubdNames::levelOneFaceIdFromIndex instead.
Parameters
[in]idThe 64-bit name of the component
unsigned int levelOneFaceIndexFromId ( MUint64  id)
static

Given a 64-bit name, return the level one mesh face as an integer, instead of 64-bit name.

Parameters
[in]idThe 64-bit name of the component
MUint64 levelOneFaceIdFromLong ( long  one)
static

This method is obsolete.

Deprecated:
Use MFnSubdNames::levelOneFaceIdFromIndex instead.
Parameters
[in]oneThe 64-bit name of the component
MUint64 levelOneFaceIdFromIndex ( unsigned int  index)
static

Given a level 1 face name as integer, return it as a 64-bit name.

Parameters
[in]indexThe 64-bit name of the component
MUint64 baseFaceIdFromLong ( long  base)
static

This method is obsolete.

Deprecated:
Use MFnSubdNames::baseFaceIdFromIndex instead.
Parameters
[in]baseThe base face name as integer 0, ... N-1
MUint64 baseFaceIdFromIndex ( unsigned int  index)
static

Given the index of the base face (0, 1, ...

N-1), return its 64-bit name.

Parameters
[in]indexThe base face name as integer 0, ... N-1
MUint64 parentFaceId ( MUint64  id)
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.

Parameters
[in]idThe 64-bit name of the component
MStatus nonBaseFaceVertices ( MUint64  id,
MUint64 &  vertex1,
MUint64 &  vertex2,
MUint64 &  vertex3,
MUint64 &  vertex4 
)
static

Return the four vertices on the given face.

Note that the face should not be a base mesh face (the level > 0).

Parameters
[in]idThe id of the face
[in]vertex1The first vertex
[in]vertex2The second vertex
[in]vertex3The third vertex
[in]vertex4The fourth vertex
Status Codes:
MStatus nonBaseFaceEdges ( MUint64  id,
MUint64 &  edge1,
MUint64 &  edge2,
MUint64 &  edge3,
MUint64 &  edge4 
)
static

Return the four edges on the given face.

Note that the face should not be a base mesh face (the level > 0).

Parameters
[in]idThe id of the face
[in]edge1The first edge
[in]edge2The second edge
[in]edge3The third edge
[in]edge4The fourth edge
Status Codes:
MStatus fromSelectionIndices ( MUint64 &  id,
unsigned int  firstIndex,
unsigned int  secondIndex 
)
static

Given the two integers that would show as selection indices for the subd component, return the 64-bit name for that component.

Parameters
[in]idThe 64-bit name of the component
[in]firstIndexThe first selection index
[in]secondIndexThe second selection index
+ Examples:
MStatus toSelectionIndices ( MUint64  id,
unsigned int &  firstIndex,
unsigned int &  secondIndex 
)
static

Given a 64-bit name, return the two integers that will show up as selection indices for that subd component.

Parameters
[in]idThe 64-bit name of the component
[in]firstIndexThe first selection index
[in]secondIndexThe second selection index
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MFnSubdNames.h
  • MFnSubdNames.cpp