.. role:: clio-inherited
   :class: clio-flag clio-flag-inherited


############
BoxGenerator
############

.. js:class:: cee.utils.BoxGenerator

   Helper class to tesselate a box with 6 faces
   
   Useful when result values need to be mapped onto a set of 3D points defining a box. See the method ``createCuttingSolid`` in the example in Examples/DemoAppUg on how to do that.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~cee.utils.BoxGenerator.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~cee.utils.BoxGenerator.m_indices`
   * :js:data:`~cee.utils.BoxGenerator.m_vertices`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~cee.utils.BoxGenerator.fillVerticesIndices`
   * :js:meth:`~cee.utils.BoxGenerator.generate`
   * :js:meth:`~cee.utils.BoxGenerator.getIndices`
   * :js:meth:`~cee.utils.BoxGenerator.getVertices`
   * :js:meth:`~cee.utils.BoxGenerator.getVerticesNumber`
   * :js:meth:`~cee.utils.BoxGenerator.setCenterAndExtent`
   * :js:meth:`~cee.utils.BoxGenerator.setNumSegments`
   * :js:meth:`~cee.utils.BoxGenerator.setOrientation`
   * :js:meth:`~cee.utils.BoxGenerator.setOriginAndExtent`
   
   



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

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


.. js:method:: cee.utils.BoxGenerator.constructor

      .. rst-class:: sig-pretty-signature
      
         | BoxGenerator(): :js:class:`BoxGenerator <cee.utils.BoxGenerator>`
      
      **Returns**\ : :js:class:`BoxGenerator <cee.utils.BoxGenerator>`
      



.. rst-class:: kind-group kind-properties

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


.. js:data:: cee.utils.BoxGenerator.m_indices

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | m_indices: *number*\ []
      



.. js:data:: cee.utils.BoxGenerator.m_vertices

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | m_vertices: :js:class:`Vec3 <cee.Vec3>`\ []
      



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

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


.. js:method:: cee.utils.BoxGenerator.fillVerticesIndices

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | fillVerticesIndices(**vertices**\ : *Float32Array*\ , **indices**\ : *number*\ []): *void*
      
      Fills the members ``m_vertices`` and ``m_indices`` of this class.
      
      **Parameters**
      
      
         **vertices**\ : *Float32Array*
      
      
            The vertices in the format x,y,z,x,y,z,...
      
      
         **indices**\ : *number*\ []
      
      
            The indices for the vertices
      
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.utils.BoxGenerator.generate

      .. rst-class:: sig-pretty-signature
      
         | generate(): *void*
      
      Generate the box
      
      **Returns**\ : *void*
      



.. js:method:: cee.utils.BoxGenerator.getIndices

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getIndices(): *number*\ []
      
      Get the indices of triangles needed to render the solid object
      
      **Returns**\ : *number*\ []
      



.. js:method:: cee.utils.BoxGenerator.getVertices

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getVertices(): :js:class:`Vec3 <cee.Vec3>`\ []
      
      Get the vertices of the solid object as Vec3
      
      **Returns**\ : :js:class:`Vec3 <cee.Vec3>`\ []
      



.. js:method:: cee.utils.BoxGenerator.getVerticesNumber

      .. rst-class:: clio-flags
      
         :clio-inherited:`inherited`
      
      .. rst-class:: sig-pretty-signature
      
         | getVerticesNumber(): *number*\ []
      
      Get the vertices of the solid object as a number array with <x,y,z,x,y,z,...>
      
      **Returns**\ : *number*\ []
      



.. js:method:: cee.utils.BoxGenerator.setCenterAndExtent

      .. rst-class:: sig-pretty-signature
      
         | setCenterAndExtent(**center**\ : :js:class:`Vec3 <cee.Vec3>`\ , **extent**\ : :js:class:`Vec3 <cee.Vec3>`\ ): *void*
      
      Specify the box by providing the center of the box and the extent in x,y, and z direction.
      
      **Parameters**
      
      
         **center**\ : :js:class:`Vec3 <cee.Vec3>`
      
         **extent**\ : :js:class:`Vec3 <cee.Vec3>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.utils.BoxGenerator.setNumSegments

      .. rst-class:: sig-pretty-signature
      
         | setNumSegments(**numX**\ : *number*\ , **numY**\ : *number*\ , **numZ**\ : *number*\ ): *void*
      
      Sets the number of segments of the box per axis.
      
      **Parameters**
      
      
         **numX**\ : *number*
      
         **numY**\ : *number*
      
         **numZ**\ : *number*
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.utils.BoxGenerator.setOrientation

      .. rst-class:: sig-pretty-signature
      
         | setOrientation(**rightDir**\ : :js:class:`Vec3 <cee.Vec3>`\ , **upDir**\ : :js:class:`Vec3 <cee.Vec3>`\ ): *void*
      
      Set the orientation of the box by giing the right direction (local x axis) and the up direction (local z axis).
      
      **Parameters**
      
      
         **rightDir**\ : :js:class:`Vec3 <cee.Vec3>`
      
         **upDir**\ : :js:class:`Vec3 <cee.Vec3>`
      
      
      **Returns**\ : *void*
      



.. js:method:: cee.utils.BoxGenerator.setOriginAndExtent

      .. rst-class:: sig-pretty-signature
      
         | setOriginAndExtent(**origin**\ : :js:class:`Vec3 <cee.Vec3>`\ , **extent**\ : :js:class:`Vec3 <cee.Vec3>`\ ): *void*
      
      Specify the box by providing an origin (min x,y,z of the box) and the extent in x,y and z direction.
      
      **Parameters**
      
      
         **origin**\ : :js:class:`Vec3 <cee.Vec3>`
      
         **extent**\ : :js:class:`Vec3 <cee.Vec3>`
      
      
      **Returns**\ : *void*
      




