The viewing.lod module selects authored SceneModel representations on a
per-view basis. It does not generate shell geometry or create SceneModel
content. Shells, impostors and other LOD representations are authored in
model.lod and stored in SceneRepSet
metadata.
LOD suppression is separate from ordinary application visibility. Renderers
combine both states while drawing:
Use RepresentationLODSelector to discover representation sets whose
selection metadata uses "projectedSize" and select one representation per
view.
Representation selection is also the fast path for switching visibility of
large object groups. Instead of rewriting ordinary object visibility for
every object in a representation, the viewer records the selected
representation per View and lets renderers suppress non-selected
representation memberships at batch or draw-list granularity.
The selector works with representation sets already present in loaded
SceneModels. Those sets can be authored offline, generated with
model.lod.createShellRep, or loaded from a
format such as XGF that preserves representation metadata.
Viewing LOD Representation Selection
The
viewing.lodmodule selects authored SceneModel representations on a per-view basis. It does not generate shell geometry or create SceneModel content. Shells, impostors and other LOD representations are authored inmodel.lodand stored in SceneRepSet metadata.LOD suppression is separate from ordinary application visibility. Renderers combine both states while drawing:
Use RepresentationLODSelector to discover representation sets whose selection metadata uses
"projectedSize"and select one representation per view.Representation selection is also the fast path for switching visibility of large object groups. Instead of rewriting ordinary object visibility for every object in a representation, the viewer records the selected representation per View and lets renderers suppress non-selected representation memberships at batch or draw-list granularity.
Runtime Shape
Basic Usage
The selector works with representation sets already present in loaded SceneModels. Those sets can be authored offline, generated with model.lod.createShellRep, or loaded from a format such as XGF that preserves representation metadata.
Create the selector after the Viewer exists:
The selector discovers eligible representation sets automatically. A set is eligible when its selection metadata uses the projected-size strategy:
After the set exists, camera and viewport changes update selection for each View. Applications normally do not need to call
updateView()manually.Loading a Model With Representations
For a model format that restores SceneModel representation sets, create the selector once and load the model normally:
Inspecting Selection
Use
getActiveRepId()when UI or diagnostics need to show what a View is currently using:getMode()returns:"default"when the set's default representation is selected,"selected"when another representation is selected,"invalid"when the set cannot currently be evaluated.Enable, Disable and Destroy
Disabling the selector clears only selector-owned representation suppression. It does not change ordinary object visibility:
Multiple Views
Selection state is per View. Two Views can show different representations of the same SceneModel at the same time: