# 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

- `constructor`

Properties

- `m_indices`
- `m_vertices`

Methods

- `fillVerticesIndices`
- `generate`
- `getIndices`
- `getVertices`
- `getVerticesNumber`
- `setCenterAndExtent`
- `setNumSegments`
- `setOrientation`
- `setOriginAndExtent`

## Constructors

`BoxGenerator.``constructor`()

  Return type: | BoxGenerator

## Properties

`BoxGenerator.``m_indices`

  Type: | [number]

`BoxGenerator.``m_vertices`

  Type: | [Vec3]

## Methods

### fillVerticesIndices

`BoxGenerator.``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

`BoxGenerator.``generate`()

  Generate the box

  Return type: | void

### getIndices

`BoxGenerator.``getIndices`()

  Get the indices of triangles needed to render the solid object

  Return type: | [number]

### getVertices

`BoxGenerator.``getVertices`()

  Get the vertices of the solid object as Vec3

  Return type: | [Vec3]

### getVerticesNumber

`BoxGenerator.``getVerticesNumber`()

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

  Return type: | [number]

### setCenterAndExtent

`BoxGenerator.``setCenterAndExtent`(center, extent)

  Arguments: | center (`Vec3`) – None extent (`Vec3`) – None

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

  Return type: | void

### setNumSegments

`BoxGenerator.``setNumSegments`(numX, numY, numZ)

  Arguments: | numX (`number`) – None numY (`number`) – None numZ (`number`) – None

  Sets the number of segments of the box per axis.

  Return type: | void

### setOrientation

`BoxGenerator.``setOrientation`(rightDir, upDir)

  Arguments: | rightDir (`Vec3`) – None upDir (`Vec3`) – None

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

  Return type: | void

### setOriginAndExtent

`BoxGenerator.``setOriginAndExtent`(origin, extent)

  Arguments: | origin (`Vec3`) – None extent (`Vec3`) – None

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

  Return type: | void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...