Class BoundingSphere
Hierarchy
- BoundingSphere
Index
Constructors
Properties
Methods
Constructors
constructor
-
Creates a new bounding sphere
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 BoundingSphere
-
Properties
Readonly centerSearch playground for center
Gets the center of the bounding sphere in local space
Readonly center WorldSearch playground for centerWorld
Gets the center of the bounding sphere in world space
Readonly maximumSearch playground for maximum
Gets the maximum vector in local space
Readonly minimumSearch playground for minimum
Gets the minimum vector in local space
radiusSearch playground for radius
Radius of the bounding sphere in local space
radius WorldSearch playground for radiusWorld
Radius of the bounding sphere in world space
Methods
get World MatrixSearch playground for getWorldMatrix
-
Gets the world matrix of the bounding box
Returns DeepImmutable<Matrix>
a matrix
intersects PointSearch playground for intersectsPoint
-
Tests if a point is inside the bounding sphere
Parameters
-
point: DeepImmutable<Vector3>
defines the point to test
Returns boolean
true if the point is inside the bounding sphere
-
is Center InFrustumSearch playground for isCenterInFrustum
-
Tests if the bounding sphere center is in between the frustum planes. Used for optimistic fast inclusion.
Parameters
-
frustumPlanes: Array<DeepImmutable<Plane>>
defines the frustum planes to test
Returns boolean
true if the sphere center is in between the frustum planes
-
is InFrustumSearch playground for isInFrustum
-
Tests if the bounding sphere 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 sphere 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 sphere by applying a scale factor
Parameters
-
factor: number
defines the scale factor to apply
Returns BoundingSphere
the current bounding box
-
Static IntersectsSearch playground for Intersects
-
Checks if two sphere intersct
Parameters
-
sphere0: DeepImmutable<BoundingSphere>
sphere 0
-
sphere1: DeepImmutable<BoundingSphere>
sphere 1
Returns boolean
true if the speres intersect
-
Class used to store bounding sphere information