MFnSubdNames Class Reference
[OpenMaya - API module for common classesFunctionSet classes]

#include <MFnSubdNames.h>

List of all members.


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.


Public Member Functions

  MFnSubdNames ()
  ~MFnSubdNames ()

Static Public Member Functions

static int  base (MUint64 id)
static int  first (MUint64 id)
static int  level (MUint64 id)
static int  path (MUint64 id)
static int  corner (MUint64 id)
static MStatus  fromMUint64 (MUint64 id, int &base, int &first, int &level, int &path, int &corner)
static MStatus  toMUint64 (MUint64 &id, int base, int first, int level, int path, int corner)
static MUint64  baseFaceId (MUint64 id)
static long  baseFaceIndex (MUint64 id)
  This method is obsolete.
static unsigned int  baseFaceIndexFromId (MUint64 id)
static MUint64  levelOneFaceId (MUint64 id)
static long  levelOneFaceAsLong (MUint64 id)
  This method is obsolete.
static unsigned int  levelOneFaceIndexFromId (MUint64 id)
static MUint64  levelOneFaceIdFromLong (long one)
  This method is obsolete.
static MUint64  levelOneFaceIdFromIndex (unsigned int index)
static MUint64  baseFaceIdFromLong (long base)
  This method is obsolete.
static MUint64  baseFaceIdFromIndex (unsigned int index)
static MUint64  parentFaceId (MUint64 id)
static MStatus  nonBaseFaceVertices (MUint64 id, MUint64 &vertex1, MUint64 &vertex2, MUint64 &vertex3, MUint64 &vertex4)
static MStatus  nonBaseFaceEdges (MUint64 id, MUint64 &edge1, MUint64 &edge2, MUint64 &edge3, MUint64 &edge4)
static MStatus  fromSelectionIndices (MUint64 &id, unsigned int firstIndex, unsigned int secondIndex)
static MStatus  toSelectionIndices (MUint64 id, unsigned int &firstIndex, unsigned int &secondIndex)

Constructor & Destructor Documentation

MFnSubdNames::MFnSubdNames (  ) 

Class constructor.

MFnSubdNames::~MFnSubdNames (  ) 

Class destructor.


Member Function Documentation

int MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::baseFaceIndexFromId ( MUint64  id  )  [static]

Same as base().

Parameters:
[in]  id  The 64-bit name of the component

MUint64 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::levelOneFaceIdFromLong ( long  one  )  [static]

This method is obsolete.

Deprecated:
Use MFnSubdNames::levelOneFaceIdFromIndex instead.
Parameters:
[in]  one  The 64-bit name of the component

MUint64 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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 MFnSubdNames::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:

MStatus MFnSubdNames::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

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6