Functions

sp::scene::TreeBuilder Namespace Reference

Functions

SP_EXPORT KDTreeNodebuildKdTree (const std::list< Mesh * > &MeshList, u8 MaxTreeLevel, const EKDTreeBuildingConcepts Concept, bool PreTransform)
SP_EXPORT KDTreeNodebuildKdTree (Mesh *Object, u8 MaxTreeLevel=12, const EKDTreeBuildingConcepts Concept=KDTREECONCEPT_CENTER)
 Builds a kd-Tree only for one mesh object.
SP_EXPORT OcTreeNodebuildOcTree (Mesh *Object, u8 MaxTreeLevel)
SP_EXPORT QuadTreeNodebuildQuadTree (Mesh *Object, u8 MaxTreeLevel)
SP_EXPORT BSPTreeNodebuildBSPTree (Mesh *Object, u8 MaxTreeLevel)
SP_EXPORT OBBTreeNodebuildOBBTree (const std::list< dim::obbox3df > &BoxList)

Detailed Description

This tree builder namespace builds or rather constructs all hierarchical trees. It builds particular trees for collision detection purposes.

Note:
Building a tree for a mesh can modify your geometry object. Sometimes triangles will be cut and divided into two parts.

Function Documentation

SP_EXPORT BSPTreeNode * sp::scene::TreeBuilder::buildBSPTree ( Mesh *  Object,
u8  MaxTreeLevel 
)
SP_EXPORT KDTreeNode * sp::scene::TreeBuilder::buildKdTree ( Mesh *  Object,
u8  MaxTreeLevel,
const EKDTreeBuildingConcepts  Concept 
)

Builds a kd-Tree only for one mesh object.

SP_EXPORT KDTreeNode * sp::scene::TreeBuilder::buildKdTree ( const std::list< Mesh * > &  MeshList,
u8  MaxTreeLevel = 12,
const EKDTreeBuildingConcepts  Concept = KDTREECONCEPT_CENTER,
bool  PreTransform = true 
)

Builds a kd-Tree with scene::SCollisionFace data packets as user data.

Parameters:
MeshList,: Specifies the list of meshes. Only one large kd-Tree will be constructed out of several mesh objects.
MaxForkLevel,: Specifies the maximal fork level. Some leaf nodes can have a lower level. Don't make it too large!
Concept,: Specifies the concept of building the kd-Tree.
PreTransform,: Specifies whether the triangles are to be pre-transformed or not. i.e. the triangles will be transformed by the mesh matrices.
Returns:
Pointer to the root tree node or 0 if the given meshes have no triangles.
SP_EXPORT OBBTreeNode * sp::scene::TreeBuilder::buildOBBTree ( const std::list< dim::obbox3df > &  BoxList  ) 
SP_EXPORT OcTreeNode * sp::scene::TreeBuilder::buildOcTree ( Mesh *  Object,
u8  MaxTreeLevel 
)
SP_EXPORT QuadTreeNode * sp::scene::TreeBuilder::buildQuadTree ( Mesh *  Object,
u8  MaxTreeLevel 
)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines