Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BoxGenerator

Helper class to tesselate a box with 6 faces

Hierarchy

  • BoxGenerator

Index

Constructors

constructor

Methods

generate

  • generate(): void
  • Generate the box

    Returns void

getIndices

  • getIndices(): number[]
  • Get the indices of triangles needed to render the box

    Returns number[]

getVertices

  • getVertices(): Vec3[]
  • Get the vertices of the box as Vec3

    Returns Vec3[]

getVerticesNumber

  • getVerticesNumber(): number[]
  • Get the vertices of the box as a number array with <x,y,z,x,y,z,...>

    Returns number[]

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

    Returns void

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

    Returns void

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

    Returns void

Generated using TypeDoc