# modeling/maths/plane

Represents a plane in 3D coordinate space as determined by a normal (perpendicular to the plane) and distance from 0,0,0.

Source:
See:
• plane for data structure information.

### Methods

#### (static) flip(out, plane) → {plane}

Source:

Flip the given plane.

##### Parameters:
Name Type Description
`out` plane

receiving plane

`plane` plane

plane to flip

out

Type
plane

#### (static) fromNormalAndPoint(out, normal, point) → {plane}

Source:

Create a new plane from the given normal and point values.

##### Parameters:
Name Type Description
`out` plane

receiving plane

`normal` vec3

directional vector

`point` vec3

origin of plane

out

Type
plane

#### (static) fromPoints(out, …vertices) → {plane}

Source:

Create a plane from the given points.

##### Parameters:
Name Type Attributes Description
`out` plane

receiving plane

`vertices` Array <repeatable>

points on the plane

out

Type
plane

#### (static) fromPointsRandom(out, a, b, c) → {plane}

Source:

Create a new plane from the given points like fromPoints, but allow the vectors to be on one point or one line. In such a case, a random plane through the given points is constructed.

##### Parameters:
Name Type Description
`out` plane

receiving plane

`a` vec3

3D point

`b` vec3

3D point

`c` vec3

3D point

out

Type
plane

#### (static) projectionOfPoint(plane, point) → {vec3}

Source:

Project the given point on to the given plane.

##### Parameters:
Name Type Description
`plane` plane

plane of reference

`point` vec3

point of reference

##### Returns:

projected point on plane

Type
vec3

#### (static) signedDistanceToPoint(plane, point) → {Number}

Source:

Calculate the distance to the given point.

##### Parameters:
Name Type Description
`plane` plane

plane of reference

`point` vec3

point of reference

##### Returns:

signed distance to point

Type
Number

#### (static) transform(out, plane, matrix) → {plane}

Source:

Transform the given plane using the given matrix

##### Parameters:
Name Type Description
`out` plane

receiving plane

`plane` plane

plane to transform

`matrix` mat4

matrix to transform with

out

Type
plane

Source:
See:

Source:
See:

Source:
See:

Source:
See:

Source:
See:

Source:
See: