InternalCreates a MeshManager.
Shared renderer context (provides access to viewer + WebGL resources).
GPU memory allocator/uploader used by batches and meshes.
Returns a cached list of mesh batches sorted by primitive type.
Handles updates to the camera's view matrix.
Forwards the update to GPUMemoryManager so camera-dependent GPU state can be updated.
Retrieves a mesh batch by index.
Batch index.
The batch if found, otherwise null.
The current implementation indexes into _sortedBatches (a record keyed by internal ids), so this method may not behave as expected unless _sortedBatches is keyed by numeric indices. Consider switching to sortedBatches[batchIndex] if you want a stable positional lookup.
Returns the parameters required for a WebGL drawArrays call for a mesh within a batch.
GPU memory batch index.
Mesh index within the batch.
{first, count} if available, otherwise null.
Initializes the manager by registering any existing SceneModels and SceneObjects already present in the viewer's scene.
SDKResult that is ok:true when initialization succeeds, or ok:false if
any object registration fails.
Registers a newly created SceneGeometry.
The geometry to register.
SDKResult indicating success, or ok:false if registration fails.
Unregisters a SceneGeometry.
The geometry to unregister.
SDKResult indicating success, or ok:false if unregistration fails.
Handles changes to a SceneMesh's color.
Forwards to the corresponding RendererMesh (if registered).
Handles changes to a SceneMesh's world matrix.
Forwards to the corresponding RendererMesh (if registered).
Handles changes to a SceneMesh's opacity.
Forwards to the corresponding RendererMesh (if registered).
Registers a newly created SceneModel.
The model to register.
SDKResult indicating success, or ok:false if a model with the same id
was already registered.
Unregisters a SceneModel.
The model to unregister.
SDKResult indicating success, or ok:false if the model was not registered.
This method currently does not iterate and destroy meshes belonging to the model. Mesh lifetime is managed via sceneObjectDestroyed and mesh removal paths.
Registers a newly created SceneObject.
Creates a RendererObject, expects that all its meshes are pre-registered and have RendererMesh instances registered on the owning SceneModel.
The object to register.
SDKResult indicating success, or ok:false if:
Unregisters a SceneObject.
Destroys the RendererObject and its associated RendererMesh instances on the owning model (if any).
The object to unregister.
SDKResult indicating success, or ok:false if the model or object is not registered.
Connects an existing SceneMesh to an existing SceneObject.
Disconnects an existing SceneMesh from an existing SceneObject. The mesh remains cached, but is no longer rendered as part of the object. To do that, we set the mesh as having an object visibility of false for all views.
Handles changes to a SceneTransform's matrix.
Handles changes to a ViewObject's colorize state.
Updates the per-view colorize flag on the owning RendererObject.
Handles changes to a ViewObject's highlighted state.
Updates the per-view highlighted flag on the owning RendererObject.
Handles changes to a ViewObject's opacity override.
Updates the per-view opacity value on the owning RendererObject.
Handles changes to a ViewObject's selected state.
Updates the per-view selected flag on the owning RendererObject.
Handles changes to a ViewObject's visibility.
Updates the per-view visibility flag on the owning RendererObject.
Handles changes to a ViewObject's x-ray state.
Updates the per-view x-ray flag on the owning RendererObject.
Bridges scene/view state changes into GPU-ready render state for the renderer.
Remarks
MeshManageris owned by a ViewManager, which manages all Views for a single Viewer (not one ViewManager per View).Architectural Role
MeshManageris owned by the ViewManager and manages all renderer objects and meshes for all views.MeshManagerensures that changes in the scene or any view are efficiently reflected in GPU state, supporting high-performance, multi-view rendering.