This object provides additional transformations for a mesh (skinning)
When an object whose class is derived from this interface is properly added as child to a Geometry object in the scene, the rendering uses the transformations returned by this object as additional transformations during rendering, if the current material supports skinning. The vertices of the mesh first transformed by these additional transformations, then the local transformation provided by the Transformation class. In other words, the transformations provided by this object supposed to transform within object space. In order to use this object, additional vertex information must be supplied by using the VertexDataProvider class (bone indices and weights)
Definition at line 303 of file transformation.h.
#include <transformation.h>
Public Types |
|
enum | TransformationType { eMatrix, eDualQuaternion } |
Possible types of the transformations provided by an object. More... |
|
Public Member Functions |
|
virtual int | TransformationCount (void) const |
Returns the number of transformations
(bones). |
|
virtual TransformationType | Type (void) const |
This function informs the renderer about the
type of the transformations. |
|
virtual Matrix | AsMatrix (int iIndex) const |
Returns a transformation as a matrix. This
is only called when
Type() returns eMatrix. |
|
virtual DualQuaternion | AsDualQuaternion (int iIndex) const |
Returns a transformation as a dual
quaternion. This is only called when
Type() returns eDualQuaternion. |
|
virtual void | SetupVertexProcessing (void) const |
This function sets up the vertex processing
of the rendering pipeline to properly skin the vertices. |
|
virtual void | RestoreVertexProcessing (void) const |
This function restores the vertex processing
pipeline to the fixed function pipeline after a
SetupVertexProcessing call. |
enum TransformationType |
Possible types of the transformations provided by an object.
Definition at line 325 of file transformation.h.
virtual int TransformationCount | ( | void | ) | const [virtual] |
Returns the number of transformations (bones).
If this value is zero, skinning won't be used.
virtual TransformationType Type | ( | void | ) | const [virtual] |
This function informs the renderer about the type of the transformations.
Using dual quaternions gives better quality blending result, but can only hold rigid transformations (translation and rotation only)
virtual Matrix AsMatrix | ( | int | iIndex | ) | const [virtual] |
Returns a transformation as a matrix. This is only called when Type() returns eMatrix.
[in] | iIndex | Index of the transformation. |
virtual DualQuaternion AsDualQuaternion | ( | int | iIndex | ) | const [virtual] |
Returns a transformation as a dual quaternion. This is only called when Type() returns eDualQuaternion.
[in] | iIndex | Index of the transformation. |
virtual void SetupVertexProcessing | ( | void | ) | const [virtual] |
This function sets up the vertex processing of the rendering pipeline to properly skin the vertices.
The bone indices must be in TEXCOORD3, the weights must be in TEXCOORD4
virtual void RestoreVertexProcessing | ( | void | ) | const [virtual] |
This function restores the vertex processing pipeline to the fixed function pipeline after a SetupVertexProcessing call.