Blender V2.61 - r43446
Public Member Functions

SG_TreeFactory Class Reference

#include <SG_Tree.h>

List of all members.

Public Member Functions

 SG_TreeFactory ()
 ~SG_TreeFactory ()
void Add (SG_Node *client)
void Add (SG_Tree *tree)
SG_TreeMakeTreeUp ()
SG_TreeMakeTreeDown (SG_BBox &bbox)
SG_TreeMakeTree ()

Detailed Description

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.

Warning:
O(n^3)!!!

Definition at line 132 of file SG_Tree.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

SG_Tree * SG_TreeFactory::MakeTreeDown ( SG_BBox bbox)
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().


The documentation for this class was generated from the following files: