|
Assimp
v4.1. (December 2018)
|
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 () | |
| The class constructor. More... | |
| 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 () | |
| The class destructor. More... | |
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... | |
| 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 | |
Protected Attributes inherited from Assimp::BaseProcess | |
| 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 | ( | ) |
The class constructor.
| OptimizeMeshesProcess::~OptimizeMeshesProcess | ( | ) |
The class destructor.
|
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.
|
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.
| pScene | The imported data to work at. |
Implements Assimp::BaseProcess.
|
protected |
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 |
|
protected |
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 |
|
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.