OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
Terrain::QuadTreeNode Class Reference

#include <quadtreenode.hpp>

Inheritance diagram for Terrain::QuadTreeNode:
Collaboration diagram for Terrain::QuadTreeNode:

Public Member Functions

 QuadTreeNode (QuadTreeNode *parent, ChildDirection dir, float size, const osg::Vec2f &center)
 
virtual ~QuadTreeNode ()
 
QuadTreeNode * getParent ()
 
QuadTreeNode * getChild (unsigned int i)
 
ChildDirection getDirection ()
 Returns our direction relative to the parent node, or Root if we are the root node. More...
 
QuadTreeNode * getNeighbour (Direction dir)
 Get neighbour node in this direction. More...
 
void initNeighbours ()
 Initialize neighbours - do this after the quadtree is built. More...
 
void setBoundingBox (const osg::BoundingBox &boundingBox)
 
const osg::BoundingBox & getBoundingBox () const
 
bool hasValidBounds () const
 
virtual osg::BoundingSphere computeBound () const
 
float getSize () const
 size in cell coordinates More...
 
const osg::Vec2f & getCenter () const
 center in cell coordinates More...
 
virtual void traverse (osg::NodeVisitor &nv)
 
void setLodCallback (LodCallback *lodCallback)
 Set the Lod callback to use for determining when to stop traversing further down the quad tree. More...
 
LodCallback * getLodCallback ()
 
void setViewDataMap (ViewDataMap *map)
 Set the view data map that the finally used nodes for a given camera/intersection are pushed onto. More...
 
ViewDataMap * getViewDataMap ()
 
ViewData * getView (osg::NodeVisitor &nv)
 Create or retrieve a view for the given traversal. More...
 

Private Attributes

QuadTreeNode * mParent
 
QuadTreeNode * mNeighbours [4]
 
ChildDirection mDirection
 
osg::BoundingBox mBoundingBox
 
bool mValidBounds
 
float mSize
 
osg::Vec2f mCenter
 
osg::ref_ptr< LodCallback > mLodCallback
 
ViewDataMap * mViewDataMap
 

Constructor & Destructor Documentation

Terrain::QuadTreeNode::QuadTreeNode ( QuadTreeNode *  parent,
ChildDirection  dir,
float  size,
const osg::Vec2f &  center 
)
Terrain::QuadTreeNode::~QuadTreeNode ( )
virtual

Member Function Documentation

osg::BoundingSphere Terrain::QuadTreeNode::computeBound ( ) const
virtual
const osg::BoundingBox & Terrain::QuadTreeNode::getBoundingBox ( ) const

Here is the caller graph for this function:

const osg::Vec2f & Terrain::QuadTreeNode::getCenter ( ) const

center in cell coordinates

Here is the caller graph for this function:

QuadTreeNode * Terrain::QuadTreeNode::getChild ( unsigned int  i)

Here is the caller graph for this function:

ChildDirection Terrain::QuadTreeNode::getDirection ( )
inline

Returns our direction relative to the parent node, or Root if we are the root node.

Here is the caller graph for this function:

LodCallback * Terrain::QuadTreeNode::getLodCallback ( )

Here is the caller graph for this function:

QuadTreeNode * Terrain::QuadTreeNode::getNeighbour ( Direction  dir)

Get neighbour node in this direction.

Here is the caller graph for this function:

QuadTreeNode * Terrain::QuadTreeNode::getParent ( )

Here is the caller graph for this function:

float Terrain::QuadTreeNode::getSize ( ) const

size in cell coordinates

Here is the caller graph for this function:

ViewData * Terrain::QuadTreeNode::getView ( osg::NodeVisitor &  nv)

Create or retrieve a view for the given traversal.

Here is the call graph for this function:

Here is the caller graph for this function:

ViewDataMap * Terrain::QuadTreeNode::getViewDataMap ( )
bool Terrain::QuadTreeNode::hasValidBounds ( ) const
inline

Here is the caller graph for this function:

void Terrain::QuadTreeNode::initNeighbours ( )

Initialize neighbours - do this after the quadtree is built.

Here is the call graph for this function:

Here is the caller graph for this function:

void Terrain::QuadTreeNode::setBoundingBox ( const osg::BoundingBox &  boundingBox)

Here is the caller graph for this function:

void Terrain::QuadTreeNode::setLodCallback ( LodCallback *  lodCallback)

Set the Lod callback to use for determining when to stop traversing further down the quad tree.

void Terrain::QuadTreeNode::setViewDataMap ( ViewDataMap *  map)

Set the view data map that the finally used nodes for a given camera/intersection are pushed onto.

void Terrain::QuadTreeNode::traverse ( osg::NodeVisitor &  nv)
virtual

Here is the call graph for this function:

Member Data Documentation

osg::BoundingBox Terrain::QuadTreeNode::mBoundingBox
private
osg::Vec2f Terrain::QuadTreeNode::mCenter
private
ChildDirection Terrain::QuadTreeNode::mDirection
private
osg::ref_ptr<LodCallback> Terrain::QuadTreeNode::mLodCallback
private
QuadTreeNode* Terrain::QuadTreeNode::mNeighbours[4]
private
QuadTreeNode* Terrain::QuadTreeNode::mParent
private
float Terrain::QuadTreeNode::mSize
private
bool Terrain::QuadTreeNode::mValidBounds
private
ViewDataMap* Terrain::QuadTreeNode::mViewDataMap
private

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