BoundingInfo

Info for a bounding data of a mesh

Hierarchy

  • BoundingInfo

Implements

Index

Constructors

constructor

Find examples in Playground
  • Constructs bounding info

    Parameters

    • minimum: Vector3

      min vector of the bounding box/sphere

    • maximum: Vector3

      max vector of the bounding box/sphere

    Returns BoundingInfo

Properties

boundingBox

Find examples in Playground
boundingBox: BoundingBox

Bounding box for the mesh

boundingSphere

Find examples in Playground
boundingSphere: BoundingSphere

Bounding sphere for the mesh

diagonalLength

Find examples in Playground
diagonalLength: number

Gets the world distance between the min and max points of the bounding box

isLocked

Find examples in Playground
isLocked: boolean

If the info is locked and won't be updated to avoid perf overhead

maximum

Find examples in Playground
maximum: Vector3

max vector of the bounding box/sphere

minimum

Find examples in Playground
minimum: Vector3

min vector of the bounding box/sphere

Methods

centerOn

Find examples in Playground
  • Recreate the bounding info to be centered around a specific point given a specific extend.

    Parameters

    • center: Vector3

      New center of the bounding info

    • extend: Vector3

      New extend of the bounding info

    Returns BoundingInfo

    the current bounding info

intersects

Find examples in Playground
  • intersects(boundingInfo: BoundingInfo, precise: boolean): boolean

intersectsPoint

Find examples in Playground
  • intersectsPoint(point: Vector3): boolean

isCompletelyInFrustum

Find examples in Playground
  • isCompletelyInFrustum(frustumPlanes: Plane[]): boolean
  • Checks if a cullable object (mesh...) is in the camera frustum Unlike isInFrustum this cheks the full bounding box

    Parameters

    • frustumPlanes: Plane[]

      Camera near/planes

    Returns boolean

    true if the object is in frustum otherwise false

isInFrustum

Find examples in Playground
  • isInFrustum(frustumPlanes: Plane[], strategy?: number): boolean
  • Returns true if the bounding info is within the frustum defined by the passed array of planes.

    Parameters

    • frustumPlanes: Plane[]

      defines the frustum to test

    • Optional strategy: number

      defines the strategy to use for the culling (default is BABYLON.Scene.CULLINGSTRATEGY_STANDARD)

    Returns boolean

    true if the bounding info is in the frustum planes

scale

Find examples in Playground
  • Scale the current bounding info by applying a scale factor

    Parameters

    • factor: number

      defines the scale factor to apply

    Returns BoundingInfo

    the current bounding info

update

Find examples in Playground
  • Updates the boudning sphere and box

    Parameters

    • world: Matrix

      world matrix to be used to update

    Returns void

Generated using TypeDoc