iso::space::NTree Class Reference

n-dimensional space segmentation tree for space objects More...

#include <iso_space_ntree.h>

Collaboration diagram for iso::space::NTree:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NTree (const math::Vector< real > &pMinPos, const math::Vector< real > &pMaxPos)
 create ntree
 ~NTree ()
 destructor
void resize (const math::Vector< real > &pMinPos, const math::Vector< real > &pMaxPos)
 change space size
NTreeNoderootNode ()
 return root node
base::String info () const
 obtain textual ntree information

Protected Member Functions

 NTree ()

Protected Attributes

int mMaxDepth
 maximum ntree depth
int mMinObjectCount
 minimum space object count
math::Vector< realmMinPos
 ntree minimum space position
math::Vector< realmMaxPos
 ntree maximum space position
NTreeNodemRootNode
 root node

Friends

class NTreeVisitor
std::ostream & operator<< (std::ostream &pOstream, const NTree &pTree)
 retrieve textual ntree information

Detailed Description

n-dimensional space segmentation tree for space objects

segmentation tree for space objects

Created by Daniel Bisig on 3/29/07. Copyright 2006 Daniel Bisig All rights reserved.


Constructor & Destructor Documentation

NTree::NTree ( const math::Vector< real > &  pMinPos,
const math::Vector< real > &  pMaxPos 
)

create ntree

Parameters:
pMinPos minimum position in space
pMaxPos maximum position in space

NTree::~NTree (  ) 

destructor

NTree::NTree (  )  [protected]

/brief default constructor


Member Function Documentation

void NTree::resize ( const math::Vector< real > &  pMinPos,
const math::Vector< real > &  pMaxPos 
)

change space size

Parameters:
pMinPos minimum position in space
pMaxPos maximum position in space
Remarks:
fails if dimension of new minimum and maximum position don't match tree dimension
doing this requires that the tree must be cleared and rebuilt from scratch.
this is fairly dangerous because there is no mechanism that ensures that this happens, the user must take care if it

NTreeNode * NTree::rootNode (  ) 

return root node

Returns:
root node

base::String NTree::info (  )  const

obtain textual ntree information

Returns:
String containing textual ntree information


Friends And Related Function Documentation

friend class NTreeVisitor [friend]

std::ostream& operator<< ( std::ostream &  pOstream,
const NTree pTree 
) [friend]

retrieve textual ntree information

Parameters:
pOstream output stream
pTree ntree


Member Data Documentation

int iso::space::NTree::mMaxDepth [protected]

maximum ntree depth

> 0 : enforce depth limit < 0 : no depth limit

int iso::space::NTree::mMinObjectCount [protected]

minimum space object count

minimum number of space objects in a node for recursion to continue creating node children

> 0 : enforce space object count limit < 0 : no space object count limit

math::Vector<real> iso::space::NTree::mMinPos [protected]

ntree minimum space position

math::Vector<real> iso::space::NTree::mMaxPos [protected]

ntree maximum space position

NTreeNode* iso::space::NTree::mRootNode [protected]

root node


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 14:08:15 2011 for iso_space by  doxygen 1.5.1