Assimp  v4.1. (December 2018)
Assimp::DeboneProcess Class Reference

This post processing step removes bones nearly losslessly or according to a configured threshold. More...

Inherits Assimp::BaseProcess.

Public Member Functions

 DeboneProcess ()
 
bool IsActive (unsigned int pFlags) const
 Returns whether the processing step is present in the given flag. More...
 
void SetupProperties (const Importer *pImp)
 Called prior to ExecuteOnScene(). More...
 
 ~DeboneProcess ()
 
- Public Member Functions inherited from Assimp::BaseProcess
 BaseProcess () AI_NO_EXCEPT
 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 ~BaseProcess ()
 Destructor, private as well. More...
 

Public Attributes

bool mAllOrNone
 
unsigned int mNumBones
 Number of bones present in the scene. More...
 
unsigned int mNumBonesCanDoWithout
 
std::vector< std::vector< std::pair< unsigned int, aiNode * > > > mSubMeshIndices
 Per mesh index: Array of indices of the new submeshes. More...
 
float mThreshold
 

Protected Member Functions

void ApplyTransform (aiMesh *mesh, const aiMatrix4x4 &mat) const
 
bool ConsiderMesh (const aiMesh *pMesh)
 Counts bones total/removable in a given mesh. More...
 
void Execute (aiScene *pScene)
 Executes the post processing step on the given imported data. More...
 
void SplitMesh (const aiMesh *pMesh, std::vector< std::pair< aiMesh *, const aiBone * > > &poNewMeshes) const
 Splits the given mesh by bone count. More...
 
void UpdateNode (aiNode *pNode) const
 Recursively updates the node's mesh list to account for the changed mesh list. 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

This post processing step removes bones nearly losslessly or according to a configured threshold.

In order to remove the bone, the primitives affected by the bone are split from the mesh. The split off (new) mesh is boneless. At any point in time, bones without affect upon a given mesh are to be removed.

Constructor & Destructor Documentation

◆ DeboneProcess()

DeboneProcess::DeboneProcess ( )

◆ ~DeboneProcess()

DeboneProcess::~DeboneProcess ( )

Member Function Documentation

◆ ApplyTransform()

void DeboneProcess::ApplyTransform ( aiMesh mesh,
const aiMatrix4x4 mat 
) const
protected

◆ ConsiderMesh()

bool DeboneProcess::ConsiderMesh ( const aiMesh pMesh)
protected

Counts bones total/removable in a given mesh.

Parameters
pMeshThe mesh to process.

◆ Execute()

void DeboneProcess::Execute ( aiScene pScene)
protectedvirtual

Executes the post processing step on the given imported data.

At the moment a process is not supposed to fail.

Parameters
pSceneThe imported data to work at.

Implements Assimp::BaseProcess.

◆ IsActive()

bool DeboneProcess::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.

◆ SetupProperties()

void DeboneProcess::SetupProperties ( const Importer pImp)
virtual

Called prior to ExecuteOnScene().

The function is a request to the process to update its configuration basing on the Importer's configuration property list.

Reimplemented from Assimp::BaseProcess.

◆ SplitMesh()

void DeboneProcess::SplitMesh ( const aiMesh pMesh,
std::vector< std::pair< aiMesh *, const aiBone * > > &  poNewMeshes 
) const
protected

Splits the given mesh by bone count.

Parameters
pMeshthe Mesh to split. Is not changed at all, but might be superfluous in case it was split.
poNewMeshesArray of submeshes created in the process. Empty if splitting was not necessary.

◆ UpdateNode()

void DeboneProcess::UpdateNode ( aiNode pNode) const
protected

Recursively updates the node's mesh list to account for the changed mesh list.

Member Data Documentation

◆ mAllOrNone

bool Assimp::DeboneProcess::mAllOrNone

◆ mNumBones

unsigned int Assimp::DeboneProcess::mNumBones

Number of bones present in the scene.

◆ mNumBonesCanDoWithout

unsigned int Assimp::DeboneProcess::mNumBonesCanDoWithout

◆ mSubMeshIndices

std::vector< std::vector< std::pair< unsigned int,aiNode* > > > Assimp::DeboneProcess::mSubMeshIndices

Per mesh index: Array of indices of the new submeshes.

◆ mThreshold

float Assimp::DeboneProcess::mThreshold

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