Builds camera waypoint sequences for building walkthroughs.
The planner extracts spaces and portals, samples viewpoints,
orders them, then smooths the result into a CameraTour.
Inspired by Liu, Xu & Sun (2012),
"Automatic camera path planning for IFC building models"
(Automation in Construction).
Pipeline:
Extract spaces + door portals from the source
(default: IFC semantic walk over a paired DataModel).
Sample candidate viewpoints inside each space, scored
by visibility coverage.
Plan the tour order. The default starts with a greedy
nearest-neighbour pass and refines with 2-opt. Pass
planTourGreedy to skip refinement.
The planner returns data only. playCameraTour applies a tour to
a View's Camera, so tours can be planned server-side and loaded
with a model.
Source files are bucketed into graph/ (the space + viewpoint
graph types), plan/ (planning entry point + result/options
types), build/ (the smoothing leg), and play/ (playback
runtime). The strategy subdirs (extractors/, samplers/,
planners/) and internal/ are part of the same module. The
public symbols are re-exported from this barrel.
Usage
Three steps: plan, play, then drive the playback handle from UI.
Camera Tour Planner
Builds camera waypoint sequences for building walkthroughs. The planner extracts spaces and portals, samples viewpoints, orders them, then smooths the result into a CameraTour. Inspired by Liu, Xu & Sun (2012), "Automatic camera path planning for IFC building models" (Automation in Construction).
Pipeline:
planTourGreedyto skip refinement.The planner returns data only.
playCameraTourapplies a tour to a View's Camera, so tours can be planned server-side and loaded with a model.Source files are bucketed into
graph/(the space + viewpoint graph types),plan/(planning entry point + result/options types),build/(the smoothing leg), andplay/(playback runtime). The strategy subdirs (extractors/,samplers/,planners/) andinternal/are part of the same module. The public symbols are re-exported from this barrel.Usage
Three steps: plan, play, then drive the playback handle from UI.
1) Plan
Planning is data-only. The IFC space extractor is the default; pass
extractor: extractSpacesFromGeometryfor non-IFC sources.2) Play
Drives the View's Camera through the planned waypoints and returns a CameraTourPlayback handle for pause, seek, and disposal.
3) Drive
Wire the playback handle to the host UI.
Non-IFC sources
For glTF, OBJ, dotbim, or other sources without
IfcSpacemetadata, use the geometry-only extractor.