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.

ARKitCreateLabels #

Bases: Procedure[Map[String, PosedLabel]]

Produce an empty label map — a scene with nothing marked yet.

The load_or fallback for a scene's stored labels, the counterpart of ARKitCreateScene for ARKitCaptureSceneWithLabels.

Example
capture = cg.ARKitCaptureSceneWithLabels(
    initial_world_map=root.world_map.load_or(cg.ARKitCreateScene()),
    initial_labels=root.labels.load_or(cg.ARKitCreateLabels()),
)
Source code in capturegraph-lib/capturegraph/procedures/nodes/collection/arkit/scene.py
@make_procedure
class ARKitCreateLabels(Procedure[Map[String, PosedLabel]]):
    """Produce an empty label map — a scene with nothing marked yet.

    The ``load_or`` fallback for a scene's stored labels, the counterpart of
    ``ARKitCreateScene`` for ``ARKitCaptureSceneWithLabels``.

    Example:
        ```python
        capture = cg.ARKitCaptureSceneWithLabels(
            initial_world_map=root.world_map.load_or(cg.ARKitCreateScene()),
            initial_labels=root.labels.load_or(cg.ARKitCreateLabels()),
        )
        ```
    """

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()),
        )
        ```
    """