Options
All
  • Public
  • Public/Protected
  • All
Menu

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

  • Instantiates a new bounding box renderer in a scene.

    Parameters

    • scene: Scene

      the scene the renderer renders in

    Returns BoundingBoxRenderer

Properties

backColor: Color3

Color of the bounding box lines placed behind an object

enabled: boolean

When false, no bounding boxes will be rendered

frontColor: Color3

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

name: "BoundingBoxRenderer" = "BoundingBoxRenderer"

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

onAfterBoxRenderingObservable: Observable<BoundingBox>

Observable raised after rendering a bounding box

onBeforeBoxRenderingObservable: Observable<BoundingBox>

Observable raised before rendering a bounding box

onResourcesReadyObservable: Observable<BoundingBoxRenderer>

Observable raised after resources are created

scene: Scene

The scene the component belongs to.

showBackLines: boolean

Defines if the renderer should show the back lines or not

Methods

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

    Returns void

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

    Returns void

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

    Returns void

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

    Parameters

    • renderingGroupId: number

      defines the rendering group to render

    Returns void

  • 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

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited constructor
  • Static method

Settings

Theme