Class BoundingInfoHelper
Constructors
constructor
-
Creates a new BoundingInfoHelper
Parameters
- engine: AbstractEngine
defines the engine to use
Returns BoundingInfoHelper
- engine: AbstractEngine
Methods
batch Fetch Results Async
-
Update the bounding info of the meshes registered with batchRegisterAsync, after batchProcess has been called once or several times
Returns Promise<void>
a promise that resolves when the bounding info is/are computed
batch Initialize Async
-
Register a mesh / array of meshes to be processed per batch This method must be called before calling batchProcess (which can be called several times) and batchFetchResultsAsync
Parameters
- target: any
defines the mesh(es) to be processed per batch
Returns Promise<void>
a promise that resolves when the initialization is done
- target: any
batch Process
-
Processes meshes registered with batchRegisterAsync If called multiple times, the second, third, etc calls will perform a union of the bounding boxes calculated in the previous calls
Returns void
compute Async
-
Compute the bounding info of a mesh / array of meshes using shaders
Parameters
- target: any
defines the mesh(es) to update
Returns Promise<void>
a promise that resolves when the bounding info is/are computed
- target: any
dispose
-
Dispose and release associated resources
Returns void
Utility class to help with bounding info management Warning: using the BoundingInfoHelper class may be slower than executing calculations on the CPU! This will happen if there are a lot of meshes / few vertices (like with the BrainStem model) The BoundingInfoHelper will perform better if there are few meshes / a lot of vertices https://playground.babylonjs.com/#QPOERJ#9 : WebGL https://playground.babylonjs.com/#QPOERJ#10 : WebGPU