Postprocessing step to optimize mesh usage.
More...
#include <OptimizeMeshes.h>
Inherits Assimp::BaseProcess.
|
| 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...
|
| |
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.
- Note
- Instanced meshes are currently not processed.
◆ OptimizeMeshesProcess()
| OptimizeMeshesProcess::OptimizeMeshesProcess |
( |
| ) |
|
◆ ~OptimizeMeshesProcess()
| OptimizeMeshesProcess::~OptimizeMeshesProcess |
( |
| ) |
|
◆ CanJoin()
| bool OptimizeMeshesProcess::CanJoin |
( |
unsigned int |
a, |
|
|
unsigned int |
b, |
|
|
unsigned int |
verts, |
|
|
unsigned int |
faces |
|
) |
| |
|
protected |
Returns true if b can be joined with a.
- Parameters
-
| verts | Number of output verts up to now |
| faces | Number of output faces up to now |
◆ EnablePrimitiveTypeSorting()
| void Assimp::OptimizeMeshesProcess::EnablePrimitiveTypeSorting |
( |
bool |
enable | ) |
|
|
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.
◆ Execute()
| void OptimizeMeshesProcess::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
-
| pScene | The imported data to work at. |
Implements Assimp::BaseProcess.
◆ FindInstancedMeshes()
| void OptimizeMeshesProcess::FindInstancedMeshes |
( |
aiNode * |
pNode | ) |
|
|
protected |
Find instanced meshes, for the moment we're excluding them from all optimizations.
◆ IsActive()
| bool OptimizeMeshesProcess::IsActive |
( |
unsigned int |
pFlags | ) |
const |
|
virtual |
Returns whether the processing step is present in the given flag.
- Parameters
-
| pFlags | The 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.
◆ IsPrimitiveTypeSortingEnabled()
| bool Assimp::OptimizeMeshesProcess::IsPrimitiveTypeSortingEnabled |
( |
| ) |
const |
|
inline |
◆ ProcessNode()
| void OptimizeMeshesProcess::ProcessNode |
( |
aiNode * |
pNode | ) |
|
|
protected |
Do the actual optimization on all meshes of this node.
- Parameters
-
| pNode | Node we're working with |
◆ SetPreferredMeshSizeLimit()
| void Assimp::OptimizeMeshesProcess::SetPreferredMeshSizeLimit |
( |
unsigned int |
verts, |
|
|
unsigned int |
faces |
|
) |
| |
|
inline |
Specify a maximum size of a single output mesh.
If a single input mesh already exceeds this limit, it won't be split.
- Parameters
-
| verts | Maximum number of vertices per mesh |
| faces | Maximum number of faces per mesh |
◆ SetupProperties()
| void OptimizeMeshesProcess::SetupProperties |
( |
const Importer * |
pImp | ) |
|
|
virtual |
The documentation for this class was generated from the following files: