Plane
A two dimensional surface that extends infinitely in 3d space, represented in Hessian normal form by a unit length normal vector and a constant.
Properties
normal(1, 0, 0)
(optional) a unit length vector3 defining the normal of the plane.
constant0
(optional) the signed distance from the origin to the plane.
Methods
set0
set Components
set From Normal And Coplanar Point
set From Coplanar Points
clone
copy
normalize
negate
Negates both the normal vector and the constant.
Returns Plane
distance To Point
distance To Sphere
project Point
intersect Line
Returns the intersection point of the passed line and the plane. Returns null if the line does not intersect. Returns the line's starting point if the line is coplanar with the plane.
Parameters
- line: Line3
the Line3| Line3 to check for intersection.
- target: Vector3
the result will be copied into this Vector3.
Returns Nullable<Vector3>
- line: Line3
intersects Line
Tests whether a line segment intersects with (passes through) the plane.
Parameters
- line: Line3
the Line3| Line3 to check for intersection.
Returns boolean
- line: Line3
intersects Box
intersects Sphere
coplanar Point
apply Matrix4
Apply a Matrix4 to the plane. The matrix must be an affine, homogeneous transform. If supplying an optionalNormalMatrix, it can be created like so:
const optionalNormalMatrix = new THREE.Matrix3().getNormalMatrix( matrix );Parameters
Returns Plane
A two dimensional surface that extends infinitely in 3d space, represented in Hessian normal form by a unit length normal vector and a constant.