gl3n.frustum
Note:
this module is not completly tested!
Use with special care, results might be wrong.
OUTSIDE
INSIDE
INTERSECT
Used as flag to indicate if the object intersects with the frustum.
struct
Frustum
;
LEFT
RIGHT
BOTTOM
TOP
NEAR
FAR
Used to access the planes array.
Plane[6]
planes
;
Holds all 6
planes
of the frustum.
pure nothrow @safe this(mat4
mvp
);
Constructs the frustum from a model-view-projection matrix.
Params:
mat4
mvp
a model-view-projection matrix
pure nothrow @safe this(Plane[6]
planes
);
Constructs the frustum from 6
planes
.
Params:
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.
Page generated by
Ddoc
.