|
MxEngine
|
#include <LODGenerator.h>
Public Member Functions | |
| LODGenerator (const MeshData &mesh) | |
| MeshData | CreateObject (float threshold) |
LODGenerator is a special class which encapsulates mesh LOD generation algorithm The idea is quite simple, fast and straightforward (but rather inaccurate) - we try to delete vertecies which are close to each other and then reconstruct the mesh Ofc this results in slight holes in mesh or its deformation, but corretcly selected distance for LODs will hide such errors
| MxEngine::LODGenerator::LODGenerator | ( | const MeshData & | mesh | ) |
construct LODGenerator object. Calls PrepareIndexData() method. Note that MeshData must not be destroyed till LODGenerator is used
| mesh | mesh of object from which LODs will be generated |
| MeshData MxEngine::LODGenerator::CreateObject | ( | float | threshold | ) |
creates new LOD as MeshData object.
| threshold | minimal value in vertecies components from which vertecies are considered equal (see Vector3Cmp comparator) |
1.8.12