Untold Engine
Beta v0.0.16
docs
|
The U4DMeshOctreeManager class builds an octree bounding a 3d model. More...
Public Member Functions | |
U4DMeshOctreeManager (U4DModel *uModel) | |
constructor for the U4DMeshOctreeManager. The constructor transforms the 3d mesh faces from local space to absolute space More... | |
~U4DMeshOctreeManager () | |
Destructor for the U4DMeshOctreeManager. | |
void | buildOctree (int uSubDivisions) |
Builds the octree. More... | |
void | buildOctreeNode (U4DMeshOctreeNode *uNode, U4DPoint3n &uCenter, float uHalfwidth, int uSubDivisions) |
Builds the octree nodes. More... | |
void | assignFacesToNodeLeaf () |
Assigns triangles(faces) of the 3D model mesh to node leaves. | |
U4DMeshOctreeNode * | getRootNode () |
Returns a pointer to the octree. | |
void | computeMeshFacesAbsoluteSpace () |
Transforms the mesh faces of the 3D model from local space to absolute space. | |
std::vector< U4DTriangle > | getMeshFacesAbsoluteSpaceContainer () |
returns the mesh faces in absolute space | |
The U4DMeshOctreeManager class builds an octree bounding a 3d model.
U4DEngine::U4DMeshOctreeManager::U4DMeshOctreeManager | ( | U4DModel * | uModel | ) |
constructor for the U4DMeshOctreeManager. The constructor transforms the 3d mesh faces from local space to absolute space
uModel | pointer to the model whose octree will be based on |
void U4DEngine::U4DMeshOctreeManager::buildOctree | ( | int | uSubDivisions | ) |
Builds the octree.
Builds an octree for the 3D model using AABB boxes
uSubDivisions | The subdivisions used for the octree. 1 subdivision=9 nodes, 2 subdivisions=73 node, 3 subdivisions=585 nodes |
void U4DEngine::U4DMeshOctreeManager::buildOctreeNode | ( | U4DMeshOctreeNode * | uNode, |
U4DPoint3n & | uCenter, | ||
float | uHalfwidth, | ||
int | uSubDivisions | ||
) |
Builds the octree nodes.
uNode | Octree node |
uCenter | center of the AABB box |
uSubDivisions | current subdivision of the the octree |