module charge.math.frustum
Math

Source file for Frustum and Plane.

Code Map

//! Source file for Frustum and Plane.
module charge.math.frustum;


//! 3D Plane uses single precision.
struct Planef
{
public:
	a: f32;
	b: f32;
	c: f32;
	d: f32;


public:
	fn setFrom(p: Planed) { }
	fn toString() string { }
}

//! 3D Plane used by the Frustum struct, double precision.
struct Planed
{
public:
	a: f64;
	b: f64;
	c: f64;
	d: f64;


public:
	fn normalize() { }
	fn toString() string { }
}

//! Viewing frustum struct for use when doing Frustum culling in the
//! rendering pipeline.
struct Frustum
{
public:
	enum Planes
	{
		Left,
		Right,
		Top,
		Bottom,
		Far,
		Near,
	}


public:
	alias Left = Planes.Left;
	alias Right = Planes.Right;
	alias Top = Planes.Top;
	alias Bottom = Planes.Bottom;
	alias Far = Planes.Far;
	alias Near = Planes.Near;


public:
	p: Planed[6];


public:
	fn setFromUntransposedGL(mat: Matrix4x4d) { }
}
struct Planef

3D Plane uses single precision.

struct Planed

3D Plane used by the Frustum struct, double precision.

struct Frustum

Viewing frustum struct for use when doing Frustum culling in the rendering pipeline.

See also

  • http://en.wikipedia.org/wiki/Viewing_frustum

  • http://en.wikipedia.org/wiki/Frustum_culling