libHSPlasma
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
plSpaceTree Class Reference

#include <plSpaceTree.h>

Inheritance diagram for plSpaceTree:
plCreatable

Public Member Functions

 plSpaceTree ()
virtual void read (hsStream *S, plResManager *mgr)
virtual void write (hsStream *S, plResManager *mgr)
void clear ()
void buildTree (plSpaceBuilderNode *root, int numLeaves)
const plSpaceTreeNode & getNode (short idx) const
short getNodeCount () const
const plSpaceTreeNode & getRoot () const
short addLeaf (const hsBounds3Ext &bounds)
short addParent (const hsBounds3Ext &bounds, short left, short right)
- Public Member Functions inherited from plCreatable
 plCreatable ()
virtual ~plCreatable ()
virtual short ClassIndex () const =0
short ClassIndex (PlasmaVer ver) const
virtual const char * ClassName () const
virtual bool ClassInstance (short) const
virtual bool isStub () const
virtual void prcWrite (pfPrcHelper *prc)
virtual void prcParse (const pfPrcTag *tag, plResManager *mgr)

Protected Member Functions

virtual void IPrcWrite (pfPrcHelper *prc)
virtual void IPrcParse (const pfPrcTag *tag, plResManager *mgr)
void IGatherLeaves (plSpaceBuilderNode *node)
void IMakeTree (plSpaceBuilderNode *node, int target, int curr)

Protected Attributes

std::vector< plSpaceTreeNode > fTree
short fRoot
short fNumLeaves

Constructor & Destructor Documentation

plSpaceTree::plSpaceTree ( )

Member Function Documentation

short plSpaceTree::addLeaf ( const hsBounds3Ext &  bounds)
short plSpaceTree::addParent ( const hsBounds3Ext &  bounds,
short  left,
short  right 
)
void plSpaceTree::buildTree ( plSpaceBuilderNode *  root,
int  numLeaves 
)
void plSpaceTree::clear ( )
const plSpaceTreeNode& plSpaceTree::getNode ( short  idx) const
short plSpaceTree::getNodeCount ( ) const
const plSpaceTreeNode& plSpaceTree::getRoot ( ) const
void plSpaceTree::IGatherLeaves ( plSpaceBuilderNode *  node)
protected
void plSpaceTree::IMakeTree ( plSpaceBuilderNode *  node,
int  target,
int  curr 
)
protected
virtual void plSpaceTree::IPrcParse ( const pfPrcTag *  tag,
plResManager *  mgr 
)
protectedvirtual

This must be overloaded by subclasses to parse PRC data specific to the class from the PRC document. It is called once for each tag that is a child to the Creatable tag itself, so subclasses should check for each supported tag and handle it accordingly if it matches. If the tag is not recognized, it should be passed along to the parent class.

Reimplemented from plCreatable.

virtual void plSpaceTree::IPrcWrite ( pfPrcHelper *  prc)
protectedvirtual

This must be overloaded by subclasses to write PRC data specific to the class to the PRC document. Do not write the top-level creatable tag, that is handled by prcWrite().

Implements plCreatable.

virtual void plSpaceTree::read ( hsStream *  ,
plResManager *   
)
virtual

Reads this creatable directly from the stream. If any keys are read, they will be added to the plResManager automatically.

Reimplemented from plCreatable.

virtual void plSpaceTree::write ( hsStream *  ,
plResManager *   
)
virtual

Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.

Reimplemented from plCreatable.

Member Data Documentation

short plSpaceTree::fNumLeaves
protected
short plSpaceTree::fRoot
protected
std::vector<plSpaceTreeNode> plSpaceTree::fTree
protected

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