Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

maths
Class CBound

   in Bound.h
   in Bound.cpp

class CBound


Field Summary
private CVector3D[ 2 ] m_Data
          
 
Constructor Summary
CBound( const CVector3D& min, const CVector3D& max )
          
CBound()
          
 
Method Summary
 void GetCentre( CVector3D& centre ) const
          
 float GetVolume() const
          
 void IntersectFrustumConservative( const CFrustum& frustum )
          Render the bounding box
 bool IsEmpty()
          Transform: transform this bound by given matrix; return transformed bound in 'result' parameter - slightly modified version of code in Graphic Gems (can't remember which one it was, though)
 CBound& operator+=( const CVector3D& pt )
          RayIntersect: intersect ray with this bound; return true if ray hits (and store entry and exit times), or false otherwise note: incoming ray direction must be normalised
 CBound& operator+=( const CBound& b )
          operator+=: extend this bound to include given point
 const CVector3D& operator[]( int index ) const
          
 bool RayIntersect( const CVector3D& origin, const CVector3D& dir, float& tmin, float& tmax ) const
          SetEmpty: initialise this bound as empty
 void Render()
          Render: Render the surfaces of the bound object as polygons.
 void SetEmpty()
          IsEmpty: tests whether this bound is empty
 void Transform( const CMatrix3D& m, CBound& result ) const
          Intersect with the given frustum in a conservative manner
 

Field Detail

m_Data

private CVector3D m_Data[ 2 ];


Constructor Detail

CBound

public CBound( const CVector3D& min, const CVector3D& max );

CBound

public CBound();


Method Detail

GetCentre

public void GetCentre( CVector3D& centre ) const;

GetVolume

public float GetVolume() const;

IntersectFrustumConservative

public void IntersectFrustumConservative( const CFrustum& frustum );
Render the bounding box

IsEmpty

public bool IsEmpty();
Transform: transform this bound by given matrix; return transformed bound in 'result' parameter - slightly modified version of code in Graphic Gems (can't remember which one it was, though)

operator+=

public CBound& operator+=( const CVector3D& pt );
RayIntersect: intersect ray with this bound; return true if ray hits (and store entry and exit times), or false otherwise note: incoming ray direction must be normalised

operator+=

public CBound& operator+=( const CBound& b );
operator+=: extend this bound to include given point

operator[]

public const CVector3D& operator[]( int index ) const;

RayIntersect

public bool RayIntersect( const CVector3D& origin, const CVector3D& dir, float& tmin, float& tmax ) const;
SetEmpty: initialise this bound as empty

Render

public void Render();
Render: Render the surfaces of the bound object as polygons.

SetEmpty

public void SetEmpty();
IsEmpty: tests whether this bound is empty

Transform

public void Transform( const CMatrix3D& m, CBound& result ) const;
Intersect with the given frustum in a conservative manner

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:13
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD