Blender V2.61 - r43446
|
#include <SG_Tree.h>
Public Member Functions | |
SG_TreeFactory () | |
~SG_TreeFactory () | |
void | Add (SG_Node *client) |
void | Add (SG_Tree *tree) |
SG_Tree * | MakeTreeUp () |
SG_Tree * | MakeTreeDown (SG_BBox &bbox) |
SG_Tree * | MakeTree () |
SG_TreeFactory generates an SG_Tree from a list of SG_Nodes. It joins pairs of SG_Nodes to minimise the size of the resultant bounding box. cf building an optimised Huffman tree.
SG_TreeFactory::SG_TreeFactory | ( | ) |
Definition at line 218 of file SG_Tree.cpp.
SG_TreeFactory::~SG_TreeFactory | ( | ) |
Definition at line 222 of file SG_Tree.cpp.
void SG_TreeFactory::Add | ( | SG_Node * | client | ) |
Add a node to be added to the tree.
Definition at line 226 of file SG_Tree.cpp.
Referenced by MakeTreeDown().
void SG_TreeFactory::Add | ( | SG_Tree * | tree | ) |
Definition at line 232 of file SG_Tree.cpp.
SG_Tree * SG_TreeFactory::MakeTree | ( | ) |
Definition at line 329 of file SG_Tree.cpp.
References MakeTreeDown(), and MakeTreeUp().
Build the tree from the set of nodes top down.
Definition at line 237 of file SG_Tree.cpp.
References Add(), SG_Tree::BBox(), SG_BBox::inside(), SG_BBox::INSIDE, SG_BBox::INTERSECT, left(), MakeTreeDown(), MakeTreeUp(), NULL, SG_BBox::OUTSIDE, MakeCursor::root, SG_Tree::SetLeft(), SG_Tree::SetRight(), SG_BBox::split(), SG_BBox::test(), and SG_BBox::volume().
Referenced by MakeTree(), and MakeTreeDown().
SG_Tree * SG_TreeFactory::MakeTreeUp | ( | ) |
Build the tree from the set of nodes added by the Add method.
Definition at line 342 of file SG_Tree.cpp.
References HalfArray< T >::delete_column(), HalfArray< T >::erase_row(), FLT_MAX, min, NULL, HalfArray< T >::resize(), and UINT_MAX.
Referenced by MakeTree(), and MakeTreeDown().