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 sphere. See the method
createCuttingSolid
in the example in Examples/DemoAppUg on how to do that.
Constructors
Properties
Methods
Constructors
constructor
- cee.utils.BoxGenerator.constructor()
- Return type
cee.utils.BoxGenerator
Properties
- cee.utils.BoxGenerator.m_indices
- cee.utils.BoxGenerator.m_vertices
Methods
fillVerticesIndices
- cee.utils.BoxGenerator.fillVerticesIndices(vertices, indices)
Fills the members
m_vertices
andm_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.BoxGenerator.generate()
Generate the box
- Return type
void
getIndices
- cee.utils.BoxGenerator.getIndices()
Get the indices of triangles needed to render the solid object
- Return type
[number]
getVertices
- cee.utils.BoxGenerator.getVertices()
Get the vertices of the solid object as Vec3
- Return type
[cee.Vec3]
getVerticesNumber
- cee.utils.BoxGenerator.getVerticesNumber()
Get the vertices of the solid object as a number array with <x,y,z,x,y,z,…>
- Return type
[number]
setCenterAndExtent
- cee.utils.BoxGenerator.setCenterAndExtent(center, extent)
Specify the box by providing the center of the box and the extent in x,y, and z direction.
- Arguments
center (
cee.Vec3
) –extent (
cee.Vec3
) –
- Return type
void
setNumSegments
- cee.utils.BoxGenerator.setNumSegments(numX, numY, numZ)
Sets the number of segments of the box per axis.
- Arguments
numX (
number
) –numY (
number
) –numZ (
number
) –
- Return type
void
setOrientation
- cee.utils.BoxGenerator.setOrientation(rightDir, upDir)
Set the orientation of the box by giing the right direction (local x axis) and the up direction (local z axis).
- Arguments
rightDir (
cee.Vec3
) –upDir (
cee.Vec3
) –
- Return type
void
setOriginAndExtent
- cee.utils.BoxGenerator.setOriginAndExtent(origin, extent)
Specify the box by providing an origin (min x,y,z of the box) and the extent in x,y and z direction.
- Arguments
origin (
cee.Vec3
) –extent (
cee.Vec3
) –
- Return type
void