B.Math.Plane()

Represents a plane.

To create the object use B.Math.makePlane().

CONSTANTS:

{B.Math.Plane} X = {normal: B.Math.Vector3.X, distance: 0}

Positive direction along X-axis.

{B.Math.Plane} Y = {normal: B.Math.Vector3.Y, distance: 0}

Positive direction along Y-axis.

{B.Math.Plane} Z = {normal: B.Math.Vector3.Z, distance: 0}

Positive direction along Z-axis.

{B.Math.Plane} N_X = {normal: B.Math.Vector3.N_X, distance: 0}

Negative direction along X-axis.

{B.Math.Plane} N_Y = {normal: B.Math.Vector3.N_Y, distance: 0}

Negative direction along Y-axis.

{B.Math.Plane} N_Z = {normal: B.Math.Vector3.N_Z, distance: 0}

Negative direction along Z-axis.

PROPERTIES:

{B.Math.Vector3} normal

Normal of the plane.

{number} distance

Distance to the plane along the normal.

METHODS:

clone()

Clones this plane to a new plane.

RETURNS:

{B.Math.Plane}

this

copy(plane)

Copies a given plane into this plane.

PARAMETERS:

{B.Math.Plane} plane

RETURNS:

{B.Math.Plane}

this

set(normal, distance)

Sets this plane from a normal and a distance.

PARAMETERS:

{B.Math.Vector3} normal

{number} distance

RETURNS:

{B.Math.Plane}

this

fromArray(array, offset)

Sets this plane from a part of array.

PARAMETERS:

{Array.<number>} array

{number} [offset] = 0

RETURNS:

{number}

new offset

toArray(array, offset)

Sets this plane to a part of array.

PARAMETERS:

{Array.<number>} array

{number} [offset] = 0

RETURNS:

{number}

new offset

fromNormalPoint(normal, point)

Sets this plane from a normal and a point.

PARAMETERS:

{B.Math.Vector3} normal

{B.Math.Vector3} point

RETURNS:

{B.Math.Plane}

this

fromCoplanarPoints(a, b, c)

Sets this plane from three coplanar points.

PARAMETERS:

RETURNS:

{B.Math.Plane}

this

translate(offset)

Translates this plane by a given offset.

PARAMETERS:

{B.Math.Vector3} offset

RETURNS:

{B.Math.Plane}

this

transform(matrix)

Transforms this plane by a 4x4 matrix.

PARAMETERS:

{B.Math.Matrix4} matrix

RETURNS:

{B.Math.Plane}

this

normalize()

Normalizes this plane.

RETURNS:

{B.Math.Plane}

this

negate()

Negates this plane.

RETURNS:

{B.Math.Plane}

this

projectPoint(point, result)

Projects a point to this plane.

PARAMETERS:

{B.Math.Vector3} point

{B.Math.Vector3} [result]

omit if you want to return newly created vector

RETURNS:

{B.Math.Vector3}

projected point

distanceTo(object)

Calculates the shortest distance between this plane and an object.

PARAMETERS:

RETURNS:

{number}

distance

THROWS:

{Error}

if the object argument has unsupported type

test(object, relation)

Tests relation between this plane and an object.

PARAMETERS:

RETURNS:

{boolean}

THROWS:

{Error}

if the object argument has unsupported type.

equal(plane)

Checks for strict equality of this plane and another plane.

PARAMETERS:

{B.Math.Plane} plane

RETURNS:

{boolean}

CONSTANTS:

PROPERTIES:

METHODS: