gl3n
Note:
this module is not completly tested! Use with special care, results might be wrong.

Used as flag to indicate if the object intersects with the frustum.


struct Frustum;




Used to access the planes array.


Plane[6] planes;

Holds all 6 planes of the frustum.


this(mat4 mvp);

Constructs the frustum from a model-view-projection matrix.

Parameters
mat4 mvp a model-view-projection matrix

this(Plane[6] planes);

Constructs the frustum from 6 planes.

Parameters
Plane[6] planes the 6 frustum planes in the order: left, right, bottom, top, near, far.

pure nothrow @safe int intersects(AABB aabb);

Checks if the aabb intersects with the frustum. Returns OUTSIDE (= 0), INSIDE (= 1) or INTERSECT (= 2).


bool opBinaryRight(string s : "in")(AABB aabb);

Returns true if the aabb intersects with the frustum or is inside it.