Implements a binary space partitioning tree See also: https://en.wikipedia.org/wiki/Binary_space_partitioning.
More...
#include <mapblock_mesh.h>
|
s32 | buildTree (v3f normal, v3f origin, float delta, const std::vector< s32 > &list, u32 depth) |
|
void | traverse (s32 node, v3f viewpoint, std::vector< s32 > &output) const |
|
Implements a binary space partitioning tree See also: https://en.wikipedia.org/wiki/Binary_space_partitioning.
◆ MapBlockBspTree()
MapBlockBspTree::MapBlockBspTree |
( |
| ) |
|
|
inline |
◆ buildTree() [1/2]
void MapBlockBspTree::buildTree |
( |
const std::vector< MeshTriangle > * |
triangles, |
|
|
u16 |
side_lingth |
|
) |
| |
◆ buildTree() [2/2]
s32 MapBlockBspTree::buildTree |
( |
v3f |
normal, |
|
|
v3f |
origin, |
|
|
float |
delta, |
|
|
const std::vector< s32 > & |
list, |
|
|
u32 |
depth |
|
) |
| |
|
private |
◆ traverse() [1/2]
void MapBlockBspTree::traverse |
( |
s32 |
node, |
|
|
v3f |
viewpoint, |
|
|
std::vector< s32 > & |
output |
|
) |
| const |
|
private |
◆ traverse() [2/2]
void MapBlockBspTree::traverse |
( |
v3f |
viewpoint, |
|
|
std::vector< s32 > & |
output |
|
) |
| const |
|
inline |
◆ nodes
std::vector<TreeNode> MapBlockBspTree::nodes |
|
private |
◆ root
s32 MapBlockBspTree::root = -1 |
|
private |
◆ triangles
const std::vector<MeshTriangle>* MapBlockBspTree::triangles = nullptr |
|
private |
The documentation for this class was generated from the following files: