Public Member Functions | Static Public Member Functions

MFnSubdNames Class Reference

Search for all occurrences

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

#include <MFnSubdNames.h>

List of all members.

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.
static int  first (MUint64 id)
  Given a 64-bit name, return the index of the first child of the base face.
static int  level (MUint64 id)
  Given a 64-bit name, return the level of the component.
static int  path (MUint64 id)
  Given a 64-bit name, return from level 1 face down to the face in question.
static int  corner (MUint64 id)
  One of the 4 possible choices of the vertex or an edge once we're at the particular face.
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.
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.
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.
static long  baseFaceIndex (MUint64 id)
  This method is obsolete.
static unsigned int  baseFaceIndexFromId (MUint64 id)
  Same as ::base().
static MUint64  levelOneFaceId (MUint64 id)
  Given a 64-bit name, return the level one face that is the parent for the given component.
static long  levelOneFaceAsLong (MUint64 id)
  This method is obsolete.
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.
static MUint64  levelOneFaceIdFromLong (long one)
  This method is obsolete.
static MUint64  levelOneFaceIdFromIndex (unsigned int index)
  Given a level 1 face name as integer, return it as a 64-bit name.
static MUint64  baseFaceIdFromLong (long base)
  This method is obsolete.
static MUint64  baseFaceIdFromIndex (unsigned int index)
  Given the index of the base face (0, 1, ...
static MUint64  parentFaceId (MUint64 id)
  Given a 64-bit name of the face, return its parent face id.
static MStatus  nonBaseFaceVertices (MUint64 id, MUint64 &vertex1, MUint64 &vertex2, MUint64 &vertex3, MUint64 &vertex4)
  Return the four vertices on the given face.
static MStatus  nonBaseFaceEdges (MUint64 id, MUint64 &edge1, MUint64 &edge2, MUint64 &edge3, MUint64 &edge4)
  Return the four edges on the given face.
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.
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.
static const char *  className ()
  Returns the name of this class.

Member Function Documentation

int base ( MUint64  id ) [static]

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

Parameters:
[in] id The 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] id The 64-bit name of the component
int level ( MUint64  id ) [static]

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

Parameters:
[in] id The 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] id The 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] id The 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] 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
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] 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
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] id The 64-bit name of the component
long baseFaceIndex ( MUint64  id ) [static]

This method is obsolete.

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

Same as ::base().

Parameters:
[in] id The 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] id The 64-bit name of the component
long levelOneFaceAsLong ( MUint64  id ) [static]

This method is obsolete.

Deprecated:
Use MFnSubdNames::levelOneFaceIdFromIndex instead.
Parameters:
[in] id The 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] id The 64-bit name of the component
MUint64 levelOneFaceIdFromLong ( long  one ) [static]

This method is obsolete.

Deprecated:
Use MFnSubdNames::levelOneFaceIdFromIndex instead.
Parameters:
[in] one The 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] index The 64-bit name of the component
MUint64 baseFaceIdFromLong ( long  base ) [static]

This method is obsolete.

Deprecated:
Use MFnSubdNames::baseFaceIdFromIndex instead.
Parameters:
[in] base The 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] index The 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] id The 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] 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
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] 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
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] id The 64-bit name of the component
[in] firstIndex The first selection index
[in] secondIndex The second selection index
Examples:
pointOnSubdNode.cpp.
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] id The 64-bit name of the component
[in] firstIndex The first selection index
[in] secondIndex The second selection index
const char * className ( ) [static]

Returns the name of this class.

Returns:
The name of this class.

MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames
MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames MFnSubdNames