Class BoundingBox
Hierarchy
- BoundingBox
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
-
Creates a new bounding box
Parameters
-
min: DeepImmutable<Vector3>
defines the minimum vector (in local space)
-
max: DeepImmutable<Vector3>
defines the maximum vector (in local space)
-
Optional worldMatrix: DeepImmutable<Matrix>
defines the new world matrix
Returns BoundingBox
-
Properties
Readonly centerSearch playground for center
Gets the center of the bounding box in local space
Readonly center WorldSearch playground for centerWorld
Gets the center of the bounding box in world space
Readonly directionsSearch playground for directions
Gets the OBB (object bounding box) directions
Readonly extend SizeSearch playground for extendSize
Gets the extend size in local space
Readonly extend Size WorldSearch playground for extendSizeWorld
Gets the extend size in world space
Readonly maximumSearch playground for maximum
Gets the maximum vector in local space
Readonly maximum WorldSearch playground for maximumWorld
Gets the maximum vector in world space
Readonly minimumSearch playground for minimum
Gets the minimum vector in local space
Readonly minimum WorldSearch playground for minimumWorld
Gets the minimum vector in world space
Readonly vectorsSearch playground for vectors
Gets the 8 vectors representing the bounding box in local space
Readonly vectors WorldSearch playground for vectorsWorld
Gets the 8 vectors representing the bounding box in world space
Methods
get World MatrixSearch playground for getWorldMatrix
-
Gets the world matrix of the bounding box
Returns DeepImmutable<Matrix>
a matrix
intersects Min MaxSearch playground for intersectsMinMax
-
Tests if the bounding box intersects with a box defined by a min and max vectors
Parameters
-
min: DeepImmutable<Vector3>
defines the min vector to use
-
max: DeepImmutable<Vector3>
defines the max vector to use
Returns boolean
true if there is an intersection
-
intersects PointSearch playground for intersectsPoint
-
Tests if a point is inside the bounding box
Parameters
-
point: DeepImmutable<Vector3>
defines the point to test
Returns boolean
true if the point is inside the bounding box
-
intersects SphereSearch playground for intersectsSphere
-
Tests if the bounding box intersects with a bounding sphere
Parameters
-
sphere: DeepImmutable<BoundingSphere>
defines the sphere to test
Returns boolean
true if there is an intersection
-
is Completely InFrustumSearch playground for isCompletelyInFrustum
-
Tests if the bounding box is entirely inside the frustum planes
Parameters
-
frustumPlanes: Array<DeepImmutable<Plane>>
defines the frustum planes to test
Returns boolean
true if there is an inclusion
-
is InFrustumSearch playground for isInFrustum
-
Tests if the bounding box is intersecting the frustum planes
Parameters
-
frustumPlanes: Array<DeepImmutable<Plane>>
defines the frustum planes to test
Returns boolean
true if there is an intersection
-
re ConstructSearch playground for reConstruct
-
Recreates the entire bounding box from scratch as if we call the constructor in place
Parameters
-
min: DeepImmutable<Vector3>
defines the new minimum vector (in local space)
-
max: DeepImmutable<Vector3>
defines the new maximum vector (in local space)
-
Optional worldMatrix: DeepImmutable<Matrix>
defines the new world matrix
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
-
box0: DeepImmutable<BoundingBox>
defines the first box to test
-
box1: DeepImmutable<BoundingBox>
defines the second box to test
Returns boolean
true if there is an intersection
-
Static Intersects SphereSearch playground for IntersectsSphere
-
Tests if a bounding box defines by a min/max vectors intersects a sphere
Parameters
-
minPoint: DeepImmutable<Vector3>
defines the minimum vector of the bounding box
-
maxPoint: DeepImmutable<Vector3>
defines the maximum vector of the bounding box
-
sphereCenter: DeepImmutable<Vector3>
defines the sphere center
-
sphereRadius: number
defines the sphere radius
Returns boolean
true if there is an intersection
-
Static Is Completely InFrustumSearch playground for IsCompletelyInFrustum
-
Tests if a bounding box defined with 8 vectors is entirely inside frustum planes
Parameters
-
boundingVectors: Array<DeepImmutable<Vector3>>
defines an array of 8 vectors representing a bounding box
-
frustumPlanes: Array<DeepImmutable<Plane>>
defines the frustum planes to test
Returns boolean
true if there is an inclusion
-
Static Is InFrustumSearch playground for IsInFrustum
-
Tests if a bounding box defined with 8 vectors intersects frustum planes
Parameters
-
boundingVectors: Array<DeepImmutable<Vector3>>
defines an array of 8 vectors representing a bounding box
-
frustumPlanes: Array<DeepImmutable<Plane>>
defines the frustum planes to test
Returns boolean
true if there is an intersection
-
Class used to store bounding box information