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 (IN const char *msg) const throw ()
eContains containsRect (IN const rect3d_t &r) const throw ()
 does the frustum contain the given rectangle?
eContains containsSphere (IN const point3d_t &position, IN float radius) const throw ()
 does the frustum contain the given sphere?
void getEdge (IN int index, OUT point3d_t &p0, OUT 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 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 frustum.h.


Constructor & Destructor Documentation

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

Definition at line 69 of file frustum.h.


Member Function Documentation

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

Definition at line 72 of file frustum.h.

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

Definition at line 78 of file frustum.h.

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

does the frustum contain the given rectangle?

Definition at line 95 of file frustum.cpp.

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

does the frustum contain the given sphere?

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

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

Definition at line 141 of file frustum.cpp.


Member Data Documentation

plane_t frustum_t::plane[ePlaneCount]

Definition at line 102 of file frustum.h.


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