Functions

frustum.cpp File Reference

#include "frustum.h"
#include <math.h>
Include dependency graph for frustum.cpp:

Go to the source code of this file.

Functions

static void setFrustumPlane (IO frustum_t &f, IN frustum_t::ePlane index, IN const point3d_t &a, IN const point3d_t &b, IN const point3d_t &p) throw ()
static float getTimeWhenLineIntersectsPlane (IN const plane_t &P, IN const point3d_t &p0, IN const point3d_t &pt) throw ()
bool createViewFrustum (IN const point3d_t &position, IN const point3d_t &facing, IN const point3d_t &up, IN float fovyRadians, IN float zNear, IN float zFar, IN float aspect, OUT frustum_t &f) throw ()
 create a view frustum given basic geometric information.

Function Documentation

static void setFrustumPlane ( IO frustum_t f,
IN frustum_t::ePlane  index,
IN const point3d_t a,
IN const point3d_t b,
IN const point3d_t p 
) throw () [static]
Parameters:
a one vector in plane
b another vector in plane
p a point in the plane

Definition at line 49 of file frustum.cpp.

static float getTimeWhenLineIntersectsPlane ( IN const plane_t P,
IN const point3d_t p0,
IN const point3d_t pt 
) throw () [static]

Definition at line 72 of file frustum.cpp.

bool createViewFrustum ( IN const point3d_t position,
IN const point3d_t facing,
IN const point3d_t up,
IN float  fovyRadians,
IN float  zNear,
IN float  zFar,
IN float  aspect,
OUT frustum_t frustum 
) throw ()

create a view frustum given basic geometric information.

Keep in mind, this uses standard OpenGL right-handed coordinates, with Y being the usual up direction, and x and z in the plane of the ground.

Parameters:
fovyRadians field of view, Y

Definition at line 219 of file frustum.cpp.