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
-
cee.Plane.constructor() - Plane(A: number, B: number, C: number, D: number):
PlaneConstructor
Parameters
A: number
B: number
C: number
D: number
Returns:
Plane
Accessors
-
cee.Plane.A() - get A(): number
The A coefficient of the plane equation
Returns: number
-
cee.Plane.B() - get B(): number
The B coefficient of the plane equation
Returns: number
-
cee.Plane.C() - get C(): number
The C coefficient of the plane equation
Returns: number
-
cee.Plane.D() - get D(): number
The D coefficient of the plane equation
Returns: number
Methods
-
cee.Plane.equals() - equals(other:
PlaneLike): booleanReturns true if the planes are equal.
Parameters
other:PlaneLikeReturns: boolean
-
cee.Plane.getDistance() - getDistance(point:
Vec3Like): numberReturns the distance between the give point and this plane
Parameters
point:Vec3LikeReturns: number
-
cee.Plane.getDistanceSquared() - getDistanceSquared(point:
Vec3Like): numberReturns 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.
Parameters
point:Vec3LikeReturns: number
-
cee.Plane.getNormal() - getNormal():
Vec3LikeReturns the distance between the give point and this plane
Returns:
Vec3Like
-
cee.Plane.getPointInPlane() - getPointInPlane():
Vec3LikeReturns a point guaranteed to be on this plane
Returns:
Vec3Like
-
cee.Plane.projectPoint() -
Project the given point onto the plane
Parameters
point:Vec3LikeReturns:
Vec3Like
-
cee.Plane.projectVector() -
Project the given vector onto the plane
Returns the projected vector or undefined if the vector is parallel with the plane’s normal
Parameters
vector:Vec3LikeReturns:
Vec3Like
-
static cee.Plane.from() static
Creates a plane instance from any object with A,B,C,D properties
Parameters
plane:PlaneLikeReturns:
Plane