#include <surface_quad.h>
Inheritance diagram for NLPACS::CQuadLeaf:
Public Member Functions | |
virtual void | addVertex (const NLMISC::CVector &v) |
bool | check () const |
CQuadLeaf (uint8 level=0) | |
virtual NLMISC::CAABBox | getBBox () const |
const IQuadNode * | getChild (uint child) const |
virtual uint8 | getLevel () const |
virtual float | getMaxHeight () const |
virtual float | getMinHeight () const |
bool | isLeaf () const |
void | serial (NLMISC::IStream &f) |
virtual void | translate (const NLMISC::CVector &translation) |
Protected Attributes | |
float | _HalfSize |
uint8 | _Level |
float | _MaxHeight |
float | _MaxThickness |
float | _MinHeight |
float | _XCenter |
float | _YCenter |
Friends | |
class | CQuadBranch |
class | CQuadLeaf |
class | CSurfaceQuadTree |
|
Definition at line 91 of file surface_quad.h.
00091 : IQuadNode(level) {} |
|
Reimplemented in NLPACS::CQuadBranch. Definition at line 57 of file surface_quad.h. References NLPACS::IQuadNode::_MaxHeight, NLPACS::IQuadNode::_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 } |
|
Reimplemented from NLPACS::IQuadNode. Definition at line 94 of file surface_quad.h.
00095 { 00096 if (!IQuadNode::check()) 00097 return false; 00098 return (_Level == 1 || _MaxHeight-_MinHeight <= _MaxThickness); 00099 } |
|
Definition at line 62 of file surface_quad.h. References NLPACS::IQuadNode::_HalfSize, NLPACS::IQuadNode::_XCenter, NLPACS::IQuadNode::_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 } |
|
Implements NLPACS::IQuadNode. Definition at line 93 of file surface_quad.h. Referenced by NLPACS::CSurfaceQuadTree::getInterpZ().
00093 { nlerror("Can't access child %d on the leaf!", child); return NULL; } |
|
Definition at line 55 of file surface_quad.h. References uint8.
00055 { return _Level; } |
|
Definition at line 54 of file surface_quad.h. References NLPACS::IQuadNode::_MaxHeight. Referenced by NLPACS::CSurfaceQuadTree::compile(), NLPACS::CLocalRetriever::getHeight(), and NLPACS::CQuadBranch::reduceChildren().
00054 { return _MaxHeight; } |
|
Definition at line 53 of file surface_quad.h. References NLPACS::IQuadNode::_MinHeight. Referenced by NLPACS::CSurfaceQuadTree::compile(), NLPACS::CLocalRetriever::getHeight(), and NLPACS::CQuadBranch::reduceChildren().
00053 { return _MinHeight; } |
|
Implements NLPACS::IQuadNode. Definition at line 92 of file surface_quad.h. Referenced by NLPACS::CSurfaceQuadTree::getInterpZ().
00092 { return true; } |
|
Reimplemented from NLPACS::IQuadNode. Definition at line 101 of file surface_quad.h. Referenced by NLPACS::CSurfaceQuadTree::serial(), and NLPACS::CQuadBranch::serial().
00101 { IQuadNode::serial(f); } |
|
Reimplemented in NLPACS::CQuadBranch. Definition at line 70 of file surface_quad.h. References NLPACS::IQuadNode::_MaxHeight, NLPACS::IQuadNode::_MinHeight, NLPACS::IQuadNode::_XCenter, NLPACS::IQuadNode::_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 } |
|
Definition at line 43 of file surface_quad.h. |
|
Definition at line 42 of file surface_quad.h. Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CQuadBranch::operator=(), NLPACS::CQuadBranch::reduceChildren(), and NLPACS::CQuadBranch::serial(). |
|
Reimplemented in NLPACS::CQuadBranch. Definition at line 41 of file surface_quad.h. |
|
Definition at line 48 of file surface_quad.h. Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), NLPACS::IQuadNode::getBBox(), and NLPACS::IQuadNode::serial(). |
|
Definition at line 47 of file surface_quad.h. |
|
Definition at line 44 of file surface_quad.h. Referenced by NLPACS::IQuadNode::addVertex(), NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), NLPACS::IQuadNode::check(), NLPACS::IQuadNode::getMaxHeight(), NLPACS::IQuadNode::serial(), and NLPACS::IQuadNode::translate(). |
|
Definition at line 46 of file surface_quad.h. Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), and NLPACS::IQuadNode::serial(). |
|
Definition at line 44 of file surface_quad.h. Referenced by NLPACS::IQuadNode::addVertex(), NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), NLPACS::IQuadNode::check(), NLPACS::IQuadNode::getMinHeight(), NLPACS::IQuadNode::serial(), and NLPACS::IQuadNode::translate(). |
|
Definition at line 48 of file surface_quad.h. Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), NLPACS::IQuadNode::getBBox(), NLPACS::CSurfaceQuadTree::getInterpZ(), NLPACS::CSurfaceQuadTree::getLeaf(), NLPACS::IQuadNode::serial(), and NLPACS::IQuadNode::translate(). |
|
Definition at line 48 of file surface_quad.h. Referenced by NLPACS::CQuadBranch::addVertex(), NLPACS::CSurfaceQuadTree::addVertex(), NLPACS::IQuadNode::getBBox(), NLPACS::CSurfaceQuadTree::getInterpZ(), NLPACS::CSurfaceQuadTree::getLeaf(), NLPACS::IQuadNode::serial(), and NLPACS::IQuadNode::translate(). |