# 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

- `constructor`

Accessors

- `A`
- `B`
- `C`
- `D`

Methods

- `equals`
- `getDistance`
- `getDistanceSquared`
- `getNormal`
- `getPointInPlane`
- `projectPoint`
- `projectVector`
- `from`
- `fromPointAndNormal`
- `fromPoints`

## Constructors

`Plane.``constructor`(A, B, C, D)

  Arguments: | A (`number`) – None B (`number`) – None C (`number`) – None D (`number`) – None

  Constructor

  Return type: | Plane

## 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

`Plane.``equals`(other)

  Arguments: | other (`PlaneLike`) – None

  Returns true if the planes are equal.

  Return type: | boolean

### getDistance

`Plane.``getDistance`(point)

  Arguments: | point (`Vec3Like`) – None

  Returns the distance between the give point and this plane

  Return type: | number

### 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

### 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

### projectPoint

`Plane.``projectPoint`(point)

  Arguments: | point (`Vec3Like`) – None

  Project the given point onto the plane

  Return type: | Vec3Like

### projectVector

`Plane.``projectVector`(vector)

  Arguments: | vector (`Vec3Like`) – None

  Project the given vector onto the plane

  Returns the projected vector or undefined if the vector is parallel with the plane’s normal

  Return type: | Vec3Like

### static from

`Plane.``from`(plane)

  Arguments: | plane (`PlaneLike`) – None

  Creates a plane instance from any object with A,B,C,D properties

  Return type: | Plane

### static fromPointAndNormal

`Plane.``fromPointAndNormal`(point, normal)

  Arguments: | point (`Vec3Like`) – None normal (`Vec3Like`) – None

  Returns a plane created from a point and a normal

  Return type: | Plane

### static fromPoints

`Plane.``fromPoints`(p1, p2, p3)

  Arguments: | p1 (`Vec3Like`) – None p2 (`Vec3Like`) – None p3 (`Vec3Like`) – None

  Returns a plane created from three points

  The three points cannot be on a line as they need to define a plane. So (p2 - p1)*(p3 - p1) != 0

  Return type: | Plane

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Web in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...