BoxGenerator

class cee.utils.BoxGenerator()

Helper class to tesselate a box with 6 faces

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

Constructors

cee.utils.BoxGenerator.constructor()
BoxGenerator(): BoxGenerator

Returns: BoxGenerator

Properties

cee.utils.BoxGenerator.m_indices

inherited

m_indices: number[]
cee.utils.BoxGenerator.m_vertices

inherited

m_vertices: Vec3[]

Methods

cee.utils.BoxGenerator.fillVerticesIndices()

inherited

fillVerticesIndices(vertices: Float32Array, indices: number[]): void

Fills the members m_vertices and m_indices of this class.

Parameters

vertices: Float32Array

The vertices in the format x,y,z,x,y,z,…

indices: number[]

The indices for the vertices

Returns: void

cee.utils.BoxGenerator.generate()
generate(): void

Generate the box

Returns: void

cee.utils.BoxGenerator.getIndices()

inherited

getIndices(): number[]

Get the indices of triangles needed to render the solid object

Returns: number[]

cee.utils.BoxGenerator.getVertices()

inherited

getVertices(): Vec3[]

Get the vertices of the solid object as Vec3

Returns: Vec3[]

cee.utils.BoxGenerator.getVerticesNumber()

inherited

getVerticesNumber(): number[]

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

Returns: number[]

cee.utils.BoxGenerator.setCenterAndExtent()
setCenterAndExtent(center: Vec3, extent: Vec3): void

Specify the box by providing the center of the box and the extent in x,y, and z direction.

Parameters

center: Vec3

extent: Vec3

Returns: void

cee.utils.BoxGenerator.setNumSegments()
setNumSegments(numX: number, numY: number, numZ: number): void

Sets the number of segments of the box per axis.

Parameters

numX: number

numY: number

numZ: number

Returns: void

cee.utils.BoxGenerator.setOrientation()
setOrientation(rightDir: Vec3, upDir: Vec3): void

Set the orientation of the box by giing the right direction (local x axis) and the up direction (local z axis).

Parameters

rightDir: Vec3

upDir: Vec3

Returns: void

cee.utils.BoxGenerator.setOriginAndExtent()
setOriginAndExtent(origin: Vec3, extent: Vec3): void

Specify the box by providing an origin (min x,y,z of the box) and the extent in x,y and z direction.

Parameters

origin: Vec3

extent: Vec3

Returns: void