neo::collision::Frustum Class Reference

#include <collision/frustum.h>

Collaboration diagram for neo::collision::Frustum:

Collaboration graph
[legend]
List of all members.

Detailed Description

3D frustum used for frustum culling
Author:
Mattias Jansson (mattias@realityrift.com)


Public Types

enum  PlaneID
 Frustum planes.

Public Member Functions

bool intersect (const math::Vector3 &point) const
 Test if point is inside frustum.
bool intersect (const AABB &aabb) const
 Test if AABB is inside frustum.
bool intersect (const OBB &obb) const
 Test if OBB is inside frustum.
bool intersect (const Sphere &sphere) const
 Test if sphere is inside frustum.
bool intersect (const Volume *p_volume, bool def=true) const
 Test if generic volume is inside frustum.

Public Attributes

unsigned int _signP [6][3]
unsigned int _signN [6][3]
Plane _planes [6]
math::Vector3 _direction
float _zNear
float _zFar


Member Function Documentation

bool neo::collision::Frustum::intersect ( const math::Vector3 point  )  const

Test if point is inside frustum

Parameters:
point Point
Returns:
true if inside volume, false otherwise

bool neo::collision::Frustum::intersect ( const AABB aabb  )  const

Test if AABB is inside frustum

Parameters:
aabb AABB
Returns:
true if inside volume, false otherwise

bool neo::collision::Frustum::intersect ( const OBB obb  )  const

Test if OBB is inside frustum

Parameters:
obb OBB
Returns:
true if inside volume, false otherwise

bool neo::collision::Frustum::intersect ( const Sphere sphere  )  const

Test if sphere is inside frustum

Parameters:
sphere Sphere
Returns:
true if inside volume, false otherwise

bool neo::collision::Frustum::intersect ( const Volume p_volume,
bool  def = true 
) const [inline]

Test if generic volume is inside frustum. If a null pointer is passed, the default value is returned

Parameters:
p_volume Volume
def Default return value
Returns:
true if inside volume, false otherwise


Member Data Documentation

unsigned int neo::collision::Frustum::_signP[6][3]

Vertex signs. These indicate which box corner in the AA box should be used as near and far vertex when culling against frustum during rendering. 6 planes in frustum as first index. Second index is vertex component, 0 = x, 1 = y, 2 = z. A value of 0 is positive and 1 is negative

unsigned int neo::collision::Frustum::_signN[6][3]

N is inverted P but precalculate to gain speed

Plane neo::collision::Frustum::_planes[6]

The equation data (normal and distance) for the 6 frustum planes

math::Vector3 neo::collision::Frustum::_direction

View vector (which is negated Z vector of local coordinate system in world space)

float neo::collision::Frustum::_zNear

Near plane distance along direction

float neo::collision::Frustum::_zFar

Far plane distance along direction


The documentation for this class was generated from the following file:
Generated on Sat Feb 17 20:51:01 2007 for NeoEngine 2 - Evolution by  doxygen 1.5.1