BoundingBoxRenderer

Component responsible of rendering the bounding box of the meshes in a scene. This is usually used through the mesh.showBoundingBox or the scene.forceShowBoundingBoxes properties

Hierarchy

  • BoundingBoxRenderer

Implements

Index

Constructors

constructor

  • Instantiates a new bounding box renderer in a scene.

    Parameters

    • scene: Scene

      the scene the renderer renders in

    Returns BoundingBoxRenderer

Properties

backColor

backColor: Color3

Color of the bounding box lines placed behind an object

frontColor

frontColor: Color3

Color of the bounding box lines placed in front of an object

name

name: string

The component name helpfull to identify the component in the list of scene components.

scene

scene: Scene

The scene the component belongs to.

showBackLines

showBackLines: boolean

Defines if the renderer should show the back lines or not

Methods

dispose

  • dispose(): void
  • Dispose and release the resources attached to this renderer.

    Returns void

rebuild

  • rebuild(): void
  • Rebuilds the elements related to this component in case of context lost for instance.

    Returns void

register

  • register(): void
  • Registers the component in a given scene

    Returns void

render

  • render(renderingGroupId: number): void
  • Render the bounding boxes of a specific rendering group

    Parameters

    • renderingGroupId: number

      defines the rendering group to render

    Returns void

renderOcclusionBoundingBox

  • In case of occlusion queries, we can render the occlusion bounding box through this method

    Parameters

    • mesh: AbstractMesh

      Define the mesh to render the occlusion bounding box for

    Returns void

Generated using TypeDoc