Class BoundingInfo
Hierarchy
- BoundingInfo
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
Constructs bounding info
Parameters
-
minimum: DeepImmutable<Vector3>
min vector of the bounding box/sphere
-
maximum: DeepImmutable<Vector3>
max vector of the bounding box/sphere
-
Optional worldMatrix: DeepImmutable<Matrix>
defines the new world matrix
Returns BoundingInfo
-
Properties
Readonly bounding BoxSearch playground for boundingBox
Bounding box for the mesh
Readonly bounding SphereSearch playground for boundingSphere
Bounding sphere for the mesh
Accessors
diagonal Length
-
Gets the world distance between the min and max points of the bounding box
Returns number
is Locked
-
If the info is locked and won't be updated to avoid perf overhead
Returns boolean
-
If the info is locked and won't be updated to avoid perf overhead
Parameters
-
value: boolean
Returns any
-
maximum
-
max vector of the bounding box/sphere
Returns Vector3
minimum
-
min vector of the bounding box/sphere
Returns Vector3
Methods
center OnSearch playground for centerOn
-
Recreate the bounding info to be centered around a specific point given a specific extend.
Parameters
-
center: DeepImmutable<Vector3>
New center of the bounding info
-
extend: DeepImmutable<Vector3>
New extend of the bounding info
Returns BoundingInfo
the current bounding info
-
intersectsSearch playground for intersects
-
Checks if another bounding info intersects the bounding box and bounding sphere or the mesh
Parameters
-
boundingInfo: DeepImmutable<BoundingInfo>
the bounding info to check intersection with
-
precise: boolean
if the intersection should be done using OBB
Returns boolean
if the bounding info intersects
-
intersects PointSearch playground for intersectsPoint
-
Checks if a point is inside the bounding box and bounding sphere or the mesh
Parameters
-
point: DeepImmutable<Vector3>
the point to check intersection with
Returns boolean
if the point intersects
-
is Completely InFrustumSearch playground for isCompletelyInFrustum
-
Checks if a cullable object (mesh...) is in the camera frustum Unlike isInFrustum this cheks the full bounding box
Parameters
-
frustumPlanes: Array<DeepImmutable<Plane>>
Camera near/planes
Returns boolean
true if the object is in frustum otherwise false
-
is InFrustumSearch playground for isInFrustum
-
Returns
true
if the bounding info is within the frustum defined by the passed array of planes.Parameters
-
frustumPlanes: Array<DeepImmutable<Plane>>
defines the frustum to test
-
Optional strategy: number
defines the strategy to use for the culling (default is BABYLON.AbstractMesh.CULLINGSTRATEGY_STANDARD)
Returns boolean
true if the bounding info is in the frustum planes
-
re ConstructSearch playground for reConstruct
-
Recreates the entire bounding info 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 info by applying a scale factor
Parameters
-
factor: number
defines the scale factor to apply
Returns BoundingInfo
the current bounding info
-
updateSearch playground for update
-
Updates the bounding sphere and box
Parameters
-
world: DeepImmutable<Matrix>
world matrix to be used to update
Returns void
-
Info for a bounding data of a mesh