
###
Ray
###

.. js:class:: cee.Ray

   A 3d ray used, for example, for picking on the 3D model.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.Ray.constructor`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.Ray.direction`
   * :js:func:`~cee.Ray.origin`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.Ray.clone`
   * :js:meth:`~cee.Ray.planeIntersect`
   * :js:meth:`~cee.Ray.pointDistanceSquared`
   * :js:meth:`~cee.Ray.transform`
   
   



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

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


.. js:method:: cee.Ray.constructor

      .. rst-class:: sig-pretty-signature
      
         | Ray(**origin**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ , **direction**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): :js:class:`Ray <cee.Ray>`
      
      Creates a Ray object
      
      **Parameters**
      
      
         **origin**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
         **direction**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : :js:class:`Ray <cee.Ray>`
      



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

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


.. js:method:: cee.Ray.direction

      .. rst-class:: sig-pretty-signature
      
         | *get* direction(): :js:class:`Vec3Like <cee.Vec3Like>`
      
      The direction vector of the ray in world coordinates.
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* direction(**direction**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): *void*
      
      **Parameters**
      
      
         **direction**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.Ray.origin

      .. rst-class:: sig-pretty-signature
      
         | *get* origin(): :js:class:`Vec3Like <cee.Vec3Like>`
      
      The origin of the ray in world coordinates.
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      .. rst-class:: sig-pretty-signature
      
         | *set* origin(**origin**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): *void*
      
      **Parameters**
      
      
         **origin**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : *void*
      



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

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


.. js:method:: cee.Ray.clone

      .. rst-class:: sig-pretty-signature
      
         | clone(): :js:class:`Ray <cee.Ray>`
      
      Returns a clone of the ray.
      
      **Returns**\ : :js:class:`Ray <cee.Ray>`
      



.. js:method:: cee.Ray.planeIntersect

      .. rst-class:: sig-pretty-signature
      
         | planeIntersect(**plane**\ : :js:class:`Plane <cee.Plane>`\ ): :js:class:`Vec3Like <cee.Vec3Like>`
      
      Returns the intersection point of this ray with the given plane, or null if no intersection.
      
      **Parameters**
      
      
         **plane**\ : :js:class:`Plane <cee.Plane>`
      
      
      **Returns**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      



.. js:method:: cee.Ray.pointDistanceSquared

      .. rst-class:: sig-pretty-signature
      
         | pointDistanceSquared(**point**\ : :js:class:`Vec3Like <cee.Vec3Like>`\ ): *number*
      
      Returns the squared distance from the point to the ray
      
      **Parameters**
      
      
         **point**\ : :js:class:`Vec3Like <cee.Vec3Like>`
      
      
      **Returns**\ : *number*
      



.. js:method:: cee.Ray.transform

      .. rst-class:: sig-pretty-signature
      
         | transform(**matrix**\ : :js:class:`Mat4 <cee.Mat4>`\ ): *void*
      
      Transforms the ray with the given matrix.
      
      The origin will be transformed as a point, and the direction as a vector.
      
      **Parameters**
      
      
         **matrix**\ : :js:class:`Mat4 <cee.Mat4>`
      
      
      **Returns**\ : *void*
      




