.. role:: ts-api-decorator

###############
SphereGenerator
###############

.. js:module:: cee.utils
   :noindex:

.. container:: ts-api-section

   .. js:class:: SphereGenerator

      Helper class to tesselate a sphere

      Useful when result values need to be mapped onto a set of 3D points defining a sphere. 
      See the method ``createCuttingSolid`` in the example in Examples/DemoAppUg on how to do that.



.. container:: api-index-section

   .. rubric:: Constructors

   .. rst-class:: api-index-list-item api-kind-constructor api-parent-kind-class

   * :js:meth:`~cee.utils.SphereGenerator.constructor`



.. container:: api-index-section

   .. rubric:: Properties

   .. rst-class:: api-index-list-item api-kind-property api-parent-kind-class

   * :js:attr:`~cee.utils.SphereGenerator.m_indices`
   * :js:attr:`~cee.utils.SphereGenerator.m_vertices`



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~cee.utils.SphereGenerator.configure`
   * :js:meth:`~cee.utils.SphereGenerator.fillVerticesIndices`
   * :js:meth:`~cee.utils.SphereGenerator.generate`
   * :js:meth:`~cee.utils.SphereGenerator.getIndices`
   * :js:meth:`~cee.utils.SphereGenerator.getVertices`
   * :js:meth:`~cee.utils.SphereGenerator.getVerticesNumber`





------------

Constructors
============

.. container:: ts-api-section

   .. js:function:: SphereGenerator.constructor()



      :rtype: SphereGenerator



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: SphereGenerator.m_indices

      :type: [number]





.. container:: ts-api-section

   .. js:attribute:: SphereGenerator.m_vertices

      :type: [Vec3]





Methods
=======

.. rst-class:: ts-api-section

configure
---------

.. js:method:: SphereGenerator.configure( config)

   :param config: None
   :type config: SphereGeneratorConfig


   Sets up the sphere parameters.


   :rtype: void

.. rst-class:: ts-api-section

fillVerticesIndices
-------------------

.. js:method:: SphereGenerator.fillVerticesIndices( vertices, indices)

   :param vertices: The vertices in the format x,y,z,x,y,z,...
   :type vertices: Float32Array
   :param indices: The indices for the vertices
   :type indices: [number]


   Fills the members ``m_vertices`` and ``m_indices`` of this class.


   :rtype: void

.. rst-class:: ts-api-section

generate
--------

.. js:method:: SphereGenerator.generate()



   Generates the sphere, using the previously provided configuration.


   :rtype: void

.. rst-class:: ts-api-section

getIndices
----------

.. js:method:: SphereGenerator.getIndices()



   Get the indices of triangles needed to render the solid object


   :rtype: [number]

.. rst-class:: ts-api-section

getVertices
-----------

.. js:method:: SphereGenerator.getVertices()



   Get the vertices of the solid object as Vec3


   :rtype: [Vec3]

.. rst-class:: ts-api-section

getVerticesNumber
-----------------

.. js:method:: SphereGenerator.getVerticesNumber()



   Get the vertices of the solid object as a number array with <x,y,z,x,y,z,...>


   :rtype: [number]

