Plane
-
class
cee.
Plane
() An immutable plane.
The class describes a plane by the equation: Ax + By + Cz + D = 0 The plane’s normal is defined by the coefficients [A, B, C]
Constructors
Methods
Constructors
-
Plane.
constructor
(A, B, C, D) Arguments: - A (
number
) – None - B (
number
) – None - C (
number
) – None - D (
number
) – None
Constructor
Return type: Plane - A (
Accessors
-
Plane.
A
() The A coefficient of the plane equation
Return type: number
-
Plane.
B
() The B coefficient of the plane equation
Return type: number
-
Plane.
C
() The C coefficient of the plane equation
Return type: number
-
Plane.
D
() The D coefficient of the plane equation
Return type: number
Methods
equals
getDistance
getDistanceSquared
-
Plane.
getDistanceSquared
(point) Arguments: - point (
Vec3Like
) – None
Returns the square of the distance from the point to the plane
The square of the distance is relatively fast to compute (no ‘sqrt’) and is useful for determine which side the point is on. To obtain the actual distance, divide by sqrt(A^2 + B^2 + C^2) or use the distance() function directly.
Return type: number - point (
getNormal
-
Plane.
getNormal
() Returns the distance between the give point and this plane
Return type: Vec3Like
getPointInPlane
-
Plane.
getPointInPlane
() Returns a point guaranteed to be on this plane
Return type: Vec3Like