Class BoundingSphere
Hierarchy
- BoundingSphere
Index
Constructors
constructor
Creates a new bounding sphere
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 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 DeepImmutableObject<Matrix>
a matrix
intersects PointSearch playground for intersectsPoint
Tests if a point is inside the bounding sphere
Parameters
point: DeepImmutableObject<Vector3>
defines the point to test
Returns boolean
true if the point is inside the bounding sphere
is Center In FrustumSearch playground for isCenterInFrustum
Tests if the bounding sphere center is in between the frustum planes. Used for optimistic fast inclusion.
Parameters
frustumPlanes: DeepImmutableObject<Plane>[]
defines the frustum planes to test
Returns boolean
true if the sphere center is in between the frustum planes
is In FrustumSearch playground for isInFrustum
Tests if the bounding sphere 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 sphere 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 sphere by applying a scale factor
Parameters
factor: number
defines the scale factor to apply
Returns BoundingSphere
the current bounding box
Static Create From Center And RadiusSearch playground for CreateFromCenterAndRadius
Creates a sphere from a center and a radius
Parameters
center: DeepImmutableObject<Vector3>
The center
radius: number
radius
Optional matrix: DeepImmutableObject<Matrix>
Optional worldMatrix
Returns BoundingSphere
The sphere
Static IntersectsSearch playground for Intersects
Checks if two sphere intersect
Parameters
sphere0: DeepImmutableObject<BoundingSphere>
sphere 0
sphere1: DeepImmutableObject<BoundingSphere>
sphere 1
Returns boolean
true if the spheres intersect
Class used to store bounding sphere information