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

This post processing step limits the number of bones affecting a vertex to a certain maximum value. More...

Inherits Assimp::BaseProcess.

Classes

struct  Weight
 Describes a bone weight on a vertex. More...
 

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...
 
 LimitBoneWeightsProcess ()
 
void ProcessMesh (aiMesh *pMesh)
 Limits the bone weight count for all vertices in the given mesh. More...
 
void SetupProperties (const Importer *pImp)
 Called prior to ExecuteOnScene(). More...
 
 ~LimitBoneWeightsProcess ()
 
- 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

unsigned int mMaxWeights
 Maximum number of bones influencing any single vertex. 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 limits the number of bones affecting a vertex to a certain maximum value.

If a vertex is affected by more than that number of bones, the bone weight with the least influence on this vertex are removed. The other weights on this bone are then renormalized to assure the sum weight to be 1.

Constructor & Destructor Documentation

◆ LimitBoneWeightsProcess()

LimitBoneWeightsProcess::LimitBoneWeightsProcess ( )

◆ ~LimitBoneWeightsProcess()

LimitBoneWeightsProcess::~LimitBoneWeightsProcess ( )

Member Function Documentation

◆ Execute()

void LimitBoneWeightsProcess::Execute ( aiScene pScene)
virtual

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 LimitBoneWeightsProcess::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.

◆ ProcessMesh()

void LimitBoneWeightsProcess::ProcessMesh ( aiMesh pMesh)

Limits the bone weight count for all vertices in the given mesh.

Parameters
pMeshThe mesh to process.

◆ SetupProperties()

void LimitBoneWeightsProcess::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.

Member Data Documentation

◆ mMaxWeights

unsigned int Assimp::LimitBoneWeightsProcess::mMaxWeights

Maximum number of bones influencing any single vertex.


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