Skip to content

scene

scene #

Non-capture helpers for world-anchored ARKit scenes.

Non-capture helpers for world-anchored scenes: values a scene-capture procedure composes with, rather than data collected from the user.

ARKitCreateScene #

Bases: Procedure[ARWorldMap]

Produce the canonical empty ARWorldMap — a brand-new scene.

The value is an empty world-map file: ARKitCaptureScene recognizes it and starts tracking in a fresh coordinate frame instead of relocalizing. Use it as the load_or fallback when reading a scene's stored map, so the very first session of a scene is authorable without a special case; the sentinel itself is never stored — the capture node's own refreshed map is what gets cached back.

Example
capture = cg.ARKitCaptureScene(
    initial_world_map=root.world_map.load_or(cg.ARKitCreateScene()),
)
Source code in capturegraph-lib/capturegraph/procedures/nodes/collection/arkit/scene.py
@make_procedure
class ARKitCreateScene(Procedure[ARWorldMap]):
    """Produce the canonical empty ``ARWorldMap`` — a brand-new scene.

    The value is an empty world-map file: ``ARKitCaptureScene`` recognizes it and
    starts tracking in a fresh coordinate frame instead of relocalizing. Use it
    as the ``load_or`` fallback when reading a scene's stored map, so the very
    first session of a scene is authorable without a special case; the sentinel
    itself is never stored — the capture node's own refreshed map is what gets
    cached back.

    Example:
        ```python
        capture = cg.ARKitCaptureScene(
            initial_world_map=root.world_map.load_or(cg.ARKitCreateScene()),
        )
        ```
    """