SphereGenerator

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

Constructors

Properties


Constructors

constructor

cee.utils.SphereGenerator.constructor()
Return type

cee.utils.SphereGenerator

Properties

cee.utils.SphereGenerator.m_indices
cee.utils.SphereGenerator.m_vertices

Methods

configure

cee.utils.SphereGenerator.configure(config)

Sets up the sphere parameters.

Arguments
Return type

void

fillVerticesIndices

cee.utils.SphereGenerator.fillVerticesIndices(vertices, indices)

Fills the members m_vertices and m_indices of this class.

Arguments
  • vertices (Float32Array) – The vertices in the format x,y,z,x,y,z,…

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

Return type

void

generate

cee.utils.SphereGenerator.generate()

Generates the sphere, using the previously provided configuration.

Return type

void

getIndices

cee.utils.SphereGenerator.getIndices()

Get the indices of triangles needed to render the solid object

Return type

[number]

getVertices

cee.utils.SphereGenerator.getVertices()

Get the vertices of the solid object as Vec3

Return type

[cee.Vec3]

getVerticesNumber

cee.utils.SphereGenerator.getVerticesNumber()

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

Return type

[number]