Assimp
v3.1.1 (June 2014)
|
Postprocessing step to optimize mesh usage. More...
Inherits Assimp::BaseProcess.
Classes | |
struct | MeshInfo |
Internal utility to store additional mesh info. More... | |
Public Member Functions | |
void | EnablePrimitiveTypeSorting (bool enable) |
Specify whether you want meshes with different primitive types to be merged as well. More... | |
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... | |
bool | IsPrimitiveTypeSortingEnabled () const |
OptimizeMeshesProcess () | |
void | SetPreferredMeshSizeLimit (unsigned int verts, unsigned int faces) |
Specify a maximum size of a single output mesh. More... | |
void | SetupProperties (const Importer *pImp) |
Called prior to ExecuteOnScene(). More... | |
~OptimizeMeshesProcess () | |
![]() | |
BaseProcess () | |
Constructor to be privately used by Importer. More... | |
void | ExecuteOnScene (Importer *pImp) |
Executes the post processing step on the given imported data. More... | |
SharedPostProcessInfo * | GetSharedData () |
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... | |
Protected Member Functions | |
bool | CanJoin (unsigned int a, unsigned int b, unsigned int verts, unsigned int faces) |
Returns true if b can be joined with a. More... | |
void | FindInstancedMeshes (aiNode *pNode) |
Find instanced meshes, for the moment we're excluding them from all optimizations. More... | |
void | ProcessNode (aiNode *pNode) |
Do the actual optimization on all meshes of this node. More... | |
Additional Inherited Members | |
![]() | |
ProgressHandler * | progress |
Currently active progress handler. More... | |
SharedPostProcessInfo * | shared |
See the doc of #SharedPostProcessInfo for more details. More... | |
Postprocessing step to optimize mesh usage.
The implementation looks for meshes that could be joined and joins them. Usually this will reduce the number of drawcalls.
OptimizeMeshesProcess::OptimizeMeshesProcess | ( | ) |
OptimizeMeshesProcess::~OptimizeMeshesProcess | ( | ) |
|
protected |
Returns true if b can be joined with a.
verts | Number of output verts up to now |
faces | Number of output faces up to now |
|
inline |
Specify whether you want meshes with different primitive types to be merged as well.
IsActive() sets this property automatically to true if the aiProcess_SortByPType flag is found.
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.
pScene | The imported data to work at. |
Implements Assimp::BaseProcess.
Find instanced meshes, for the moment we're excluding them from all optimizations.
|
virtual |
Returns whether the processing step is present in the given flag.
pFlags | The processing flags the importer was called with. A bitwise combination of aiPostProcessSteps. |
Implements Assimp::BaseProcess.
|
inline |
Do the actual optimization on all meshes of this node.
pNode | Node we're working with |
|
inline |
Specify a maximum size of a single output mesh.
If a single input mesh already exceeds this limit, it won't be split.
verts | Maximum number of vertices per mesh |
faces | Maximum number of faces per mesh |
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.