# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLMISC::CAABBoxExt Class Reference

An Extended Axis Aligned Bouding Box. More...

#include <aabbox.h>

Inheritance diagram for NLMISC::CAABBoxExt:

NLMISC::CAABBox List of all members.

Public Methods

 CAABBoxExt ()
 Empty bbox Constructor. More...

 CAABBoxExt (const CAABBox &o)
 Constructor from a normal BBox. More...

void serial (NLMISC::IStream &f)
Builds.
void setCenter (const CVector &center)
void setHalfSize (const CVector &hs)
void setSize (const CVector &s)
 Set the size of the bbox (ie 2* the halfSize). More...

void setMinMax (const CVector &bmin, const CVector &bmax)
 Build the bbox, with a min/max style bbox. More...

CAABBoxExt & operator= (const CAABBox &o)
Gets.
CVector getMin () const
CVector getMax () const
const CVectorgetCenter () const
const CVectorgetHalfSize () const
CVector getSize () const
 Return the size of the bbox. More...

float getRadius () const
 Return the (stored!!) radius of the bbox. More...

CAABBox getAABBox () const
 Return a simple Axis Aligned Bounding Box (no radius inside). More...

Clip
bool clipFront (const CPlane &p) const
 Is the bbox partially in front of the plane?? p MUST be normalized. More...

bool clipBack (const CPlane &p) const
 Is the bbox partially in back of the plane?? p MUST be normalized. More...

bool intersect (const CAABBoxExt &box) const
 Does the bbox intersect the bbox box. More...

bool intersect (const CVector &a, const CVector &b, const CVector &c) const
 Does the bbox intersect the triangle ABC. More...


Protected Methods

void updateRadius ()

Protected Attributes

float RadiusMin
float RadiusMax

Detailed Description

An Extended Axis Aligned Bouding Box.

Sphere Min/Max Radius is stored for improved clip test.

Author:
Lionel Berenguier , Nevrax France
Date:
2000

Definition at line 159 of file aabbox.h.


Constructor & Destructor Documentation

NLMISC::CAABBoxExt::CAABBoxExt   [inline]
 

Empty bbox Constructor.

Definition at line 174 of file aabbox.h.

References RadiusMax, and RadiusMin.

Referenced by operator=.

NLMISC::CAABBoxExt::CAABBoxExt const CAABBox   o [inline]
 

Constructor from a normal BBox.

Definition at line 176 of file aabbox.h.

References NLMISC::CAABBox::CAABBox, RadiusMax, and RadiusMin.


Member Function Documentation

bool NLMISC::CAABBoxExt::clipBack const CPlane   p const
 

Is the bbox partially in back of the plane?? p MUST be normalized.

Reimplemented from NLMISC::CAABBox.

Definition at line 264 of file aabbox.cpp.

References NLMISC::CAABBox::Center, RadiusMax, and RadiusMin.

Referenced by NL3D::CMeshMRMGeom::clip, and NL3D::CMeshGeom::clip.

bool NLMISC::CAABBoxExt::clipFront const CPlane   p const
 

Is the bbox partially in front of the plane?? p MUST be normalized.

Reimplemented from NLMISC::CAABBox.

Definition at line 246 of file aabbox.cpp.

References NLMISC::CAABBox::Center, RadiusMax, and RadiusMin.

CAABBox NLMISC::CAABBoxExt::getAABBox   const [inline]
 

Return a simple Axis Aligned Bounding Box (no radius inside).

Definition at line 206 of file aabbox.h.

References NLMISC::CAABBox::CAABBox, getCenter, and getHalfSize.

Referenced by NL3D::CMeshMRM::getAABBox, and NL3D::CMesh::getAABBox.

const CVector& NLMISC::CAABBoxExt::getCenter   const [inline]
 

Reimplemented from NLMISC::CAABBox.

Definition at line 199 of file aabbox.h.

References NLMISC::CAABBox::Center.

Referenced by NL3D::CMeshMRMGeom::clip, NL3D::CMeshGeom::clip, and getAABBox.

const CVector& NLMISC::CAABBoxExt::getHalfSize   const [inline]
 

Reimplemented from NLMISC::CAABBox.

Definition at line 200 of file aabbox.h.

References NLMISC::CAABBox::HalfSize.

Referenced by getAABBox.

CVector NLMISC::CAABBoxExt::getMax   const [inline]
 

Reimplemented from NLMISC::CAABBox.

Definition at line 198 of file aabbox.h.

CVector NLMISC::CAABBoxExt::getMin   const [inline]
 

Reimplemented from NLMISC::CAABBox.

Definition at line 197 of file aabbox.h.

float NLMISC::CAABBoxExt::getRadius   const [inline]
 

Return the (stored!!) radius of the bbox.

Reimplemented from NLMISC::CAABBox.

Definition at line 204 of file aabbox.h.

References RadiusMax.

Referenced by NL3D::CMeshMRMGeom::clip, NL3D::CMeshGeom::clip, NL3D::CMeshMRMGeom::compileRunTime, and NL3D::CMeshGeom::compileRunTime.

CVector NLMISC::CAABBoxExt::getSize   const [inline]
 

Return the size of the bbox.

Reimplemented from NLMISC::CAABBox.

Definition at line 202 of file aabbox.h.

References NLMISC::CAABBox::HalfSize.

bool NLMISC::CAABBoxExt::intersect const CVector   a,
const CVector   b,
const CVector   c
const [inline]
 

Does the bbox intersect the triangle ABC.

Reimplemented from NLMISC::CAABBox.

Definition at line 219 of file aabbox.h.

bool NLMISC::CAABBoxExt::intersect const CAABBoxExt &    box const [inline]
 

Does the bbox intersect the bbox box.

Definition at line 216 of file aabbox.h.

CAABBoxExt& NLMISC::CAABBoxExt::operator= const CAABBox   o [inline]
 

Definition at line 191 of file aabbox.h.

References NLMISC::CAABBox::CAABBox, CAABBoxExt, NLMISC::CAABBox::Center, NLMISC::CAABBox::HalfSize, and updateRadius.

void NLMISC::CAABBoxExt::serial NLMISC::IStream   f
 

Reimplemented from NLMISC::CAABBox.

Definition at line 282 of file aabbox.cpp.

References NLMISC::IStream::isReading, and updateRadius.

void NLMISC::CAABBoxExt::setCenter const CVector   center [inline]
 

Reimplemented from NLMISC::CAABBox.

Definition at line 181 of file aabbox.h.

References NLMISC::CAABBox::Center.

Referenced by NL3D::CMeshMRMGeom::build, and NL3D::CMeshGeom::build.

void NLMISC::CAABBoxExt::setHalfSize const CVector   hs [inline]
 

Reimplemented from NLMISC::CAABBox.

Definition at line 182 of file aabbox.h.

References NLMISC::CAABBox::HalfSize, and updateRadius.

void NLMISC::CAABBoxExt::setMinMax const CVector   bmin,
const CVector   bmax
[inline]
 

Build the bbox, with a min/max style bbox.

Reimplemented from NLMISC::CAABBox.

Definition at line 185 of file aabbox.h.

References NLMISC::CAABBox::Center, NLMISC::CAABBox::HalfSize, and updateRadius.

void NLMISC::CAABBoxExt::setSize const CVector   s [inline]
 

Set the size of the bbox (ie 2* the halfSize).

Reimplemented from NLMISC::CAABBox.

Definition at line 183 of file aabbox.h.

References NLMISC::CAABBox::HalfSize, s, and updateRadius.

Referenced by NL3D::CMeshMRMGeom::build, and NL3D::CMeshGeom::build.

void NLMISC::CAABBoxExt::updateRadius   [inline, protected]
 

Definition at line 164 of file aabbox.h.

References NLMISC::CAABBox::HalfSize, NLMISC::minof, RadiusMax, and RadiusMin.

Referenced by operator=, serial, setHalfSize, setMinMax, and setSize.


Member Data Documentation

float NLMISC::CAABBoxExt::RadiusMax [protected]
 

Definition at line 162 of file aabbox.h.

Referenced by CAABBoxExt, clipBack, clipFront, getRadius, and updateRadius.

float NLMISC::CAABBoxExt::RadiusMin [protected]
 

Definition at line 162 of file aabbox.h.

Referenced by CAABBoxExt, clipBack, clipFront, and updateRadius.


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