Propane::Math::Frustum Class Reference

A solid that can be used to determine visibility information. More...

#include <Frustum.h>

List of all members.

Public Member Functions

void calculate (GLfloat *modelView, GLfloat *projection)
 Generates a frustum from a given model view and projection matrix.
bool isPointVisible (const Propane::Math::Vector3 &point)
 Check if a point is inside the viewing frustum.
bool isSphereVisible (const Propane::Math::Vector3 &point, float radius)
 Check if a sphere is inside the viewing frustum.
bool isBoxVisible (const Propane::Math::Vector3 &origin, float size)
 Check if a linearly-sized box is inside the viewing frustum.
bool isAABBVisible (const Propane::Math::Vector3 &min, const Propane::Math::Vector3 &max)
 Check if an AABB (axis aligned bounding box) is inside the viewing frustum.


Detailed Description

A solid that can be used to determine visibility information.
Examples:

UsingFrustum.cpp.


Member Function Documentation

void Propane::Math::Frustum::calculate GLfloat *  modelView,
GLfloat *  projection
[inline]
 

Generates a frustum from a given model view and projection matrix.

Parameters:
modelView The OpenGL model-view matrix.
projection The OpenGL projection matrix.
Examples:
UsingFrustum.cpp.

bool Propane::Math::Frustum::isAABBVisible const Propane::Math::Vector3 &  min,
const Propane::Math::Vector3 &  max
[inline]
 

Check if an AABB (axis aligned bounding box) is inside the viewing frustum.

Parameters:
min One of the two points defined by the AABB.
max The other of the two points defined by the AABB.
Returns:
True if the AABB is visible, false otherwise.

bool Propane::Math::Frustum::isBoxVisible const Propane::Math::Vector3 &  origin,
float  size
[inline]
 

Check if a linearly-sized box is inside the viewing frustum.

Parameters:
origin The centre point of the box, in world space.
size The linear size of the box, in world units.
Returns:
True if the box is visible, false otherwise.

bool Propane::Math::Frustum::isPointVisible const Propane::Math::Vector3 &  point  )  [inline]
 

Check if a point is inside the viewing frustum.

param point The xyz location of the point, in world space.

Returns:
True if the point is inside the frustum, false otherwise.

bool Propane::Math::Frustum::isSphereVisible const Propane::Math::Vector3 &  point,
float  radius
[inline]
 

Check if a sphere is inside the viewing frustum.

Parameters:
point The origin of the sphere, in world space.
radius The radius of the sphere, in world units.
Returns:
True if the sphere is inside the frustum, false otherwise.
Examples:
UsingFrustum.cpp.


The documentation for this class was generated from the following file:
Generated on Sun Jan 14 16:49:12 2007 for Propane Injector by  doxygen 1.4.6