Public Types | Public Member Functions | Public Attributes

frustum_t Struct Reference
[Core Geometry Objects]

Basic frustum object. More...

#include <frustum.h>

Collaboration diagram for frustum_t:
Collaboration graph
[legend]

List of all members.

Public Types

enum  ePlane {
  eTop = 0,
  eBottom = 1,
  eLeft = 2,
  eRight = 3,
  eNear = 4,
  eFar = 5,
  eEdgeCount = 12,
  ePlaneCount = 6
}
 

this enum defines planes as if someone was standing at the apex of the frustum, and looking down it.

More...

Public Member Functions

 frustum_t (void) throw ()
void clear (void) throw ()
void dump (const char *msg) const throw ()
eContains containsRect (const rect3d_t &r) const throw ()
 does the frustum contain the given rectangle?
eContains containsSphere (const point3d_t &position, float radius) const throw ()
 does the frustum contain the given sphere?
void getEdge (int index, point3d_t &p0, point3d_t &p1) const throw ()
 returns the endpoints of the specified edge (0 <= index < eEdgeCount)

Public Attributes

plane_t plane [ePlaneCount]

Detailed Description

Basic frustum object.

This is a truncated 4-sided pyramid, also called a right square frustum. See http://en.wikipedia.org/wiki/Frustum

Definition at line 50 of file wavepacket-lib/lib/geometry/frustum.h.


Member Enumeration Documentation

this enum defines planes as if someone was standing at the apex of the frustum, and looking down it.

Enumerator:
eTop 

index of top plane

eBottom 

index of bottom plane

eLeft 

index of left plane

eRight 

index of right plane

eNear 

index of near plane

eFar 

index of far plane

eEdgeCount 

total number of edges

ePlaneCount 

total number of planes

Definition at line 55 of file wavepacket-lib/lib/geometry/frustum.h.


Constructor & Destructor Documentation

frustum_t::frustum_t ( void   )  throw () [inline]

Definition at line 69 of file wavepacket-lib/lib/geometry/frustum.h.


Member Function Documentation

void frustum_t::clear ( void   )  throw () [inline]

Definition at line 72 of file wavepacket-lib/lib/geometry/frustum.h.

void frustum_t::dump ( const char *  msg  )  const throw () [inline]

Definition at line 78 of file wavepacket-lib/lib/geometry/frustum.h.

eContains frustum_t::containsRect ( const rect3d_t r  )  const throw ()

does the frustum contain the given rectangle?

Definition at line 95 of file wavepacket-lib/lib/geometry/frustum.cpp.

eContains frustum_t::containsSphere ( const point3d_t position,
float  radius 
) const throw ()

does the frustum contain the given sphere?

void frustum_t::getEdge ( int  index,
point3d_t p0,
point3d_t p1 
) const throw ()

returns the endpoints of the specified edge (0 <= index < eEdgeCount)

Definition at line 141 of file wavepacket-lib/lib/geometry/frustum.cpp.


Member Data Documentation

plane_t frustum_t::plane[ePlaneCount]

Definition at line 102 of file wavepacket-lib/lib/geometry/frustum.h.


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