Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BoundingBox

Class used to store bounding box information

Hierarchy

  • BoundingBox

Implements

Index

Constructors

constructor

Properties

Readonly centerSearch playground for center

center: Vector3

Gets the center of the bounding box in local space

Readonly centerWorldSearch playground for centerWorld

centerWorld: Vector3

Gets the center of the bounding box in world space

Readonly directionsSearch playground for directions

directions: Vector3[]

Gets the OBB (object bounding box) directions

Readonly extendSizeSearch playground for extendSize

extendSize: Vector3

Gets the extend size in local space

Readonly extendSizeWorldSearch playground for extendSizeWorld

extendSizeWorld: Vector3

Gets the extend size in world space

Readonly maximumSearch playground for maximum

maximum: Vector3

Gets the maximum vector in local space

Readonly maximumWorldSearch playground for maximumWorld

maximumWorld: Vector3

Gets the maximum vector in world space

Readonly minimumSearch playground for minimum

minimum: Vector3

Gets the minimum vector in local space

Readonly minimumWorldSearch playground for minimumWorld

minimumWorld: Vector3

Gets the minimum vector in world space

Readonly vectorsSearch playground for vectors

vectors: Vector3[]

Gets the 8 vectors representing the bounding box in local space

Readonly vectorsWorldSearch playground for vectorsWorld

vectorsWorld: Vector3[]

Gets the 8 vectors representing the bounding box in world space

Methods

disposeSearch playground for dispose

  • dispose(): void
  • Disposes the resources of the class

    Returns void

getWorldMatrixSearch playground for getWorldMatrix

  • Gets the world matrix of the bounding box

    Returns DeepImmutable<Matrix>

    a matrix

intersectsMinMaxSearch playground for intersectsMinMax

  • 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

intersectsPointSearch playground for intersectsPoint

  • Tests if a point is inside the bounding box

    Parameters

    Returns boolean

    true if the point is inside the bounding box

intersectsSphereSearch playground for intersectsSphere

  • Tests if the bounding box intersects with a bounding sphere

    Parameters

    Returns boolean

    true if there is an intersection

isCompletelyInFrustumSearch playground for isCompletelyInFrustum

  • Tests if the bounding box is entirely inside the frustum planes

    Parameters

    Returns boolean

    true if there is an inclusion

isInFrustumSearch playground for isInFrustum

  • Tests if the bounding box is intersecting the frustum planes

    Parameters

    Returns boolean

    true if there is an intersection

reConstructSearch playground for reConstruct

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

    Parameters

    Returns void

scaleSearch playground for scale

  • 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 IntersectsSearch playground for Intersects

  • Tests if two bounding boxes are intersections

    Parameters

    Returns boolean

    true if there is an intersection

Static IntersectsSphereSearch playground for IntersectsSphere

  • Tests if a bounding box defines by a min/max vectors intersects a sphere

    Parameters

    Returns boolean

    true if there is an intersection

Static IsCompletelyInFrustumSearch playground for IsCompletelyInFrustum

  • Tests if a bounding box defined with 8 vectors is entirely inside frustum planes

    Parameters

    Returns boolean

    true if there is an inclusion

Static IsInFrustumSearch playground for IsInFrustum

  • Tests if a bounding box defined with 8 vectors intersects frustum planes

    Parameters

    Returns boolean

    true if there is an intersection

Legend

  • Constructor
  • Property
  • Method
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Static property
  • Static method