gl3n.frustum
Note: this module is not completly tested! Use with special care, results might be wrong.
-
Declaration
OUTSIDE
INSIDE
INTERSECT
Used as flag to indicate if the object intersects with the frustum.
-
Declaration
struct
Frustum
;-
Declaration
LEFT
RIGHT
BOTTOM
TOP
NEAR
FAR
Used to access the planes array.
-
Declaration
Plane[6]
planes
;Holds all 6
planes
of the frustum. -
Declaration
pure nothrow @safe this(mat4
mvp
);Constructs the frustum from a model-view-projection matrix.
Parameters
mat4
mvp
a model-view-projection matrix
-
Declaration
pure nothrow @safe 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. -
Declaration
pure nothrow @safe int
intersects
(AABBaabb
);Checks if the
aabb
intersects
with the frustum. Returns OUTSIDE (= 0), INSIDE (= 1) or INTERSECT (= 2). -
Declaration
bool
opBinaryRight
(string s : "in")(AABBaabb
);Returns
true
if theaabb
intersects with the frustum or is inside it.
-