Description
Provides functions for reorganizing the data structure of scene graphs
Note: All of currently implemented functions expect an instance of ListNode to be passed as the scene root. Besides only the scene root and closed nodes are allowed to contain states.
Author: pajustus
Classes
Variables
const std::string | PREFERE_CUBES |
const std::string | USE_GEOMETRY_BB Boolean. If set, bounding boxes of the geometry instead of those of the previous step are used for splitting (quadtree, octree, binary tree, kd-tree). |
const std::string | MAX_TREE_DEPTH Number. The maximum depth of the created tree. Leaves in depth >= maximum will not be split. |
const std::string | MAX_CHILD_COUNT Number. The maximum number of nodes stored in leaves. Leaves with more nodes will be split up as long as the maximum depth is not reached. |
const std::string | LOOSE_FACTOR Number. The scale factor for boxes when inserting nodes. If you don’t want a loose tree, set this value to one. |
const std::string | EXACT_CUBES Boolean. If set, the bounding box is expanded to a cube/square before splitting (quadtree, octree). Don’t forget to disable `use geometry bounding boxes´. |
Functions
void | buildBinaryTree( GroupNode * root, Util::GenericAttributeMap & options) Builds a binary tree by splitting allways the largest dimension. |
void | buildBinaryTree( GroupNode * root) |
void | buildKDTree( GroupNode * root, Util::GenericAttributeMap & options) Builds several variants of kd-trees. |
void | buildKDTree( GroupNode * root) |
void | buildQuadTree( GroupNode * root, Util::GenericAttributeMap & options) Builds several variants of quadtrees. |
void | buildQuadTree( GroupNode * root) |
void | buildOcTree( GroupNode * root, Util::GenericAttributeMap & options) Builds several variants of octrees. |
void | buildOcTree( GroupNode * root) |
void | buildList( GroupNode * root, Util::GenericAttributeMap & options) |
void | buildList( GroupNode * root) |
void | checkPreconditions( Util::Reference < GroupNode > group) checks the preconditions to use a treebuilder, throws exception if not fulfilled |
Documentation
variable
MinSG::TreeBuilder::PREFERE_CUBES
public |
const std::string PREFERE_CUBES |
Boolean. If set, bounding boxes will not always split in all dimensions (quadtree, octree, kd-tree). If the ratio between maximum and minimum extent of the bounding box gets greater than squareroot of two, only the large dimensions are split.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:45
variable
MinSG::TreeBuilder::USE_GEOMETRY_BB
public |
const std::string USE_GEOMETRY_BB |
Boolean. If set, bounding boxes of the geometry instead of those of the previous step are used for splitting (quadtree, octree, binary tree, kd-tree).
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:47
variable
MinSG::TreeBuilder::MAX_TREE_DEPTH
public |
const std::string MAX_TREE_DEPTH |
Number. The maximum depth of the created tree. Leaves in depth >= maximum will not be split.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:49
variable
MinSG::TreeBuilder::MAX_CHILD_COUNT
public |
const std::string MAX_CHILD_COUNT |
Number. The maximum number of nodes stored in leaves. Leaves with more nodes will be split up as long as the maximum depth is not reached.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:51
variable
MinSG::TreeBuilder::LOOSE_FACTOR
public |
const std::string LOOSE_FACTOR |
Number. The scale factor for boxes when inserting nodes. If you don’t want a loose tree, set this value to one.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:53
variable
MinSG::TreeBuilder::EXACT_CUBES
public |
const std::string EXACT_CUBES |
Boolean. If set, the bounding box is expanded to a cube/square before splitting (quadtree, octree). Don’t forget to disable `use geometry bounding boxes´.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:55
function
MinSG::TreeBuilder::buildBinaryTree
public |
void buildBinaryTree( | GroupNode * | root, |
Util::GenericAttributeMap & | options | |
) |
Builds a binary tree by splitting allways the largest dimension.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:58
function
MinSG::TreeBuilder::buildBinaryTree
public | inline |
void buildBinaryTree( | GroupNode * | root ) |
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:59
function
MinSG::TreeBuilder::buildKDTree
public |
void buildKDTree( | GroupNode * | root, |
Util::GenericAttributeMap & | options | |
) |
Builds several variants of kd-trees.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:65
function
MinSG::TreeBuilder::buildKDTree
public | inline |
void buildKDTree( | GroupNode * | root ) |
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:66
function
MinSG::TreeBuilder::buildQuadTree
public |
void buildQuadTree( | GroupNode * | root, |
Util::GenericAttributeMap & | options | |
) |
Builds several variants of quadtrees.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:72
function
MinSG::TreeBuilder::buildQuadTree
public | inline |
void buildQuadTree( | GroupNode * | root ) |
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:73
function
MinSG::TreeBuilder::buildOcTree
public |
void buildOcTree( | GroupNode * | root, |
Util::GenericAttributeMap & | options | |
) |
Builds several variants of octrees.
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:79
function
MinSG::TreeBuilder::buildOcTree
public | inline |
void buildOcTree( | GroupNode * | root ) |
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:80
function
MinSG::TreeBuilder::buildList
public |
void buildList( | GroupNode * | root, |
Util::GenericAttributeMap & | options | |
) |
Builds a simple list.
Parameters
- options
- unused, just for compatibility with other build methods
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:87
function
MinSG::TreeBuilder::buildList
public | inline |
void buildList( | GroupNode * | root ) |
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:88
function
MinSG::TreeBuilder::checkPreconditions
public |
void checkPreconditions( | Util::Reference < GroupNode > | group ) |
checks the preconditions to use a treebuilder, throws exception if not fulfilled
Defined in MinSG/Ext/TreeBuilder/TreeBuilder.h:94