ArrowGenerator

class cee.utils.ArrowGenerator()

Helper class to tesselate an arrow

Constructors

Properties


Constructors

ArrowGenerator.constructor()
Return type:

ArrowGenerator

Properties

ArrowGenerator.m_indices
Type:

[number]

ArrowGenerator.m_vertices
Type:

[Vec3]

Methods

configure

ArrowGenerator.configure(config)
Arguments:

Specify the arrow by providing its relative proportions.

Return type:

void

fillVerticesIndices

ArrowGenerator.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

ArrowGenerator.generate()

Generate the arrow

Return type:

void

generateReverse

ArrowGenerator.generateReverse()

Generate the reverse arrow, with the arrow head pointing into the origin.

Return type:

void

getIndices

ArrowGenerator.getIndices()

Get the indices of triangles needed to render the solid object

Return type:

[number]

getVertices

ArrowGenerator.getVertices()

Get the vertices of the solid object as Vec3

Return type:

[Vec3]

getVerticesNumber

ArrowGenerator.getVerticesNumber()

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

Return type:

[number]