Skip to content

Commit

Permalink
introduce invalid transform & deprecate disconnected space, add migra…
Browse files Browse the repository at this point in the history
…tion guide
  • Loading branch information
Wumpf committed Dec 13, 2024
1 parent 17d424e commit 1fdb533
Show file tree
Hide file tree
Showing 36 changed files with 487 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace rerun.archetypes;
///
/// \example archetypes/disconnected_space title="Disconnected space" image="https://static.rerun.io/disconnected_space/709041fc304b50c74db773b780e32294fe90c95f/1200w.png"
table DisconnectedSpace (
"attr.rerun.deprecated": "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead.",
"attr.rust.derive": "Copy, PartialEq, Eq",
"attr.docs.view_types": "Spatial2DView, Spatial3DView"
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ table Transform3D (
/// Specifies the relation this transform establishes between this entity and its parent.
relation: rerun.components.TransformRelation ("attr.rerun.component_optional", nullable, order: 1600);

/// Optionally flags the transform as invalid.
///
/// Specifies that the entity path at which this is logged is spatially disconnected from its parent,
/// making it impossible to transform the entity path into its parent's space and vice versa.
/// This can be useful for instance to express temporily unknown transforms.
///
/// By default all transforms are considered valid.
invalid: rerun.components.InvalidTransform ("attr.rerun.component_optional", nullable, order: 1700);

// --- visual representation

/// Visual length of the 3 axes.
Expand Down
1 change: 1 addition & 0 deletions crates/store/re_types/definitions/rerun/components.fbs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace rerun.components;
/// It *only* applies to views that work with spatial transformations, i.e. 2D & 3D views.
/// This is useful for specifying that a subgraph is independent of the rest of the scene.
struct DisconnectedSpace (
"attr.rerun.deprecated": "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead.",
"attr.python.aliases": "bool",
"attr.python.array_aliases": "bool, npt.NDArray[np.bool_]",
"attr.rust.derive": "Copy, PartialEq, Eq"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace rerun.components;

/// Flags the transform at its entity path as invalid.
///
/// Specifies that the entity path at which this is logged is spatially disconnected from its parent,
/// making it impossible to transform the entity path into its parent's space and vice versa.
/// This can be useful for instance to express temporily unknown transforms.
///
/// Note that by default all transforms are considered valid.
struct InvalidTransform (
"attr.python.aliases": "bool",
"attr.python.array_aliases": "bool, npt.NDArray[np.bool_]",
"attr.rust.derive": "Copy, PartialEq, Eq"
) {
/// Whether the entity path at which this is logged as an invalid transform to its parent.
invalid: rerun.datatypes.Bool (order: 100);
}
4 changes: 4 additions & 0 deletions crates/store/re_types/src/archetypes/disconnected_space.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion crates/store/re_types/src/archetypes/mod.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

63 changes: 59 additions & 4 deletions crates/store/re_types/src/archetypes/transform3d.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/store/re_types/src/components/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions crates/store/re_types/src/components/disconnected_space.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

113 changes: 113 additions & 0 deletions crates/store/re_types/src/components/invalid_transform.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1fdb533

Please sign in to comment.