.. role:: ts-api-decorator

#################
CylinderGenerator
#################

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

.. container:: ts-api-section

   .. js:class:: CylinderGenerator

      Helper class to tesselate a cylinder with closed caps. 

      Useful when result values need to be mapped onto a set of 3D points defining a cylinder. 
      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.CylinderGenerator.constructor`



.. container:: api-index-section

   .. rubric:: Properties

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

   * :js:attr:`~cee.utils.CylinderGenerator.m_indices`
   * :js:attr:`~cee.utils.CylinderGenerator.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.CylinderGenerator.configure`
   * :js:meth:`~cee.utils.CylinderGenerator.fillVerticesIndices`
   * :js:meth:`~cee.utils.CylinderGenerator.generate`
   * :js:meth:`~cee.utils.CylinderGenerator.getIndices`
   * :js:meth:`~cee.utils.CylinderGenerator.getVertices`
   * :js:meth:`~cee.utils.CylinderGenerator.getVerticesNumber`





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

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

.. container:: ts-api-section

   .. js:function:: CylinderGenerator.constructor()



      :rtype: CylinderGenerator



Properties
==========

.. container:: ts-api-section

   .. js:attribute:: CylinderGenerator.m_indices

      :type: [number]





.. container:: ts-api-section

   .. js:attribute:: CylinderGenerator.m_vertices

      :type: [Vec3]





Methods
=======

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

configure
---------

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

   :param config: None
   :type config: CylinderGeneratorConfig


   Sets up the cylinder parameters.


   :rtype: void

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

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

.. js:method:: CylinderGenerator.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:: CylinderGenerator.generate()



   Generates the cylinder, using the previously provided configuration.


   :rtype: void

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

getIndices
----------

.. js:method:: CylinderGenerator.getIndices()



   Get the indices of triangles needed to render the solid object


   :rtype: [number]

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

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

.. js:method:: CylinderGenerator.getVertices()



   Get the vertices of the solid object as Vec3


   :rtype: [Vec3]

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

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

.. js:method:: CylinderGenerator.getVerticesNumber()



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


   :rtype: [number]

