CylinderGenerator

class cee.utils.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.

Constructors

Properties


Constructors

CylinderGenerator.constructor()
Return type:

CylinderGenerator

Properties

CylinderGenerator.m_indices
Type:

[number]

CylinderGenerator.m_vertices
Type:

[Vec3]

Methods

configure

CylinderGenerator.configure(config)
Arguments:

Sets up the cylinder parameters.

Return type:

void

fillVerticesIndices

CylinderGenerator.fillVerticesIndices(vertices, indices)
Arguments:
  • vertices (Float32Array) – The vertices in the format x,y,z,x,y,z,…

  • indices ([number]) – The indices for the vertices

Fills the members m_vertices and m_indices of this class.

Return type:

void

generate

CylinderGenerator.generate()

Generates the cylinder, using the previously provided configuration.

Return type:

void

getIndices

CylinderGenerator.getIndices()

Get the indices of triangles needed to render the solid object

Return type:

[number]

getVertices

CylinderGenerator.getVertices()

Get the vertices of the solid object as Vec3

Return type:

[Vec3]

getVerticesNumber

CylinderGenerator.getVerticesNumber()

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

Return type:

[number]