Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate DisconnectedSpace archetype/component in favor of implicit invalid transforms #8459

Merged
merged 13 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Wumpf marked this conversation as resolved.
Show resolved Hide resolved
///
/// 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 temporarily 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,18 @@
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 temporarily unknown transforms.
///
/// Note that by default all transforms are considered valid.
struct InvalidTransform (
"attr.docs.unreleased",
"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);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ namespace rerun.components;
///
/// Note: although the x,y,z,w components of the quaternion will be passed through to the
/// datastore as provided, when used in the Viewer, quaternions will always be normalized.
/// If normalization fails the rotation is silently ignored.
struct RotationQuat (
"attr.rust.derive": "Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable",
"attr.rust.repr": "transparent"
Expand All @@ -15,6 +16,7 @@ struct RotationQuat (
///
/// Note: although the x,y,z,w components of the quaternion will be passed through to the
/// datastore as provided, when used in the Viewer, quaternions will always be normalized.
/// If normalization fails the rotation is silently ignored.
struct PoseRotationQuat (
"attr.rust.derive": "Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable",
"attr.rust.repr": "transparent"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ table RotationAxisAngle (
/// Axis to rotate around.
///
/// This is not required to be normalized.
/// If normalization fails (typically because the vector is length zero), the rotation is silently
/// ignored.
/// If normalization fails (typically because the vector is length zero),
/// the rotation is silently ignored.
axis: rerun.datatypes.Vec3D (order: 100);

/// How much to rotate around the axis.
Expand Down
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.

Loading
Loading