NLPACS::IQuadNode Class Reference

#include <surface_quad.h>

Inheritance diagram for NLPACS::IQuadNode:

NLPACS::CQuadBranch NLPACS::CQuadLeaf

Public Member Functions

virtual void addVertex (const NLMISC::CVector &v)
virtual bool check () const
virtual NLMISC::CAABBox getBBox () const
virtual const IQuadNodegetChild (uint child) const=0
virtual uint8 getLevel () const
virtual float getMaxHeight () const
virtual float getMinHeight () const
virtual bool isLeaf () const=0
virtual void serial (NLMISC::IStream &f)
virtual void translate (const NLMISC::CVector &translation)
virtual ~IQuadNode ()

Protected Member Functions

 IQuadNode (uint8 level=0)

Protected Attributes

float _HalfSize
uint8 _Level
float _MaxHeight
float _MaxThickness
float _MinHeight
float _XCenter
float _YCenter

Friends

class CQuadBranch
class CQuadLeaf
class CSurfaceQuadTree

Constructor & Destructor Documentation

NLPACS::IQuadNode::IQuadNode uint8  level = 0  )  [inline, protected]
 

Definition at line 49 of file surface_quad.h.

References level, and uint8.

00049 : _Level(level) {}

virtual NLPACS::IQuadNode::~IQuadNode  )  [inline, virtual]
 

Definition at line 51 of file surface_quad.h.

00051 {}


Member Function Documentation

virtual void NLPACS::IQuadNode::addVertex const NLMISC::CVector v  )  [inline, virtual]
 

Reimplemented in NLPACS::CQuadBranch.

Definition at line 57 of file surface_quad.h.

References _MaxHeight, _MinHeight, and v.

Referenced by NLPACS::CQuadBranch::addVertex(), and NLPACS::CSurfaceQuadTree::addVertex().

00058         {
00059                 if (v.z < _MinHeight)   _MinHeight = v.z;
00060                 if (v.z > _MaxHeight)   _MaxHeight = v.z;
00061         }

virtual bool NLPACS::IQuadNode::check  )  const [inline, virtual]
 

Reimplemented in NLPACS::CQuadLeaf, and NLPACS::CQuadBranch.

Definition at line 78 of file surface_quad.h.

References _MaxHeight, and _MinHeight.

Referenced by NLPACS::CSurfaceQuadTree::check(), and NLPACS::CQuadBranch::check().

00078 { return (_MaxHeight >= _MinHeight); }

virtual NLMISC::CAABBox NLPACS::IQuadNode::getBBox  )  const [inline, virtual]
 

Definition at line 62 of file surface_quad.h.

References _HalfSize, _XCenter, _YCenter, NLMISC::CAABBox::setCenter(), and NLMISC::CAABBox::setHalfSize().

Referenced by NLPACS::CSurfaceQuadTree::getInterpZ(), and NLPACS::CSurfaceQuadTree::getLeaf().

00063         {
00064                 NLMISC::CAABBox bbox;
00065                 bbox.setCenter(NLMISC::CVector(_XCenter, _YCenter, 0.0f));
00066                 bbox.setHalfSize(NLMISC::CVector(_HalfSize, _HalfSize, 10000.0f));
00067                 return bbox;
00068         }

virtual const IQuadNode* NLPACS::IQuadNode::getChild uint  child  )  const [pure virtual]
 

Implemented in NLPACS::CQuadLeaf, and NLPACS::CQuadBranch.

Referenced by NLPACS::CSurfaceQuadTree::getInterpZ(), and NLPACS::CSurfaceQuadTree::getLeaf().

virtual uint8 NLPACS::IQuadNode::getLevel  )  const [inline, virtual]
 

Definition at line 55 of file surface_quad.h.

References uint8.

00055 { return _Level; }

virtual float NLPACS::IQuadNode::getMaxHeight  )  const [inline, virtual]
 

Definition at line 54 of file surface_quad.h.

References _MaxHeight.

Referenced by NLPACS::CSurfaceQuadTree::compile(), NLPACS::CLocalRetriever::getHeight(), and NLPACS::CQuadBranch::reduceChildren().

00054 { return _MaxHeight; }

virtual float NLPACS::IQuadNode::getMinHeight  )  const [inline, virtual]
 

Definition at line 53 of file surface_quad.h.

References _MinHeight.

Referenced by NLPACS::CSurfaceQuadTree::compile(), NLPACS::CLocalRetriever::getHeight(), and NLPACS::CQuadBranch::reduceChildren().

00053 { return _MinHeight; }

virtual bool NLPACS::IQuadNode::isLeaf  )  const [pure virtual]
 

Implemented in NLPACS::CQuadLeaf, and NLPACS::CQuadBranch.

Referenced by NLPACS::CSurfaceQuadTree::compile(), NLPACS::CSurfaceQuadTree::getInterpZ(), NLPACS::CSurfaceQuadTree::getLeaf(), NLPACS::CQuadBranch::operator=(), NLPACS::CSurfaceQuadTree::operator=(), NLPACS::CQuadBranch::reduceChildren(), NLPACS::CSurfaceQuadTree::serial(), and NLPACS::CQuadBranch::serial().

virtual void NLPACS::IQuadNode::serial NLMISC::IStream f  )  [inline, virtual]
 

Reimplemented in NLPACS::CQuadLeaf, and NLPACS::CQuadBranch.

Definition at line 80 of file surface_quad.h.

References _HalfSize, _MaxHeight, _MaxThickness, _MinHeight, _XCenter, _YCenter, and NLMISC::IStream::serial().

Referenced by NLPACS::CSurfaceQuadTree::serial().

00081         {
00082                 f.serial(_MinHeight, _MaxHeight, _Level, _MaxThickness);
00083                 f.serial(_XCenter, _YCenter, _HalfSize);
00084         }

virtual void NLPACS::IQuadNode::translate const NLMISC::CVector translation  )  [inline, virtual]
 

Reimplemented in NLPACS::CQuadBranch.

Definition at line 70 of file surface_quad.h.

References _MaxHeight, _MinHeight, _XCenter, _YCenter, NLMISC::CVector::x, NLMISC::CVector::y, and NLMISC::CVector::z.

Referenced by NLPACS::CSurfaceQuadTree::translate(), and NLPACS::CQuadBranch::translate().

00071         {
00072                 _XCenter += translation.x;
00073                 _YCenter += translation.y;
00074                 _MinHeight += translation.z;
00075                 _MaxHeight += translation.z;
00076         }


Friends And Related Function Documentation

friend class CQuadBranch [friend]
 

Definition at line 43 of file surface_quad.h.

friend class CQuadLeaf [friend]
 

Definition at line 42 of file surface_quad.h.

Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CQuadBranch::operator=(), NLPACS::CQuadBranch::reduceChildren(), and NLPACS::CQuadBranch::serial().

friend class CSurfaceQuadTree [friend]
 

Reimplemented in NLPACS::CQuadBranch.

Definition at line 41 of file surface_quad.h.


Field Documentation

float NLPACS::IQuadNode::_HalfSize [protected]
 

Definition at line 48 of file surface_quad.h.

Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), getBBox(), and serial().

uint8 NLPACS::IQuadNode::_Level [protected]
 

Definition at line 47 of file surface_quad.h.

float NLPACS::IQuadNode::_MaxHeight [protected]
 

Definition at line 44 of file surface_quad.h.

Referenced by addVertex(), NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), check(), getMaxHeight(), serial(), and translate().

float NLPACS::IQuadNode::_MaxThickness [protected]
 

Definition at line 46 of file surface_quad.h.

Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), and serial().

float NLPACS::IQuadNode::_MinHeight [protected]
 

Definition at line 44 of file surface_quad.h.

Referenced by addVertex(), NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), check(), getMinHeight(), serial(), and translate().

float NLPACS::IQuadNode::_XCenter [protected]
 

Definition at line 48 of file surface_quad.h.

Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), getBBox(), NLPACS::CSurfaceQuadTree::getInterpZ(), NLPACS::CSurfaceQuadTree::getLeaf(), serial(), and translate().

float NLPACS::IQuadNode::_YCenter [protected]
 

Definition at line 48 of file surface_quad.h.

Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), getBBox(), NLPACS::CSurfaceQuadTree::getInterpZ(), NLPACS::CSurfaceQuadTree::getLeaf(), serial(), and translate().


The documentation for this class was generated from the following file:
Generated on Tue Mar 16 14:25:13 2004 for NeL by doxygen 1.3.6