MSpace Class Reference

#include <MTypes.h>

List of all members.


Detailed Description

Space transformation identifiers.

MSpace encompasses all of the types of transformation possible. The MSpace identifiers are used to determine the space in which the user is applying or querying transformation or component (i.e. vertex positions) data of a Maya object.

Note that not all the MSpace types can be passed into all methods which take an MSpace as a parameter. The MSpace enumerated type can be split into two parts, types which can be passed into MFnTransform and MTransformationMatrix classes (kTransform, kPreTransform and kPostTransform) and types which can be passed into shape classes such as MFnMesh, MFnNurbsSurface and MFnCamera (kWorld and kObject).

The following is a description of each of the MSpace types.

kInvalid
There are currently no methods in the API that return a result of type MSpace. This may be used for user defined methods that return a result of type MSpace to signify an invalid result.
kTransform
The data applied or queried using the kTransform type represents a transform's local (or relative) coordinates system. This type is valid for methods of MFnTransform and MTransformationMatrix classes.
kPreTransform
The data applied or queried using the kPreTransform type represents pre-transformed matrix data. Given a matrix which has had other matrix operations applied to it, this type is used to obtain a matrix that does not taken into consideration any other matrix operations. This type is valid for methods of the MTransformationMatrix classes.
kPostTransform
The data applied or queried using the kPostTransform type represents post-transformed matrix data. Given a matrix which has had other matrix operations applied to it, this type is used to obtain a matrix that has taken into consideration all other matrix operations. This type is valid for methods of the MTransformationMatrix classes.
kWorld
The data applied or queried using the kWorld type represents the data for the objects world coordinates system. The results of this type will take into consideration all the transforms in the objects hierarchy. This type can be used with shape classes such as MFnMesh, MFnNurbsSurface and MFnCamera and the MFnTransform class. Note that to get the proper world space transformation data with MSpace::kWorld you MUST use the class constructor which initializes the function set with an MDagPath object.
kObject
The data applied or queried using the kObject type represents the data for the objects local coordinates system. The results of this type will be in the local space of the object (object space). This enum can only be used with shape classes such as MFnMesh, MFnNurbsSurface and MFnCamera.
kLast
This simply signifies the end of the MSpace enumerated types. All values that precede this value represent a coordinate system (with the exception of kInvalid which represents an invalid result.)
Comparative Description:
There are four spaces in which to apply a transformation.
Examples:

apiMeshCreator.cpp.


Public Types

enum   Space {
   kInvalid = 0, kTransform = 1, kPreTransform = 2, kPostTransform = 3,
   kWorld = 4, kObject = kPreTransform, kLast = 5
}
  Transformation spaces. More...

Member Enumeration Documentation

Transformation spaces.

Enumerator:
kInvalid  Invalid value.
kTransform  Transform matrix (relative) space.
kPreTransform  Pre-transform matrix (geometry).
kPostTransform  Post-transform matrix (world) space.
kWorld  transform in world space.
kObject  Same as pre-transform space.
kLast  Last value, used for counting.

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