Class BoundingBox
Hierarchy
- BoundingBox
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
Creates a new bounding box
Parameters
min: DeepImmutableObject<Vector3>
defines the minimum vector (in local space)
max: DeepImmutableObject<Vector3>
defines the maximum vector (in local space)
Optional worldMatrix: DeepImmutableObject<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
disposeSearch playground for dispose
Disposes the resources of the class
Returns void
get World MatrixSearch playground for getWorldMatrix
Gets the world matrix of the bounding box
Returns DeepImmutableObject<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: DeepImmutableObject<Vector3>
defines the min vector to use
max: DeepImmutableObject<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: DeepImmutableObject<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: DeepImmutableObject<BoundingSphere>
defines the sphere to test
Returns boolean
true if there is an intersection
is Completely In FrustumSearch playground for isCompletelyInFrustum
Tests if the bounding box is entirely inside the frustum planes
Parameters
frustumPlanes: DeepImmutableObject<Plane>[]
defines the frustum planes to test
Returns boolean
true if there is an inclusion
is In FrustumSearch playground for isInFrustum
Tests if the bounding box is intersecting the frustum planes
Parameters
frustumPlanes: DeepImmutableObject<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: DeepImmutableObject<Vector3>
defines the new minimum vector (in local space)
max: DeepImmutableObject<Vector3>
defines the new maximum vector (in local space)
Optional worldMatrix: DeepImmutableObject<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: DeepImmutableObject<BoundingBox>
defines the first box to test
box1: DeepImmutableObject<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: DeepImmutableObject<Vector3>
defines the minimum vector of the bounding box
maxPoint: DeepImmutableObject<Vector3>
defines the maximum vector of the bounding box
sphereCenter: DeepImmutableObject<Vector3>
defines the sphere center
sphereRadius: number
defines the sphere radius
Returns boolean
true if there is an intersection
Static Is Completely In FrustumSearch playground for IsCompletelyInFrustum
Tests if a bounding box defined with 8 vectors is entirely inside frustum planes
Parameters
boundingVectors: DeepImmutableObject<Vector3>[]
defines an array of 8 vectors representing a bounding box
frustumPlanes: DeepImmutableObject<Plane>[]
defines the frustum planes to test
Returns boolean
true if there is an inclusion
Static Is In FrustumSearch playground for IsInFrustum
Tests if a bounding box defined with 8 vectors intersects frustum planes
Parameters
boundingVectors: DeepImmutableObject<Vector3>[]
defines an array of 8 vectors representing a bounding box
frustumPlanes: DeepImmutableObject<Plane>[]
defines the frustum planes to test
Returns boolean
true if there is an intersection
Class used to store bounding box information