Class BoundingInfo
Hierarchy
- BoundingInfo
Implements
Index
Constructors
constructor
Constructs bounding info
Parameters
minimum: DeepImmutableObject<Vector3>
min vector of the bounding box/sphere
maximum: DeepImmutableObject<Vector3>
max vector of the bounding box/sphere
Optional worldMatrix: DeepImmutableObject<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 void
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: DeepImmutableObject<Vector3>
New center of the bounding info
extend: DeepImmutableObject<Vector3>
New extend of the bounding info
Returns BoundingInfo
the current bounding info
encapsulateSearch playground for encapsulate
Grows the bounding info to include the given point.
Parameters
point: Vector3
The point that will be included in the current bounding info
Returns BoundingInfo
the current bounding info
encapsulate Bounding InfoSearch playground for encapsulateBoundingInfo
Grows the bounding info to encapsulate the given bounding info.
Parameters
toEncapsulate: BoundingInfo
The bounding info that will be encapsulated in the current 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: DeepImmutableObject<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: DeepImmutableObject<Vector3>
the point to check intersection with
Returns boolean
if the point intersects
is Completely In FrustumSearch playground for isCompletelyInFrustum
Checks if a cullable object (mesh...) is in the camera frustum Unlike isInFrustum this checks the full bounding box
Parameters
frustumPlanes: DeepImmutableObject<Plane>[]
Camera near/planes
Returns boolean
true if the object is in frustum otherwise false
is In FrustumSearch playground for isInFrustum
Returns
true
if the bounding info is within the frustum defined by the passed array of planes.Parameters
frustumPlanes: DeepImmutableObject<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: 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 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: DeepImmutableObject<Matrix>
world matrix to be used to update
Returns void
Info for a bounding data of a mesh