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.
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.
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.
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.
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.
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.
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.
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.)
There are four spaces in which to apply a transformation.
Transform Space - This space depends on the type of transformation being applied. Transform nodes define a fixed sequence of affine transformations. Basically, there is scale followed by rotation and finally translation. There are four spaces here:
1) The space before applying the scale.
2) The space after the scale but before the rotation.
3) The space between the rotation and translation.
4) The space after the translation.
Space 1) is pre-transform space.
Space 4) is post-transform space.
Spaces 2) and 3) define transform spaces.
If applying a transform space scale, this transform will be applied after the current scale but before the rotation (space 2). If applying a transform space rotation, this transform will be applied after the current rotation but before the translation. Applying a translation in transform space, the translation will be applied after the current translation.
#include <MTypes.h>
Public Types |
|
enum | Space
{ kInvalid = 0, kTransform = 1, kPreTransform = 2, kPostTransform = 3, kWorld = 4, kObject = kPreTransform, kLast = 5 } |
Transformation spaces. More... |
enum Space |
Transformation spaces.