Constructor
new L3D.Plane()
Methods
static testBoundingBox(plane, box) → Enum
Tests a bounding box against the plane.
plane |
Plane | |
box |
BoundingBox |
- Enum
Clip.Outside if the box is completely behind the plane; Clip.Inside if the box is completely in front of the plane; Clip.Overlap if the box overlaps the plane.
static testPoint(plane, point) → number
Tests a point against the plane.
plane |
* | |
point |
* |
- number
Clip.Outside if the point is behind the plane; Clip.Overlap if the point is on the plane; Clip.Inside if the point is in front of the plane.
static testSphere(plane, center, radius) → Enum
Tests a bounding sphere against the plane.
plane |
Plane | The plane to test. |
center |
Vector3 | Center of the sphere. |
radius |
number | Radius of the sphere. |
- Enum
Clip.Outside if the sphere is completely behind the plane; Clip.Inside if the sphere is completely in front of the plane; Clip.Overlap if the sphere overlaps the plane.
distanceToPoint(pt) → number
Calcualte the distance from the given point to the plane.
pt |
Vector3 | The point to check |
- number
The distance from pt to the plane.
dotNormal(v) → number
Calculate the dot product of the given vector with the plane's normal.
v |
Vector3 |
- number
rayIntersect(rayOrigin, rayDirection, out) → Vector3
Intersect a ray with the plane.
rayOrigin |
Vector3 | The origin of the ray. |
rayDirection |
Vector3 | The direction of the ray. |
out |
Vector3 | Optional storage for the calculated intersection point. |
- Vector3
The point of the intersection, or null if the ray doesn"t intersect.