rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.22k stars 287 forks source link

Split Transform3D component union type into components #6831

Closed Wumpf closed 1 month ago

Wumpf commented 2 months ago

Remaining todo items:


// Two possibilities:
// - Only legal to set one of them
// - Or apply them all in deterministic order
archetype Transform {
    mat4: Option<Mat4>,
    translation: Option<Translation3>,
    mat3: Option<Mat3>,
    rotation: Option<Rotation3D>,
    scale3: Option<Scale3D>,
    scale: Option<Scale>,
}

Old proposal

How to handle OutOfTreeTransform:

Introduce a new boolean component that coerces a transform batch to be out of tree. OutOfTreeTransform { enabled: bool } if one encounters several several parent transforms and if they have the OutOfTreeTransform == false the viewer issues a warning and resolves in a best effort manner

To consider: The fallback provider for OutOfTreeTransform can be clever and look at transform counts, automatically assuming true if there's several transforms.

Drawback: Can no longer have out of tree transform side by side with in-tree transforms

Wumpf commented 1 month ago

via discussion with @jleibs :