gl3n.frustum
Note: this module is not completly tested! Use with special care, results might be wrong.
-
Declaration
OUTSIDE
INSIDE
INTERSECTUsed as flag to indicate if the object intersects with the frustum.
-
Declaration
structFrustum;-
Declaration
LEFT
RIGHT
BOTTOM
TOP
NEAR
FARUsed to access the planes array.
-
Declaration
Plane[6]planes;Holds all 6
planesof the frustum. -
Declaration
pure nothrow @safe this(mat4mvp);Constructs the frustum from a model-view-projection matrix.
Parameters
mat4mvpa model-view-projection matrix
-
Declaration
pure nothrow @safe this(Plane[6]planes);Constructs the frustum from 6
planes.Parameters
Plane[6]planesthe 6 frustum
planesin the order: left, right, bottom, top, near, far. -
Declaration
const pure nothrow @safe intintersects(AABBaabb);Checks if the
aabbintersectswith the frustum. Returns OUTSIDE (= 0), INSIDE (= 1) or INTERSECT (= 2). -
Declaration
const boolopBinaryRight(string s : "in")(AABBaabb);Returns
trueif theaabbintersects with the frustum or is inside it.
-