BoundingBox

Class used to store bounding box information

Hierarchy

  • BoundingBox

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

center

Find examples in Playground
center: Vector3

Gets the center of the bounding box in local space

centerWorld

Find examples in Playground
centerWorld: Vector3

Gets the center of the bounding box in world space

directions

Find examples in Playground
directions: Vector3[]

Gets the OBB (object bounding box) directions

extendSize

Find examples in Playground
extendSize: Vector3

Gets the extend size in local space

extendSizeWorld

Find examples in Playground
extendSizeWorld: Vector3

Gets the extend size in world space

maximum

Find examples in Playground
maximum: Vector3

Gets the maximum vector in local space

maximumWorld

Find examples in Playground
maximumWorld: Vector3

Gets the maximum vector in world space

minimum

Find examples in Playground
minimum: Vector3

Gets the minimum vector in local space

minimumWorld

Find examples in Playground
minimumWorld: Vector3

Gets the minimum vector in world space

vectors

Find examples in Playground
vectors: Vector3[]

Gets the 8 vectors representing the bounding box in local space

vectorsWorld

Find examples in Playground
vectorsWorld: Vector3[]

Gets the 8 vectors representing the bounding box in world space

Methods

getWorldMatrix

Find examples in Playground

intersectsMinMax

Find examples in Playground
  • Tests if the bounding box intersects with a box defined by a min and max vectors

    Parameters

    Returns boolean

    true if there is an intersection

intersectsPoint

Find examples in Playground
  • Tests if a point is inside the bounding box

    Parameters

    Returns boolean

    true if the point is inside the bounding box

intersectsSphere

Find examples in Playground
  • Tests if the bounding box intersects with a bounding sphere

    Parameters

    Returns boolean

    true if there is an intersection

isCompletelyInFrustum

Find examples in Playground
  • Tests if the bounding box is entirely inside the frustum planes

    Parameters

    Returns boolean

    true if there is an inclusion

isInFrustum

Find examples in Playground
  • Tests if the bounding box is intersecting the frustum planes

    Parameters

    Returns boolean

    true if there is an intersection

reConstruct

Find examples in Playground
  • Recreates the entire bounding box from scratch as if we call the constructor in place

    Parameters

    Returns void

scale

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

    Parameters

    • factor: number

      defines the scale factor to apply

    Returns BoundingBox

    the current bounding box

Static Intersects

Find examples in Playground

Static IntersectsSphere

Find examples in Playground
  • Tests if a bounding box defines by a min/max vectors intersects a sphere

    Parameters

    Returns boolean

    true if there is an intersection

Static IsCompletelyInFrustum

Find examples in Playground
  • Tests if a bounding box defined with 8 vectors is entirely inside frustum planes

    Parameters

    Returns boolean

    true if there is an inclusion

Static IsInFrustum

Find examples in Playground
  • Tests if a bounding box defined with 8 vectors intersects frustum planes

    Parameters

    Returns boolean

    true if there is an intersection

Generated using TypeDoc