Assimp  v3.1.1 (June 2014)
Assimp::MakeLeftHandedProcess Class Reference

The MakeLeftHandedProcess converts all imported data to a left-handed coordinate system. More...

Inherits Assimp::BaseProcess.

Public Member Functions

void Execute (aiScene *pScene)
 Executes the post processing step on the given imported data. More...
 
bool IsActive (unsigned int pFlags) const
 Returns whether the processing step is present in the given flag. More...
 
 MakeLeftHandedProcess ()
 
 ~MakeLeftHandedProcess ()
 
- Public Member Functions inherited from Assimp::BaseProcess
 BaseProcess ()
 Constructor to be privately used by Importer. More...
 
void ExecuteOnScene (Importer *pImp)
 Executes the post processing step on the given imported data. More...
 
SharedPostProcessInfoGetSharedData ()
 Get the shared data that is assigned to the step. More...
 
virtual bool RequireVerboseFormat () const
 Check whether this step expects its input vertex data to be in verbose format. More...
 
void SetSharedData (SharedPostProcessInfo *sh)
 Assign a new SharedPostProcessInfo to the step. More...
 
virtual void SetupProperties (const Importer *pImp)
 Called prior to ExecuteOnScene(). More...
 
virtual ~BaseProcess ()
 Destructor, private as well. More...
 

Protected Member Functions

void ProcessAnimation (aiNodeAnim *pAnim)
 Converts the given animation to LH coordinates. More...
 
void ProcessMaterial (aiMaterial *pMat)
 Converts a single material to left-handed coordinates. More...
 
void ProcessMesh (aiMesh *pMesh)
 Converts a single mesh to left handed coordinates. More...
 
void ProcessNode (aiNode *pNode, const aiMatrix4x4 &pParentGlobalRotation)
 Recursively converts a node and all of its children. More...
 

Additional Inherited Members

- Protected Attributes inherited from Assimp::BaseProcess
ProgressHandlerprogress
 Currently active progress handler. More...
 
SharedPostProcessInfoshared
 See the doc of #SharedPostProcessInfo for more details. More...
 

Detailed Description

The MakeLeftHandedProcess converts all imported data to a left-handed coordinate system.

This implies a mirroring of the Z axis of the coordinate system. But to keep transformation matrices free from reflections we shift the reflection to other places. We mirror the meshes and adapt the rotations.

Note
RH-LH and LH-RH is the same, so this class can be used for both

Constructor & Destructor Documentation

MakeLeftHandedProcess::MakeLeftHandedProcess ( )
MakeLeftHandedProcess::~MakeLeftHandedProcess ( )

Member Function Documentation

void MakeLeftHandedProcess::Execute ( aiScene pScene)
virtual

Executes the post processing step on the given imported data.

A process should throw an ImportErrorException* if it fails. This method must be implemented by deriving classes.

Parameters
pSceneThe imported data to work at.

Implements Assimp::BaseProcess.

bool MakeLeftHandedProcess::IsActive ( unsigned int  pFlags) const
virtual

Returns whether the processing step is present in the given flag.

Parameters
pFlagsThe processing flags the importer was called with. A bitwise combination of aiPostProcessSteps.
Returns
true if the process is present in this flag fields, false if not.

Implements Assimp::BaseProcess.

void MakeLeftHandedProcess::ProcessAnimation ( aiNodeAnim pAnim)
protected

Converts the given animation to LH coordinates.

The rotation and translation keys are transformed, the scale keys work in local space and can therefore be left untouched.

Parameters
pAnimThe bone animation to transform
void MakeLeftHandedProcess::ProcessMaterial ( aiMaterial pMat)
protected

Converts a single material to left-handed coordinates.

Parameters
pMatMaterial to convert
void MakeLeftHandedProcess::ProcessMesh ( aiMesh pMesh)
protected

Converts a single mesh to left handed coordinates.

This means that positions, normals and tangents are mirrored at the local Z axis and the order of all faces are inverted.

Parameters
pMeshThe mesh to convert.
void MakeLeftHandedProcess::ProcessNode ( aiNode pNode,
const aiMatrix4x4 pParentGlobalRotation 
)
protected

Recursively converts a node and all of its children.


The documentation for this class was generated from the following files: