.. role:: clio-static
   :class: clio-flag clio-flag-static


#####
Plane
#####

.. js: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]
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.Plane.constructor`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.Plane.A`
   * :js:func:`~cee.Plane.B`
   * :js:func:`~cee.Plane.C`
   * :js:func:`~cee.Plane.D`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.Plane.equals`
   * :js:meth:`~cee.Plane.getDistance`
   * :js:meth:`~cee.Plane.getDistanceSquared`
   * :js:meth:`~cee.Plane.getNormal`
   * :js:meth:`~cee.Plane.getPointInPlane`
   * :js:meth:`~cee.Plane.projectPoint`
   * :js:meth:`~cee.Plane.projectVector`
   * :js:meth:`~static cee.Plane.from`
   * :js:meth:`~static cee.Plane.fromPointAndNormal`
   * :js:meth:`~static cee.Plane.fromPoints`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: cee.Plane.constructor

      .. rst-class:: sig-pretty-signature
      
         | Plane(**A**\ : *number*\ , **B**\ : *number*\ , **C**\ : *number*\ , **D**\ : *number*\ ): :js:class:`Plane <cee.Plane>`
      
      Constructor
      
      **Parameters**
      
      
         **A**\ : *number*
      
         **B**\ : *number*
      
         **C**\ : *number*
      
         **D**\ : *number*
      
      
      **Returns**\ : :js:class:`Plane <cee.Plane>`
      



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: cee.Plane.A

      .. rst-class:: sig-pretty-signature
      
         | *get* A(): *number*
      
      The A coefficient of the plane equation
      
      **Returns**\ : *number*
      



.. js:method:: cee.Plane.B

      .. rst-class:: sig-pretty-signature
      
         | *get* B(): *number*
      
      The B coefficient of the plane equation
      
      **Returns**\ : *number*
      



.. js:method:: cee.Plane.C

      .. rst-class:: sig-pretty-signature
      
         | *get* C(): *number*
      
      The C coefficient of the plane equation
      
      **Returns**\ : *number*
      



.. js:method:: cee.Plane.D

      .. rst-class:: sig-pretty-signature
      
         | *get* D(): *number*
      
      The D coefficient of the plane equation
      
      **Returns**\ : *number*
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: cee.Plane.equals

      .. rst-class:: sig-pretty-signature
      
         | equals(**other**\ : :js:class:`PlaneLike <cee.PlaneLike>`\ ): *boolean*
      
      Returns true if the planes are equal.
      
      **Parameters**
      
      
         **other**\ : :js:class:`PlaneLike <cee.PlaneLike>`
      
      
      **Returns**\ : *boolean*
      



.. js:method:: cee.Plane.getDistance

      .. rst-class:: sig-pretty-signature
      
         | getDistance(**point**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): *number*
      
      Returns the distance between the give point and this plane
      
      **Parameters**
      
      
         **point**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : *number*
      



.. js:method:: cee.Plane.getDistanceSquared

      .. rst-class:: sig-pretty-signature
      
         | getDistanceSquared(**point**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): *number*
      
      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.
      
      **Parameters**
      
      
         **point**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : *number*
      



.. js:method:: cee.Plane.getNormal

      .. rst-class:: sig-pretty-signature
      
         | getNormal(): :js:class:`Vec3Like <cee.Vec3Like>`
      
      Returns the distance between the give point and this plane
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      



.. js:method:: cee.Plane.getPointInPlane

      .. rst-class:: sig-pretty-signature
      
         | getPointInPlane(): :js:class:`Vec3Like <cee.Vec3Like>`
      
      Returns a point guaranteed to be on this plane
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      



.. js:method:: cee.Plane.projectPoint

      .. rst-class:: sig-pretty-signature
      
         | projectPoint(**point**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): :js:class:`Vec3Like <cee.Vec3Like>`
      
      Project the given point onto the plane
      
      **Parameters**
      
      
         **point**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      



.. js:method:: cee.Plane.projectVector

      .. rst-class:: sig-pretty-signature
      
         | projectVector(**vector**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): :js:class:`Vec3Like <cee.Vec3Like>`
      
      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**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      



.. js:method:: static cee.Plane.from

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | from(**plane**\ : :js:class:`PlaneLike <cee.PlaneLike>`\ ): :js:class:`Plane <cee.Plane>`
      
      Creates a plane instance from any object with A,B,C,D properties
      
      **Parameters**
      
      
         **plane**\ : :js:class:`PlaneLike <cee.PlaneLike>`
      
      
      **Returns**\ : :js:class:`Plane <cee.Plane>`
      



.. js:method:: static cee.Plane.fromPointAndNormal

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | fromPointAndNormal(**point**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ , **normal**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): :js:class:`Plane <cee.Plane>`
      
      Returns a plane created from a point and a normal
      
      **Parameters**
      
      
         **point**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
         **normal**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : :js:class:`Plane <cee.Plane>`
      



.. js:method:: static cee.Plane.fromPoints

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | fromPoints(**p1**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ , **p2**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ , **p3**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): :js:class:`Plane <cee.Plane>`
      
      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
      
      **Parameters**
      
      
         **p1**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
         **p2**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
         **p3**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : :js:class:`Plane <cee.Plane>`
      




