From 17d424ead7bd92c6a625f42a7cee6ee0b204ec4a Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 13 Dec 2024 17:49:07 +0100 Subject: [PATCH 01/13] fix/improve invalid rotation handling --- .../re_types/definitions/rerun/components/rotation_quat.fbs | 2 ++ .../definitions/rerun/datatypes/rotation_axis_angle.fbs | 4 ++-- crates/store/re_types/src/components/pose_rotation_quat.rs | 1 + crates/store/re_types/src/components/rotation_quat.rs | 1 + crates/store/re_types/src/datatypes/quaternion_ext.rs | 6 ++++-- crates/store/re_types/src/datatypes/rotation_axis_angle.rs | 4 ++-- crates/store/re_types/src/reflection/mod.rs | 4 ++-- .../reference/types/components/pose_rotation_quat.md | 1 + docs/content/reference/types/components/rotation_quat.md | 1 + .../reference/types/datatypes/rotation_axis_angle.md | 4 ++-- rerun_cpp/src/rerun/components/pose_rotation_quat.hpp | 1 + rerun_cpp/src/rerun/components/rotation_quat.hpp | 1 + rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp | 4 ++-- rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py | 1 + rerun_py/rerun_sdk/rerun/components/rotation_quat.py | 1 + rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py | 4 ++-- 16 files changed, 26 insertions(+), 14 deletions(-) diff --git a/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs b/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs index 3a8aed1a060e..9f05c86177f2 100644 --- a/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs +++ b/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs @@ -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" @@ -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" diff --git a/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs b/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs index 44dbdf33264e..4b0903dfaefb 100644 --- a/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs +++ b/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs @@ -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. diff --git a/crates/store/re_types/src/components/pose_rotation_quat.rs b/crates/store/re_types/src/components/pose_rotation_quat.rs index a4e69ae0b83a..061b7913d864 100644 --- a/crates/store/re_types/src/components/pose_rotation_quat.rs +++ b/crates/store/re_types/src/components/pose_rotation_quat.rs @@ -22,6 +22,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// 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. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] pub struct PoseRotationQuat(pub crate::datatypes::Quaternion); diff --git a/crates/store/re_types/src/components/rotation_quat.rs b/crates/store/re_types/src/components/rotation_quat.rs index 7d64f9639e4b..a6e83d74eea7 100644 --- a/crates/store/re_types/src/components/rotation_quat.rs +++ b/crates/store/re_types/src/components/rotation_quat.rs @@ -22,6 +22,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// 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. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] pub struct RotationQuat(pub crate::datatypes::Quaternion); diff --git a/crates/store/re_types/src/datatypes/quaternion_ext.rs b/crates/store/re_types/src/datatypes/quaternion_ext.rs index dad46cc4a411..602230ed523b 100644 --- a/crates/store/re_types/src/datatypes/quaternion_ext.rs +++ b/crates/store/re_types/src/datatypes/quaternion_ext.rs @@ -36,8 +36,10 @@ impl Quaternion { impl From for glam::Quat { #[inline] fn from(q: Quaternion) -> Self { - let [x, y, z, w] = q.0; - Self::from_xyzw(x, y, z, w).normalize() + let Some(normalized) = glam::Vec4::from(q.0).try_normalize() else { + return Self::IDENTITY; + }; + Self::from_vec4(normalized) } } diff --git a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs index aaec1778f856..29a5f4228fc9 100644 --- a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs @@ -24,8 +24,8 @@ pub struct 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. pub axis: crate::datatypes::Vec3D, /// How much to rotate around the axis. diff --git a/crates/store/re_types/src/reflection/mod.rs b/crates/store/re_types/src/reflection/mod.rs index 13a12e4af4fb..63d3d6179481 100644 --- a/crates/store/re_types/src/reflection/mod.rs +++ b/crates/store/re_types/src/reflection/mod.rs @@ -666,7 +666,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "A 3D rotation expressed as a quaternion that doesn't propagate in the transform hierarchy.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.", + docstring_md: "A 3D rotation expressed as a quaternion that doesn't propagate in the transform hierarchy.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is silently ignored.", custom_placeholder: Some(PoseRotationQuat::default().to_arrow2()?), datatype: PoseRotationQuat::arrow2_datatype(), }, @@ -754,7 +754,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "A 3D rotation expressed as a quaternion.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.", + docstring_md: "A 3D rotation expressed as a quaternion.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is silently ignored.", custom_placeholder: Some(RotationQuat::default().to_arrow2()?), datatype: RotationQuat::arrow2_datatype(), }, diff --git a/docs/content/reference/types/components/pose_rotation_quat.md b/docs/content/reference/types/components/pose_rotation_quat.md index 0d02625dbd23..c0626c2b9f1a 100644 --- a/docs/content/reference/types/components/pose_rotation_quat.md +++ b/docs/content/reference/types/components/pose_rotation_quat.md @@ -7,6 +7,7 @@ A 3D rotation expressed as a quaternion that doesn't propagate in the transform 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. ## Rerun datatype [`Quaternion`](../datatypes/quaternion.md) diff --git a/docs/content/reference/types/components/rotation_quat.md b/docs/content/reference/types/components/rotation_quat.md index 70898260508c..8bbbbce81b22 100644 --- a/docs/content/reference/types/components/rotation_quat.md +++ b/docs/content/reference/types/components/rotation_quat.md @@ -7,6 +7,7 @@ A 3D rotation expressed as a quaternion. 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. ## Rerun datatype [`Quaternion`](../datatypes/quaternion.md) diff --git a/docs/content/reference/types/datatypes/rotation_axis_angle.md b/docs/content/reference/types/datatypes/rotation_axis_angle.md index ef1e7521fad3..c84d84e81958 100644 --- a/docs/content/reference/types/datatypes/rotation_axis_angle.md +++ b/docs/content/reference/types/datatypes/rotation_axis_angle.md @@ -12,8 +12,8 @@ Type: [`Vec3D`](../datatypes/vec3d.md) 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. #### `angle` Type: [`Angle`](../datatypes/angle.md) diff --git a/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp b/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp index 0ea2f7946076..98637f680bf7 100644 --- a/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp +++ b/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp @@ -15,6 +15,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 PoseRotationQuat { rerun::datatypes::Quaternion quaternion; diff --git a/rerun_cpp/src/rerun/components/rotation_quat.hpp b/rerun_cpp/src/rerun/components/rotation_quat.hpp index 809a578f3e9b..365be7ec9fc2 100644 --- a/rerun_cpp/src/rerun/components/rotation_quat.hpp +++ b/rerun_cpp/src/rerun/components/rotation_quat.hpp @@ -15,6 +15,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 { rerun::datatypes::Quaternion quaternion; diff --git a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp index 4bf17018676f..e70c0d1ce738 100644 --- a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp +++ b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp @@ -23,8 +23,8 @@ namespace rerun::datatypes { /// 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. rerun::datatypes::Vec3D axis; /// How much to rotate around the axis. diff --git a/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py b/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py index 9f8bc782a7ae..30468eef8711 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py @@ -21,6 +21,7 @@ class PoseRotationQuat(datatypes.Quaternion, ComponentMixin): 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. """ _BATCH_TYPE = None diff --git a/rerun_py/rerun_sdk/rerun/components/rotation_quat.py b/rerun_py/rerun_sdk/rerun/components/rotation_quat.py index 78e49ae5c8b5..6cecc973c48f 100644 --- a/rerun_py/rerun_sdk/rerun/components/rotation_quat.py +++ b/rerun_py/rerun_sdk/rerun/components/rotation_quat.py @@ -21,6 +21,7 @@ class RotationQuat(datatypes.Quaternion, ComponentMixin): 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. """ _BATCH_TYPE = None diff --git a/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py index 2370610fd394..d63811ac1e3c 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py @@ -36,8 +36,8 @@ class RotationAxisAngle(RotationAxisAngleExt): # 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. # # (Docstring intentionally commented out to hide this field from the docs) From 1fdb53339ca7c601377302444b7517f0069c62a8 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 13 Dec 2024 17:57:02 +0100 Subject: [PATCH 02/13] introduce invalid transform & deprecate disconnected space, add migration guide --- .../rerun/archetypes/disconnected_space.fbs | 1 + .../rerun/archetypes/transform3d.fbs | 9 ++ .../re_types/definitions/rerun/components.fbs | 1 + .../rerun/components/disconnected_space.fbs | 1 + .../rerun/components/invalid_transform.fbs | 17 +++ .../src/archetypes/disconnected_space.rs | 4 + crates/store/re_types/src/archetypes/mod.rs | 4 +- .../re_types/src/archetypes/transform3d.rs | 63 +++++++++- .../re_types/src/components/.gitattributes | 1 + .../src/components/disconnected_space.rs | 4 + .../src/components/invalid_transform.rs | 113 ++++++++++++++++++ crates/store/re_types/src/components/mod.rs | 6 +- crates/store/re_types/src/reflection/mod.rs | 12 ++ .../reference/migration/migration-0-21.md | 11 ++ docs/content/reference/types/archetypes.md | 2 +- .../types/archetypes/disconnected_space.md | 5 +- .../reference/types/archetypes/transform3d.md | 2 +- docs/content/reference/types/components.md | 3 +- .../reference/types/components/.gitattributes | 1 + .../types/components/disconnected_space.md | 5 +- .../types/components/invalid_transform.md | 31 +++++ .../content/reference/types/datatypes/bool.md | 1 + .../rerun/archetypes/disconnected_space.cpp | 5 + .../rerun/archetypes/disconnected_space.hpp | 9 +- .../src/rerun/archetypes/transform3d.cpp | 14 ++- .../src/rerun/archetypes/transform3d.hpp | 23 ++++ rerun_cpp/src/rerun/components.hpp | 1 + rerun_cpp/src/rerun/components/.gitattributes | 1 + .../rerun/components/disconnected_space.hpp | 4 +- .../rerun/components/invalid_transform.hpp | 81 +++++++++++++ .../rerun/archetypes/disconnected_space.py | 2 + .../rerun_sdk/rerun/archetypes/transform3d.py | 16 +++ .../rerun_sdk/rerun/components/.gitattributes | 1 + .../rerun_sdk/rerun/components/__init__.py | 3 + .../rerun/components/disconnected_space.py | 3 + .../rerun/components/invalid_transform.py | 41 +++++++ 36 files changed, 487 insertions(+), 14 deletions(-) create mode 100644 crates/store/re_types/definitions/rerun/components/invalid_transform.fbs create mode 100644 crates/store/re_types/src/components/invalid_transform.rs create mode 100644 docs/content/reference/types/components/invalid_transform.md create mode 100644 rerun_cpp/src/rerun/components/invalid_transform.hpp create mode 100644 rerun_py/rerun_sdk/rerun/components/invalid_transform.py diff --git a/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs b/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs index e7b3ad037301..259f6934dd96 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs @@ -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" ) { diff --git a/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs b/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs index df0de1c10e2e..b64a42fd756e 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs @@ -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. diff --git a/crates/store/re_types/definitions/rerun/components.fbs b/crates/store/re_types/definitions/rerun/components.fbs index 4dc580313dc2..7b6a3d298c3d 100644 --- a/crates/store/re_types/definitions/rerun/components.fbs +++ b/crates/store/re_types/definitions/rerun/components.fbs @@ -25,6 +25,7 @@ include "./components/half_size3d.fbs"; include "./components/image_buffer.fbs"; include "./components/image_format.fbs"; include "./components/image_plane_distance.fbs"; +include "./components/invalid_transform.fbs"; include "./components/keypoint_id.fbs"; include "./components/latlon.fbs"; include "./components/length.fbs"; diff --git a/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs b/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs index 2aef729a83ae..7f7a00a4aa32 100644 --- a/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs +++ b/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs @@ -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" diff --git a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs new file mode 100644 index 000000000000..8228b652c493 --- /dev/null +++ b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs @@ -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); +} diff --git a/crates/store/re_types/src/archetypes/disconnected_space.rs b/crates/store/re_types/src/archetypes/disconnected_space.rs index 58d59fa1b79a..2c0ec4bca39f 100644 --- a/crates/store/re_types/src/archetypes/disconnected_space.rs +++ b/crates/store/re_types/src/archetypes/disconnected_space.rs @@ -11,6 +11,7 @@ #![allow(clippy::redundant_closure)] #![allow(clippy::too_many_arguments)] #![allow(clippy::too_many_lines)] +#![allow(deprecated)] use ::re_types_core::external::arrow2; use ::re_types_core::SerializationResult; @@ -62,6 +63,9 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// #[derive(Clone, Debug, Copy, PartialEq, Eq)] +#[deprecated( + note = "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." +)] pub struct DisconnectedSpace { /// Whether the entity path at which this is logged is disconnected from its parent. pub disconnected_space: crate::components::DisconnectedSpace, diff --git a/crates/store/re_types/src/archetypes/mod.rs b/crates/store/re_types/src/archetypes/mod.rs index 3bac64ce396e..2915cf90a60a 100644 --- a/crates/store/re_types/src/archetypes/mod.rs +++ b/crates/store/re_types/src/archetypes/mod.rs @@ -68,7 +68,6 @@ pub use self::boxes2d::Boxes2D; pub use self::boxes3d::Boxes3D; pub use self::capsules3d::Capsules3D; pub use self::depth_image::DepthImage; -pub use self::disconnected_space::DisconnectedSpace; pub use self::ellipsoids3d::Ellipsoids3D; pub use self::encoded_image::EncodedImage; pub use self::geo_line_strings::GeoLineStrings; @@ -93,3 +92,6 @@ pub use self::text_log::TextLog; pub use self::transform3d::Transform3D; pub use self::video_frame_reference::VideoFrameReference; pub use self::view_coordinates::ViewCoordinates; + +#[allow(deprecated)] +pub use self::disconnected_space::DisconnectedSpace; diff --git a/crates/store/re_types/src/archetypes/transform3d.rs b/crates/store/re_types/src/archetypes/transform3d.rs index 81eeef4990e0..135b904f91d4 100644 --- a/crates/store/re_types/src/archetypes/transform3d.rs +++ b/crates/store/re_types/src/archetypes/transform3d.rs @@ -186,6 +186,15 @@ pub struct Transform3D { /// Specifies the relation this transform establishes between this entity and its parent. pub relation: Option, + /// 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. + pub invalid: Option, + /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. @@ -205,7 +214,7 @@ static RECOMMENDED_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 1usiz }] }); -static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 7usize]> = +static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> = once_cell::sync::Lazy::new(|| { [ ComponentDescriptor { @@ -238,6 +247,11 @@ static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 7usize]> component_name: "rerun.components.TransformRelation".into(), archetype_field_name: Some("relation".into()), }, + ComponentDescriptor { + archetype_name: Some("rerun.archetypes.Transform3D".into()), + component_name: "rerun.components.InvalidTransform".into(), + archetype_field_name: Some("invalid".into()), + }, ComponentDescriptor { archetype_name: Some("rerun.archetypes.Transform3D".into()), component_name: "rerun.components.AxisLength".into(), @@ -246,7 +260,7 @@ static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 7usize]> ] }); -static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> = +static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 9usize]> = once_cell::sync::Lazy::new(|| { [ ComponentDescriptor { @@ -284,6 +298,11 @@ static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> = component_name: "rerun.components.TransformRelation".into(), archetype_field_name: Some("relation".into()), }, + ComponentDescriptor { + archetype_name: Some("rerun.archetypes.Transform3D".into()), + component_name: "rerun.components.InvalidTransform".into(), + archetype_field_name: Some("invalid".into()), + }, ComponentDescriptor { archetype_name: Some("rerun.archetypes.Transform3D".into()), component_name: "rerun.components.AxisLength".into(), @@ -293,8 +312,8 @@ static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> = }); impl Transform3D { - /// The total number of components in the archetype: 0 required, 1 recommended, 7 optional - pub const NUM_COMPONENTS: usize = 8usize; + /// The total number of components in the archetype: 0 required, 1 recommended, 8 optional + pub const NUM_COMPONENTS: usize = 9usize; } /// Indicator component for the [`Transform3D`] [`::re_types_core::Archetype`] @@ -406,6 +425,15 @@ impl ::re_types_core::Archetype for Transform3D { } else { None }; + let invalid = if let Some(array) = arrays_by_name.get("rerun.components.InvalidTransform") { + ::from_arrow2_opt(&**array) + .with_context("rerun.archetypes.Transform3D#invalid")? + .into_iter() + .next() + .flatten() + } else { + None + }; let axis_length = if let Some(array) = arrays_by_name.get("rerun.components.AxisLength") { ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#axis_length")? @@ -422,6 +450,7 @@ impl ::re_types_core::Archetype for Transform3D { scale, mat3x3, relation, + invalid, axis_length, }) } @@ -493,6 +522,16 @@ impl ::re_types_core::AsComponents for Transform3D { }), } }), + (Some(&self.invalid as &dyn ComponentBatch)).map(|batch| { + ::re_types_core::ComponentBatchCowWithDescriptor { + batch: batch.into(), + descriptor_override: Some(ComponentDescriptor { + archetype_name: Some("rerun.archetypes.Transform3D".into()), + archetype_field_name: Some(("invalid").into()), + component_name: ("rerun.components.InvalidTransform").into(), + }), + } + }), (Some(&self.axis_length as &dyn ComponentBatch)).map(|batch| { ::re_types_core::ComponentBatchCowWithDescriptor { batch: batch.into(), @@ -523,6 +562,7 @@ impl Transform3D { scale: None, mat3x3: None, relation: None, + invalid: None, axis_length: None, } } @@ -581,6 +621,19 @@ impl Transform3D { self } + /// 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. + #[inline] + pub fn with_invalid(mut self, invalid: impl Into) -> Self { + self.invalid = Some(invalid.into()); + self + } + /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. @@ -604,6 +657,7 @@ impl ::re_types_core::SizeBytes for Transform3D { + self.scale.heap_size_bytes() + self.mat3x3.heap_size_bytes() + self.relation.heap_size_bytes() + + self.invalid.heap_size_bytes() + self.axis_length.heap_size_bytes() } @@ -615,6 +669,7 @@ impl ::re_types_core::SizeBytes for Transform3D { && >::is_pod() && >::is_pod() && >::is_pod() + && >::is_pod() && >::is_pod() } } diff --git a/crates/store/re_types/src/components/.gitattributes b/crates/store/re_types/src/components/.gitattributes index 3cf54dbb31cb..cda69ef0f203 100644 --- a/crates/store/re_types/src/components/.gitattributes +++ b/crates/store/re_types/src/components/.gitattributes @@ -25,6 +25,7 @@ half_size3d.rs linguist-generated=true image_buffer.rs linguist-generated=true image_format.rs linguist-generated=true image_plane_distance.rs linguist-generated=true +invalid_transform.rs linguist-generated=true keypoint_id.rs linguist-generated=true lat_lon.rs linguist-generated=true length.rs linguist-generated=true diff --git a/crates/store/re_types/src/components/disconnected_space.rs b/crates/store/re_types/src/components/disconnected_space.rs index 0b890cf60318..cc9b25efc2ad 100644 --- a/crates/store/re_types/src/components/disconnected_space.rs +++ b/crates/store/re_types/src/components/disconnected_space.rs @@ -11,6 +11,7 @@ #![allow(clippy::redundant_closure)] #![allow(clippy::too_many_arguments)] #![allow(clippy::too_many_lines)] +#![allow(deprecated)] use ::re_types_core::external::arrow2; use ::re_types_core::SerializationResult; @@ -25,6 +26,9 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// 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. #[derive(Clone, Debug, Copy, PartialEq, Eq)] +#[deprecated( + note = "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." +)] pub struct DisconnectedSpace( /// Whether the entity path at which this is logged is disconnected from its parent. /// diff --git a/crates/store/re_types/src/components/invalid_transform.rs b/crates/store/re_types/src/components/invalid_transform.rs new file mode 100644 index 000000000000..4fa8e58bf4a1 --- /dev/null +++ b/crates/store/re_types/src/components/invalid_transform.rs @@ -0,0 +1,113 @@ +// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs +// Based on "crates/store/re_types/definitions/rerun/components/invalid_transform.fbs". + +#![allow(unused_imports)] +#![allow(unused_parens)] +#![allow(clippy::clone_on_copy)] +#![allow(clippy::cloned_instead_of_copied)] +#![allow(clippy::map_flatten)] +#![allow(clippy::needless_question_mark)] +#![allow(clippy::new_without_default)] +#![allow(clippy::redundant_closure)] +#![allow(clippy::too_many_arguments)] +#![allow(clippy::too_many_lines)] + +use ::re_types_core::external::arrow2; +use ::re_types_core::SerializationResult; +use ::re_types_core::{ComponentBatch, ComponentBatchCowWithDescriptor}; +use ::re_types_core::{ComponentDescriptor, ComponentName}; +use ::re_types_core::{DeserializationError, DeserializationResult}; + +/// **Component**: 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. +#[derive(Clone, Debug, Copy, PartialEq, Eq)] +pub struct InvalidTransform( + /// Whether the entity path at which this is logged as an invalid transform to its parent. + pub crate::datatypes::Bool, +); + +impl ::re_types_core::Component for InvalidTransform { + #[inline] + fn descriptor() -> ComponentDescriptor { + ComponentDescriptor::new("rerun.components.InvalidTransform") + } +} + +::re_types_core::macros::impl_into_cow!(InvalidTransform); + +impl ::re_types_core::Loggable for InvalidTransform { + #[inline] + fn arrow_datatype() -> arrow::datatypes::DataType { + crate::datatypes::Bool::arrow_datatype() + } + + fn to_arrow_opt<'a>( + data: impl IntoIterator>>>, + ) -> SerializationResult + where + Self: Clone + 'a, + { + crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { + datum.map(|datum| match datum.into() { + ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), + ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), + }) + })) + } + + fn from_arrow2_opt( + arrow_data: &dyn arrow2::array::Array, + ) -> DeserializationResult>> + where + Self: Sized, + { + crate::datatypes::Bool::from_arrow2_opt(arrow_data) + .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) + } +} + +impl> From for InvalidTransform { + fn from(v: T) -> Self { + Self(v.into()) + } +} + +impl std::borrow::Borrow for InvalidTransform { + #[inline] + fn borrow(&self) -> &crate::datatypes::Bool { + &self.0 + } +} + +impl std::ops::Deref for InvalidTransform { + type Target = crate::datatypes::Bool; + + #[inline] + fn deref(&self) -> &crate::datatypes::Bool { + &self.0 + } +} + +impl std::ops::DerefMut for InvalidTransform { + #[inline] + fn deref_mut(&mut self) -> &mut crate::datatypes::Bool { + &mut self.0 + } +} + +impl ::re_types_core::SizeBytes for InvalidTransform { + #[inline] + fn heap_size_bytes(&self) -> u64 { + self.0.heap_size_bytes() + } + + #[inline] + fn is_pod() -> bool { + ::is_pod() + } +} diff --git a/crates/store/re_types/src/components/mod.rs b/crates/store/re_types/src/components/mod.rs index c085b8954e44..d29279cd2c51 100644 --- a/crates/store/re_types/src/components/mod.rs +++ b/crates/store/re_types/src/components/mod.rs @@ -39,6 +39,7 @@ mod image_format; mod image_format_ext; mod image_plane_distance; mod image_plane_distance_ext; +mod invalid_transform; mod keypoint_id; mod keypoint_id_ext; mod lat_lon; @@ -136,7 +137,6 @@ pub use self::class_id::ClassId; pub use self::color::Color; pub use self::colormap::Colormap; pub use self::depth_meter::DepthMeter; -pub use self::disconnected_space::DisconnectedSpace; pub use self::draw_order::DrawOrder; pub use self::entity_path::EntityPath; pub use self::fill_mode::FillMode; @@ -151,6 +151,7 @@ pub use self::half_size3d::HalfSize3D; pub use self::image_buffer::ImageBuffer; pub use self::image_format::ImageFormat; pub use self::image_plane_distance::ImagePlaneDistance; +pub use self::invalid_transform::InvalidTransform; pub use self::keypoint_id::KeypointId; pub use self::lat_lon::LatLon; pub use self::length::Length; @@ -197,3 +198,6 @@ pub use self::vector2d::Vector2D; pub use self::vector3d::Vector3D; pub use self::video_timestamp::VideoTimestamp; pub use self::view_coordinates::ViewCoordinates; + +#[allow(deprecated)] +pub use self::disconnected_space::DisconnectedSpace; diff --git a/crates/store/re_types/src/reflection/mod.rs b/crates/store/re_types/src/reflection/mod.rs index 63d3d6179481..ed3e60033cca 100644 --- a/crates/store/re_types/src/reflection/mod.rs +++ b/crates/store/re_types/src/reflection/mod.rs @@ -551,6 +551,14 @@ fn generate_component_reflection() -> Result::name(), + ComponentReflection { + docstring_md: "Flags the transform at its entity path as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporily unknown transforms.\n\nNote that by default all transforms are considered valid.", + custom_placeholder: None, + datatype: InvalidTransform::arrow2_datatype(), + }, + ), ( ::name(), ComponentReflection { @@ -1900,6 +1908,10 @@ fn generate_archetype_reflection() -> ArchetypeReflectionMap { : "Relation", component_name : "rerun.components.TransformRelation" .into(), docstring_md : "Specifies the relation this transform establishes between this entity and its parent.", + is_required : false, }, ArchetypeFieldReflection { name : "invalid", + display_name : "Invalid", component_name : + "rerun.components.InvalidTransform".into(), docstring_md : + "Optionally flags the transform as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporily unknown transforms.\n\nBy default all transforms are considered valid.", is_required : false, }, ArchetypeFieldReflection { name : "axis_length", display_name : "Axis length", component_name : "rerun.components.AxisLength".into(), docstring_md : diff --git a/docs/content/reference/migration/migration-0-21.md b/docs/content/reference/migration/migration-0-21.md index 71f9397f22fa..1be5f68e73a9 100644 --- a/docs/content/reference/migration/migration-0-21.md +++ b/docs/content/reference/migration/migration-0-21.md @@ -65,3 +65,14 @@ Previously, the viewer would show 3 arrows for every logged transform if any of For many usecases this led to too many arrows being shown by default. We therefore removed the last condition - arrows will no longer show by default if they're the only visualizer. The easiest way to opt-in to transform arrows is to set `AxisLength` (`axis_length` field on the `Transform3D` archetype) on your transforms. + +### `DisconnectedSpace` archetype/component deprecated in favor of `InvalidTransform` + +The `DisconnectedSpace` archetype and `DisconnectedSpace` component have been deprecated in favor of the `InvalidTransform` component which is part of the `Transform3D` component. + +Previously, the `DisconnectedSpace` archetype played a double role by governing view spawn heuristics & being used as a transform placeholder. +This caused a lot of complexity and often broke or caused confusion (see https://github.com/rerun-io/rerun/issues/6817, https://github.com/rerun-io/rerun/issues/4465, https://github.com/rerun-io/rerun/issues/4221). +By now, explicit blueprints offer a better way to express which views should be spawned and what content they should query. +(you can learn more about blueprints [here](https://rerun.io/docs/getting-started/configure-the-viewer/through-code-tutorial)). + +`DisconnectedSpace` will be removed in a future release. diff --git a/docs/content/reference/types/archetypes.md b/docs/content/reference/types/archetypes.md index 4b6f07b9b037..5176d0a479a3 100644 --- a/docs/content/reference/types/archetypes.md +++ b/docs/content/reference/types/archetypes.md @@ -73,5 +73,5 @@ This page lists all built-in archetypes. * [`AnnotationContext`](archetypes/annotation_context.md): The annotation context provides additional information on how to display entities. * [`Clear`](archetypes/clear.md): Empties all the components of an entity. -* [`DisconnectedSpace`](archetypes/disconnected_space.md): Spatially disconnect this entity from its parent. +* ⚠️ _deprecated_ [`DisconnectedSpace`](archetypes/disconnected_space.md): Spatially disconnect this entity from its parent. diff --git a/docs/content/reference/types/archetypes/disconnected_space.md b/docs/content/reference/types/archetypes/disconnected_space.md index 752465188940..b8cf66a9c945 100644 --- a/docs/content/reference/types/archetypes/disconnected_space.md +++ b/docs/content/reference/types/archetypes/disconnected_space.md @@ -1,8 +1,11 @@ --- -title: "DisconnectedSpace" +title: "DisconnectedSpace (deprecated)" --- +**⚠️ This type is deprecated and may be removed in future versions** +Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead. + Spatially disconnect this entity from its parent. Specifies that the entity path at which this is logged is spatially disconnected from its parent, diff --git a/docs/content/reference/types/archetypes/transform3d.md b/docs/content/reference/types/archetypes/transform3d.md index 8d63c1681cdd..2cc39785d4d1 100644 --- a/docs/content/reference/types/archetypes/transform3d.md +++ b/docs/content/reference/types/archetypes/transform3d.md @@ -18,7 +18,7 @@ For transforms that affect only a single entity and do not propagate along the e ## Components -**Optional**: [`Translation3D`](../components/translation3d.md), [`RotationAxisAngle`](../components/rotation_axis_angle.md), [`RotationQuat`](../components/rotation_quat.md), [`Scale3D`](../components/scale3d.md), [`TransformMat3x3`](../components/transform_mat3x3.md), [`TransformRelation`](../components/transform_relation.md), [`AxisLength`](../components/axis_length.md) +**Optional**: [`Translation3D`](../components/translation3d.md), [`RotationAxisAngle`](../components/rotation_axis_angle.md), [`RotationQuat`](../components/rotation_quat.md), [`Scale3D`](../components/scale3d.md), [`TransformMat3x3`](../components/transform_mat3x3.md), [`TransformRelation`](../components/transform_relation.md), [`InvalidTransform`](../components/invalid_transform.md), [`AxisLength`](../components/axis_length.md) ## Shown in * [Spatial3DView](../views/spatial3d_view.md) diff --git a/docs/content/reference/types/components.md b/docs/content/reference/types/components.md index c9be262b0fde..c087e9b5509b 100644 --- a/docs/content/reference/types/components.md +++ b/docs/content/reference/types/components.md @@ -23,7 +23,7 @@ on [Entities and Components](../../concepts/entity-component.md). * [`Color`](components/color.md): An RGBA color with unmultiplied/separate alpha, in sRGB gamma space with linear alpha. * [`Colormap`](components/colormap.md): Colormap for mapping scalar values within a given range to a color. * [`DepthMeter`](components/depth_meter.md): The world->depth map scaling factor. -* [`DisconnectedSpace`](components/disconnected_space.md): Spatially disconnect this entity from its parent. +* ⚠️ _deprecated_ [`DisconnectedSpace`](components/disconnected_space.md): Spatially disconnect this entity from its parent. * [`DrawOrder`](components/draw_order.md): Draw order of 2D elements. Higher values are drawn on top of lower values. * [`EntityPath`](components/entity_path.md): A path to an entity, usually to reference some data that is part of the target entity. * [`FillMode`](components/fill_mode.md): How a geometric shape is drawn and colored. @@ -38,6 +38,7 @@ on [Entities and Components](../../concepts/entity-component.md). * [`ImageBuffer`](components/image_buffer.md): A buffer that is known to store image data. * [`ImageFormat`](components/image_format.md): The metadata describing the contents of a [`components.ImageBuffer`](https://rerun.io/docs/reference/types/components/image_buffer). * [`ImagePlaneDistance`](components/image_plane_distance.md): The distance from the camera origin to the image plane when the projection is shown in a 3D viewer. +* [`InvalidTransform`](components/invalid_transform.md): Flags the transform at its entity path as invalid. * [`KeypointId`](components/keypoint_id.md): A 16-bit ID representing a type of semantic keypoint within a class. * [`LatLon`](components/lat_lon.md): A geospatial position expressed in [EPSG:4326](https://epsg.io/4326) latitude and longitude (North/East-positive degrees). * [`Length`](components/length.md): Length, or one-dimensional size. diff --git a/docs/content/reference/types/components/.gitattributes b/docs/content/reference/types/components/.gitattributes index ecb4df1c74f1..f75b0b17a4ba 100644 --- a/docs/content/reference/types/components/.gitattributes +++ b/docs/content/reference/types/components/.gitattributes @@ -26,6 +26,7 @@ half_size3d.md linguist-generated=true image_buffer.md linguist-generated=true image_format.md linguist-generated=true image_plane_distance.md linguist-generated=true +invalid_transform.md linguist-generated=true keypoint_id.md linguist-generated=true lat_lon.md linguist-generated=true length.md linguist-generated=true diff --git a/docs/content/reference/types/components/disconnected_space.md b/docs/content/reference/types/components/disconnected_space.md index fd9447abb871..e171962746c2 100644 --- a/docs/content/reference/types/components/disconnected_space.md +++ b/docs/content/reference/types/components/disconnected_space.md @@ -1,8 +1,11 @@ --- -title: "DisconnectedSpace" +title: "DisconnectedSpace (deprecated)" --- +**⚠️ This type is deprecated and may be removed in future versions** +Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead. + Spatially disconnect this entity from its parent. Specifies that the entity path at which this is logged is spatially disconnected from its parent, diff --git a/docs/content/reference/types/components/invalid_transform.md b/docs/content/reference/types/components/invalid_transform.md new file mode 100644 index 000000000000..5dc9e2b54d9c --- /dev/null +++ b/docs/content/reference/types/components/invalid_transform.md @@ -0,0 +1,31 @@ +--- +title: "InvalidTransform" +--- + + +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. + +## Rerun datatype +[`Bool`](../datatypes/bool.md) + + +## Arrow datatype +``` +boolean +``` + +## API reference links + * 🌊 [C++ API docs for `InvalidTransform`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1components_1_1InvalidTransform.html) + * 🐍 [Python API docs for `InvalidTransform`](https://ref.rerun.io/docs/python/stable/common/components#rerun.components.InvalidTransform) + * 🦀 [Rust API docs for `InvalidTransform`](https://docs.rs/rerun/latest/rerun/components/struct.InvalidTransform.html) + + +## Used by + +* [`Transform3D`](../archetypes/transform3d.md) diff --git a/docs/content/reference/types/datatypes/bool.md b/docs/content/reference/types/datatypes/bool.md index 4ee2740a5ed3..2f9dcd728ab6 100644 --- a/docs/content/reference/types/datatypes/bool.md +++ b/docs/content/reference/types/datatypes/bool.md @@ -21,4 +21,5 @@ boolean * [`ClearIsRecursive`](../components/clear_is_recursive.md) * [`DisconnectedSpace`](../components/disconnected_space.md) +* [`InvalidTransform`](../components/invalid_transform.md) * [`ShowLabels`](../components/show_labels.md) diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp index 3e811827419f..4c1ca31b8df6 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp @@ -5,6 +5,9 @@ #include "../collection_adapter_builtins.hpp" +RR_PUSH_WARNINGS +RR_DISABLE_DEPRECATION_WARNING + namespace rerun::archetypes {} namespace rerun { @@ -38,3 +41,5 @@ namespace rerun { return cells; } } // namespace rerun + +RR_POP_WARNINGS diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp index 298fe3c31c7f..aeec794912e1 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp @@ -4,6 +4,7 @@ #pragma once #include "../collection.hpp" +#include "../compiler_utils.hpp" #include "../component_batch.hpp" #include "../components/disconnected_space.hpp" #include "../indicator_component.hpp" @@ -42,7 +43,9 @@ namespace rerun::archetypes { /// rec.log("world/wormhole/point", rerun::Points3D({{2.0f, 2.0f, 2.0f}})); /// } /// ``` - struct DisconnectedSpace { + struct [[deprecated( + "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." + )]] DisconnectedSpace { /// Whether the entity path at which this is logged is disconnected from its parent. rerun::components::DisconnectedSpace disconnected_space; @@ -67,6 +70,8 @@ namespace rerun { /// \private template struct AsComponents; + RR_PUSH_WARNINGS + RR_DISABLE_DEPRECATION_WARNING /// \private template <> @@ -76,4 +81,6 @@ namespace rerun { const archetypes::DisconnectedSpace& archetype ); }; + + RR_POP_WARNINGS } // namespace rerun diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.cpp b/rerun_cpp/src/rerun/archetypes/transform3d.cpp index d75e3b616af6..f69183e3668e 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.cpp @@ -14,7 +14,7 @@ namespace rerun { ) { using namespace archetypes; std::vector cells; - cells.reserve(8); + cells.reserve(9); { auto result = ComponentBatch::from_loggable( @@ -88,6 +88,18 @@ namespace rerun { RR_RETURN_NOT_OK(result.error); cells.push_back(std::move(result.value)); } + { + auto result = ComponentBatch::from_loggable( + archetype.invalid, + ComponentDescriptor( + "rerun.archetypes.Transform3D", + "invalid", + "rerun.components.InvalidTransform" + ) + ); + RR_RETURN_NOT_OK(result.error); + cells.push_back(std::move(result.value)); + } { auto result = ComponentBatch::from_loggable( archetype.axis_length, diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.hpp b/rerun_cpp/src/rerun/archetypes/transform3d.hpp index 7ced69fb7342..45219641b02d 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.hpp @@ -7,6 +7,7 @@ #include "../compiler_utils.hpp" #include "../component_batch.hpp" #include "../components/axis_length.hpp" +#include "../components/invalid_transform.hpp" #include "../components/rotation_axis_angle.hpp" #include "../components/rotation_quat.hpp" #include "../components/scale3d.hpp" @@ -169,6 +170,15 @@ namespace rerun::archetypes { /// Specifies the relation this transform establishes between this entity and its parent. std::optional relation; + /// 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. + std::optional invalid; + /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. @@ -560,6 +570,19 @@ namespace rerun::archetypes { RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);) } + /// 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. + Transform3D with_invalid(rerun::components::InvalidTransform _invalid) && { + invalid = std::move(_invalid); + // See: https://github.com/rerun-io/rerun/issues/4027 + RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);) + } + /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. diff --git a/rerun_cpp/src/rerun/components.hpp b/rerun_cpp/src/rerun/components.hpp index 17ff34250df4..d4db2f6e5f68 100644 --- a/rerun_cpp/src/rerun/components.hpp +++ b/rerun_cpp/src/rerun/components.hpp @@ -27,6 +27,7 @@ #include "components/image_buffer.hpp" #include "components/image_format.hpp" #include "components/image_plane_distance.hpp" +#include "components/invalid_transform.hpp" #include "components/keypoint_id.hpp" #include "components/lat_lon.hpp" #include "components/length.hpp" diff --git a/rerun_cpp/src/rerun/components/.gitattributes b/rerun_cpp/src/rerun/components/.gitattributes index 57a1800528b7..e06df9f6df58 100644 --- a/rerun_cpp/src/rerun/components/.gitattributes +++ b/rerun_cpp/src/rerun/components/.gitattributes @@ -32,6 +32,7 @@ half_size3d.hpp linguist-generated=true image_buffer.hpp linguist-generated=true image_format.hpp linguist-generated=true image_plane_distance.hpp linguist-generated=true +invalid_transform.hpp linguist-generated=true keypoint_id.hpp linguist-generated=true lat_lon.hpp linguist-generated=true length.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/components/disconnected_space.hpp b/rerun_cpp/src/rerun/components/disconnected_space.hpp index 24dd0ee0d89f..0eb765bf5a1a 100644 --- a/rerun_cpp/src/rerun/components/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/components/disconnected_space.hpp @@ -17,7 +17,9 @@ namespace rerun::components { /// making it impossible to transform the entity path into its parent's space and vice versa. /// 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 { + struct [[deprecated( + "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." + )]] DisconnectedSpace { /// Whether the entity path at which this is logged is disconnected from its parent. /// /// Set to true to disconnect the entity from its parent. diff --git a/rerun_cpp/src/rerun/components/invalid_transform.hpp b/rerun_cpp/src/rerun/components/invalid_transform.hpp new file mode 100644 index 000000000000..84f2e2795f4d --- /dev/null +++ b/rerun_cpp/src/rerun/components/invalid_transform.hpp @@ -0,0 +1,81 @@ +// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs +// Based on "crates/store/re_types/definitions/rerun/components/invalid_transform.fbs". + +#pragma once + +#include "../component_descriptor.hpp" +#include "../datatypes/bool.hpp" +#include "../result.hpp" + +#include +#include + +namespace rerun::components { + /// **Component**: 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 { + /// Whether the entity path at which this is logged as an invalid transform to its parent. + rerun::datatypes::Bool invalid; + + public: + InvalidTransform() = default; + + InvalidTransform(rerun::datatypes::Bool invalid_) : invalid(invalid_) {} + + InvalidTransform& operator=(rerun::datatypes::Bool invalid_) { + invalid = invalid_; + return *this; + } + + InvalidTransform(bool value_) : invalid(value_) {} + + InvalidTransform& operator=(bool value_) { + invalid = value_; + return *this; + } + + /// Cast to the underlying Bool datatype + operator rerun::datatypes::Bool() const { + return invalid; + } + }; +} // namespace rerun::components + +namespace rerun { + static_assert(sizeof(rerun::datatypes::Bool) == sizeof(components::InvalidTransform)); + + /// \private + template <> + struct Loggable { + static constexpr ComponentDescriptor Descriptor = "rerun.components.InvalidTransform"; + + /// Returns the arrow data type this type corresponds to. + static const std::shared_ptr& arrow_datatype() { + return Loggable::arrow_datatype(); + } + + /// Serializes an array of `rerun::components::InvalidTransform` into an arrow array. + static Result> to_arrow( + const components::InvalidTransform* instances, size_t num_instances + ) { + if (num_instances == 0) { + return Loggable::to_arrow(nullptr, 0); + } else if (instances == nullptr) { + return rerun::Error( + ErrorCode::UnexpectedNullArgument, + "Passed array instances is null when num_elements> 0." + ); + } else { + return Loggable::to_arrow( + &instances->invalid, + num_instances + ); + } + } + }; +} // namespace rerun diff --git a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py index bbac1df347ea..e900f3c1887d 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py @@ -6,6 +6,7 @@ from __future__ import annotations from attrs import define, field +from typing_extensions import deprecated # type: ignore[misc, unused-ignore] from .. import components from .._baseclasses import ( @@ -16,6 +17,7 @@ __all__ = ["DisconnectedSpace"] +@deprecated("""Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead.""") @define(str=False, repr=False, init=False) class DisconnectedSpace(DisconnectedSpaceExt, Archetype): """ diff --git a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py index b2c8e2daa166..455cc8bfcb05 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py @@ -146,6 +146,7 @@ def __attrs_clear__(self) -> None: scale=None, # type: ignore[arg-type] mat3x3=None, # type: ignore[arg-type] relation=None, # type: ignore[arg-type] + invalid=None, # type: ignore[arg-type] axis_length=None, # type: ignore[arg-type] ) @@ -210,6 +211,21 @@ def _clear(cls) -> Transform3D: # # (Docstring intentionally commented out to hide this field from the docs) + invalid: components.InvalidTransformBatch | None = field( + metadata={"component": "optional"}, + default=None, + converter=components.InvalidTransformBatch._required, # type: ignore[misc] + ) + # 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. + # + # (Docstring intentionally commented out to hide this field from the docs) + axis_length: components.AxisLengthBatch | None = field( metadata={"component": "optional"}, default=None, diff --git a/rerun_py/rerun_sdk/rerun/components/.gitattributes b/rerun_py/rerun_sdk/rerun/components/.gitattributes index bc78f211dc27..b80afd72fa3f 100644 --- a/rerun_py/rerun_sdk/rerun/components/.gitattributes +++ b/rerun_py/rerun_sdk/rerun/components/.gitattributes @@ -27,6 +27,7 @@ half_size3d.py linguist-generated=true image_buffer.py linguist-generated=true image_format.py linguist-generated=true image_plane_distance.py linguist-generated=true +invalid_transform.py linguist-generated=true keypoint_id.py linguist-generated=true lat_lon.py linguist-generated=true length.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/components/__init__.py b/rerun_py/rerun_sdk/rerun/components/__init__.py index 1bc230a70e79..664765d32d3a 100644 --- a/rerun_py/rerun_sdk/rerun/components/__init__.py +++ b/rerun_py/rerun_sdk/rerun/components/__init__.py @@ -37,6 +37,7 @@ from .image_buffer import ImageBuffer, ImageBufferBatch from .image_format import ImageFormat, ImageFormatBatch from .image_plane_distance import ImagePlaneDistance, ImagePlaneDistanceBatch +from .invalid_transform import InvalidTransform, InvalidTransformBatch from .keypoint_id import KeypointId, KeypointIdBatch from .lat_lon import LatLon, LatLonBatch from .length import Length, LengthBatch @@ -157,6 +158,8 @@ "ImageFormatBatch", "ImagePlaneDistance", "ImagePlaneDistanceBatch", + "InvalidTransform", + "InvalidTransformBatch", "KeypointId", "KeypointIdBatch", "LatLon", diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py index 4ca00a3af3c0..85464f14ef55 100644 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py @@ -5,6 +5,8 @@ from __future__ import annotations +from typing_extensions import deprecated # type: ignore[misc, unused-ignore] + from .. import datatypes from .._baseclasses import ( ComponentBatchMixin, @@ -16,6 +18,7 @@ __all__ = ["DisconnectedSpace", "DisconnectedSpaceBatch"] +@deprecated("""Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead.""") class DisconnectedSpace(DisconnectedSpaceExt, datatypes.Bool, ComponentMixin): """ **Component**: Spatially disconnect this entity from its parent. diff --git a/rerun_py/rerun_sdk/rerun/components/invalid_transform.py b/rerun_py/rerun_sdk/rerun/components/invalid_transform.py new file mode 100644 index 000000000000..1903c733e4b8 --- /dev/null +++ b/rerun_py/rerun_sdk/rerun/components/invalid_transform.py @@ -0,0 +1,41 @@ +# DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs +# Based on "crates/store/re_types/definitions/rerun/components/invalid_transform.fbs". + +# You can extend this class by creating a "InvalidTransformExt" class in "invalid_transform_ext.py". + +from __future__ import annotations + +from .. import datatypes +from .._baseclasses import ( + ComponentBatchMixin, + ComponentDescriptor, + ComponentMixin, +) + +__all__ = ["InvalidTransform", "InvalidTransformBatch"] + + +class InvalidTransform(datatypes.Bool, ComponentMixin): + """ + **Component**: 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. + """ + + _BATCH_TYPE = None + # You can define your own __init__ function as a member of InvalidTransformExt in invalid_transform_ext.py + + # Note: there are no fields here because InvalidTransform delegates to datatypes.Bool + pass + + +class InvalidTransformBatch(datatypes.BoolBatch, ComponentBatchMixin): + _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.InvalidTransform") + + +# This is patched in late to avoid circular dependencies. +InvalidTransform._BATCH_TYPE = InvalidTransformBatch # type: ignore[assignment] From e7dce0a330717b6f7afeec60336eab5e6667d7c3 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 13 Dec 2024 18:02:43 +0100 Subject: [PATCH 03/13] fix typos --- .../re_types/definitions/rerun/archetypes/transform3d.fbs | 2 +- .../definitions/rerun/components/invalid_transform.fbs | 2 +- crates/store/re_types/src/archetypes/transform3d.rs | 4 ++-- crates/store/re_types/src/components/invalid_transform.rs | 2 +- crates/store/re_types/src/reflection/mod.rs | 4 ++-- docs/content/reference/types/components/invalid_transform.md | 2 +- rerun_cpp/src/rerun/archetypes/transform3d.hpp | 4 ++-- rerun_cpp/src/rerun/components/invalid_transform.hpp | 2 +- rerun_py/rerun_sdk/rerun/archetypes/transform3d.py | 2 +- rerun_py/rerun_sdk/rerun/components/invalid_transform.py | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs b/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs index b64a42fd756e..783b482b454b 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs @@ -44,7 +44,7 @@ table Transform3D ( /// /// 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. + /// 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); diff --git a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs index 8228b652c493..f8dd9a35962c 100644 --- a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs +++ b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs @@ -4,7 +4,7 @@ namespace rerun.components; /// /// 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. +/// This can be useful for instance to express temporarily unknown transforms. /// /// Note that by default all transforms are considered valid. struct InvalidTransform ( diff --git a/crates/store/re_types/src/archetypes/transform3d.rs b/crates/store/re_types/src/archetypes/transform3d.rs index 135b904f91d4..c073ad4234d7 100644 --- a/crates/store/re_types/src/archetypes/transform3d.rs +++ b/crates/store/re_types/src/archetypes/transform3d.rs @@ -190,7 +190,7 @@ pub struct Transform3D { /// /// 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. + /// This can be useful for instance to express temporarily unknown transforms. /// /// By default all transforms are considered valid. pub invalid: Option, @@ -625,7 +625,7 @@ impl Transform3D { /// /// 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. + /// This can be useful for instance to express temporarily unknown transforms. /// /// By default all transforms are considered valid. #[inline] diff --git a/crates/store/re_types/src/components/invalid_transform.rs b/crates/store/re_types/src/components/invalid_transform.rs index 4fa8e58bf4a1..9212a08f341b 100644 --- a/crates/store/re_types/src/components/invalid_transform.rs +++ b/crates/store/re_types/src/components/invalid_transform.rs @@ -22,7 +22,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// 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. +/// This can be useful for instance to express temporarily unknown transforms. /// /// Note that by default all transforms are considered valid. #[derive(Clone, Debug, Copy, PartialEq, Eq)] diff --git a/crates/store/re_types/src/reflection/mod.rs b/crates/store/re_types/src/reflection/mod.rs index ed3e60033cca..1daeb324d940 100644 --- a/crates/store/re_types/src/reflection/mod.rs +++ b/crates/store/re_types/src/reflection/mod.rs @@ -554,7 +554,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "Flags the transform at its entity path as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporily unknown transforms.\n\nNote that by default all transforms are considered valid.", + docstring_md: "Flags the transform at its entity path as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporarily unknown transforms.\n\nNote that by default all transforms are considered valid.", custom_placeholder: None, datatype: InvalidTransform::arrow2_datatype(), }, @@ -1911,7 +1911,7 @@ fn generate_archetype_reflection() -> ArchetypeReflectionMap { is_required : false, }, ArchetypeFieldReflection { name : "invalid", display_name : "Invalid", component_name : "rerun.components.InvalidTransform".into(), docstring_md : - "Optionally flags the transform as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporily unknown transforms.\n\nBy default all transforms are considered valid.", + "Optionally flags the transform as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporarily unknown transforms.\n\nBy default all transforms are considered valid.", is_required : false, }, ArchetypeFieldReflection { name : "axis_length", display_name : "Axis length", component_name : "rerun.components.AxisLength".into(), docstring_md : diff --git a/docs/content/reference/types/components/invalid_transform.md b/docs/content/reference/types/components/invalid_transform.md index 5dc9e2b54d9c..81af0134929c 100644 --- a/docs/content/reference/types/components/invalid_transform.md +++ b/docs/content/reference/types/components/invalid_transform.md @@ -7,7 +7,7 @@ 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. +This can be useful for instance to express temporarily unknown transforms. Note that by default all transforms are considered valid. diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.hpp b/rerun_cpp/src/rerun/archetypes/transform3d.hpp index 45219641b02d..678c50fec4af 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.hpp @@ -174,7 +174,7 @@ namespace rerun::archetypes { /// /// 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. + /// This can be useful for instance to express temporarily unknown transforms. /// /// By default all transforms are considered valid. std::optional invalid; @@ -574,7 +574,7 @@ namespace rerun::archetypes { /// /// 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. + /// This can be useful for instance to express temporarily unknown transforms. /// /// By default all transforms are considered valid. Transform3D with_invalid(rerun::components::InvalidTransform _invalid) && { diff --git a/rerun_cpp/src/rerun/components/invalid_transform.hpp b/rerun_cpp/src/rerun/components/invalid_transform.hpp index 84f2e2795f4d..f73355924054 100644 --- a/rerun_cpp/src/rerun/components/invalid_transform.hpp +++ b/rerun_cpp/src/rerun/components/invalid_transform.hpp @@ -15,7 +15,7 @@ namespace rerun::components { /// /// 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. + /// This can be useful for instance to express temporarily unknown transforms. /// /// Note that by default all transforms are considered valid. struct InvalidTransform { diff --git a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py index 455cc8bfcb05..96a62cc79da1 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py @@ -220,7 +220,7 @@ def _clear(cls) -> Transform3D: # # 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. + # This can be useful for instance to express temporarily unknown transforms. # # By default all transforms are considered valid. # diff --git a/rerun_py/rerun_sdk/rerun/components/invalid_transform.py b/rerun_py/rerun_sdk/rerun/components/invalid_transform.py index 1903c733e4b8..a2dd5361dd68 100644 --- a/rerun_py/rerun_sdk/rerun/components/invalid_transform.py +++ b/rerun_py/rerun_sdk/rerun/components/invalid_transform.py @@ -21,7 +21,7 @@ class InvalidTransform(datatypes.Bool, ComponentMixin): 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. + This can be useful for instance to express temporarily unknown transforms. Note that by default all transforms are considered valid. """ From e580ed1f2f3e5d122c5998dc85928e2bd1238878 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 13 Dec 2024 18:03:06 +0100 Subject: [PATCH 04/13] missing unreleased tag --- .../definitions/rerun/components/invalid_transform.fbs | 1 + .../content/reference/types/components/invalid_transform.md | 6 +++--- docs/content/reference/types/datatypes/bool.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs index f8dd9a35962c..09ec540bce1e 100644 --- a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs +++ b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs @@ -8,6 +8,7 @@ namespace rerun.components; /// /// 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" diff --git a/docs/content/reference/types/components/invalid_transform.md b/docs/content/reference/types/components/invalid_transform.md index 81af0134929c..ba78bdee59ac 100644 --- a/docs/content/reference/types/components/invalid_transform.md +++ b/docs/content/reference/types/components/invalid_transform.md @@ -21,9 +21,9 @@ boolean ``` ## API reference links - * 🌊 [C++ API docs for `InvalidTransform`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1components_1_1InvalidTransform.html) - * 🐍 [Python API docs for `InvalidTransform`](https://ref.rerun.io/docs/python/stable/common/components#rerun.components.InvalidTransform) - * 🦀 [Rust API docs for `InvalidTransform`](https://docs.rs/rerun/latest/rerun/components/struct.InvalidTransform.html) + * 🌊 [C++ API docs for `InvalidTransform`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1components_1_1InvalidTransform.html?speculative-link) + * 🐍 [Python API docs for `InvalidTransform`](https://ref.rerun.io/docs/python/stable/common/components?speculative-link#rerun.components.InvalidTransform) + * 🦀 [Rust API docs for `InvalidTransform`](https://docs.rs/rerun/latest/rerun/components/struct.InvalidTransform.html?speculative-link) ## Used by diff --git a/docs/content/reference/types/datatypes/bool.md b/docs/content/reference/types/datatypes/bool.md index 2f9dcd728ab6..9575a0ee943f 100644 --- a/docs/content/reference/types/datatypes/bool.md +++ b/docs/content/reference/types/datatypes/bool.md @@ -21,5 +21,5 @@ boolean * [`ClearIsRecursive`](../components/clear_is_recursive.md) * [`DisconnectedSpace`](../components/disconnected_space.md) -* [`InvalidTransform`](../components/invalid_transform.md) +* [`InvalidTransform`](../components/invalid_transform.md?speculative-link) * [`ShowLabels`](../components/show_labels.md) From a2e37dea48ccd08fd65f7401586555e7581af8bd Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 17:02:17 +0100 Subject: [PATCH 05/13] remove invalid transform again and change docs to indicate that any invalid transform component has the same effect --- .../rerun/archetypes/disconnected_space.fbs | 2 +- .../rerun/archetypes/transform3d.fbs | 9 ---- .../re_types/definitions/rerun/components.fbs | 1 - .../rerun/components/disconnected_space.fbs | 2 +- .../rerun/components/invalid_transform.fbs | 18 -------- .../rerun/components/rotation_axis_angle.fbs | 4 ++ .../rerun/components/rotation_quat.fbs | 4 +- .../rerun/datatypes/rotation_axis_angle.fbs | 4 +- .../reference/migration/migration-0-21.md | 16 ++++++-- .../types/archetypes/disconnected_space.md | 2 +- .../reference/types/archetypes/transform3d.md | 2 +- docs/content/reference/types/components.md | 1 - .../reference/types/components/.gitattributes | 1 - .../types/components/disconnected_space.md | 2 +- .../types/components/invalid_transform.md | 31 -------------- .../components/pose_rotation_axis_angle.md | 2 + .../types/components/pose_rotation_quat.md | 2 +- .../types/components/rotation_axis_angle.md | 2 + .../types/components/rotation_quat.md | 2 +- .../content/reference/types/datatypes/bool.md | 1 - .../types/datatypes/rotation_axis_angle.md | 4 +- .../rerun/archetypes/disconnected_space.py | 2 +- .../rerun_sdk/rerun/archetypes/transform3d.py | 16 -------- .../rerun_sdk/rerun/components/.gitattributes | 1 - .../rerun_sdk/rerun/components/__init__.py | 3 -- .../rerun/components/disconnected_space.py | 2 +- .../rerun/components/invalid_transform.py | 41 ------------------- .../components/pose_rotation_axis_angle.py | 6 ++- .../rerun/components/pose_rotation_quat.py | 2 +- .../rerun/components/rotation_axis_angle.py | 6 ++- .../rerun/components/rotation_quat.py | 2 +- .../rerun/datatypes/rotation_axis_angle.py | 4 +- 32 files changed, 50 insertions(+), 147 deletions(-) delete mode 100644 crates/store/re_types/definitions/rerun/components/invalid_transform.fbs delete mode 100644 docs/content/reference/types/components/invalid_transform.md delete mode 100644 rerun_py/rerun_sdk/rerun/components/invalid_transform.py diff --git a/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs b/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs index 259f6934dd96..319658c4c319 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs @@ -9,7 +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.rerun.deprecated": "Use [archetypes.Transform3D] with an invalid transform instead", "attr.rust.derive": "Copy, PartialEq, Eq", "attr.docs.view_types": "Spatial2DView, Spatial3DView" ) { diff --git a/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs b/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs index 783b482b454b..df0de1c10e2e 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs @@ -40,15 +40,6 @@ 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 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. diff --git a/crates/store/re_types/definitions/rerun/components.fbs b/crates/store/re_types/definitions/rerun/components.fbs index 7b6a3d298c3d..4dc580313dc2 100644 --- a/crates/store/re_types/definitions/rerun/components.fbs +++ b/crates/store/re_types/definitions/rerun/components.fbs @@ -25,7 +25,6 @@ include "./components/half_size3d.fbs"; include "./components/image_buffer.fbs"; include "./components/image_format.fbs"; include "./components/image_plane_distance.fbs"; -include "./components/invalid_transform.fbs"; include "./components/keypoint_id.fbs"; include "./components/latlon.fbs"; include "./components/length.fbs"; diff --git a/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs b/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs index 7f7a00a4aa32..900ed7a3b4b7 100644 --- a/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs +++ b/crates/store/re_types/definitions/rerun/components/disconnected_space.fbs @@ -10,7 +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.rerun.deprecated": "Use [archetypes.Transform3D] with an invalid transform instead.", "attr.python.aliases": "bool", "attr.python.array_aliases": "bool, npt.NDArray[np.bool_]", "attr.rust.derive": "Copy, PartialEq, Eq" diff --git a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs b/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs deleted file mode 100644 index 09ec540bce1e..000000000000 --- a/crates/store/re_types/definitions/rerun/components/invalid_transform.fbs +++ /dev/null @@ -1,18 +0,0 @@ -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); -} diff --git a/crates/store/re_types/definitions/rerun/components/rotation_axis_angle.fbs b/crates/store/re_types/definitions/rerun/components/rotation_axis_angle.fbs index 8036eb79d2e8..2b0b5c0d2a17 100644 --- a/crates/store/re_types/definitions/rerun/components/rotation_axis_angle.fbs +++ b/crates/store/re_types/definitions/rerun/components/rotation_axis_angle.fbs @@ -1,6 +1,8 @@ namespace rerun.components; /// 3D rotation represented by a rotation around a given axis. +/// +/// If normalization of the rotation axis fails the rotation is treated as an invalid transform. table RotationAxisAngle ( "attr.rust.derive": "Default, Copy, PartialEq", "attr.rust.repr": "transparent" @@ -9,6 +11,8 @@ table RotationAxisAngle ( } /// 3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy. +/// +/// If normalization of the rotation axis fails the rotation is treated as an invalid transform. table PoseRotationAxisAngle ( "attr.rust.derive": "Default, Copy, PartialEq", "attr.rust.repr": "transparent" diff --git a/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs b/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs index 9f05c86177f2..be3b711662c0 100644 --- a/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs +++ b/crates/store/re_types/definitions/rerun/components/rotation_quat.fbs @@ -4,7 +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. +/// If normalization fails the rotation is treated as an invalid transform. struct RotationQuat ( "attr.rust.derive": "Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable", "attr.rust.repr": "transparent" @@ -16,7 +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. +/// If normalization fails the rotation is treated as an invalid transform. struct PoseRotationQuat ( "attr.rust.derive": "Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable", "attr.rust.repr": "transparent" diff --git a/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs b/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs index 4b0903dfaefb..aeb64292324c 100644 --- a/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs +++ b/crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs @@ -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. + /// However, if normalization of the rotation axis fails (typically due to a zero vector) + /// the rotation is treated as an invalid transform. axis: rerun.datatypes.Vec3D (order: 100); /// How much to rotate around the axis. diff --git a/docs/content/reference/migration/migration-0-21.md b/docs/content/reference/migration/migration-0-21.md index 1be5f68e73a9..15c149d369f1 100644 --- a/docs/content/reference/migration/migration-0-21.md +++ b/docs/content/reference/migration/migration-0-21.md @@ -66,13 +66,23 @@ For many usecases this led to too many arrows being shown by default. We therefore removed the last condition - arrows will no longer show by default if they're the only visualizer. The easiest way to opt-in to transform arrows is to set `AxisLength` (`axis_length` field on the `Transform3D` archetype) on your transforms. -### `DisconnectedSpace` archetype/component deprecated in favor of `InvalidTransform` +### `DisconnectedSpace` archetype/component deprecated -The `DisconnectedSpace` archetype and `DisconnectedSpace` component have been deprecated in favor of the `InvalidTransform` component which is part of the `Transform3D` component. +The `DisconnectedSpace` archetype and `DisconnectedSpace` component have been deprecated. +To achieve the same effect, you can log any of the following "invalid" transforms: +* zeroed 3x3 matrix +* zero scale +* zeroed quaternion +* zero axis on axis-angle rotation Previously, the `DisconnectedSpace` archetype played a double role by governing view spawn heuristics & being used as a transform placeholder. -This caused a lot of complexity and often broke or caused confusion (see https://github.com/rerun-io/rerun/issues/6817, https://github.com/rerun-io/rerun/issues/4465, https://github.com/rerun-io/rerun/issues/4221). +This led to a lot of complexity and often broke or caused confusion (see https://github.com/rerun-io/rerun/issues/6817, https://github.com/rerun-io/rerun/issues/4465, https://github.com/rerun-io/rerun/issues/4221). By now, explicit blueprints offer a better way to express which views should be spawned and what content they should query. (you can learn more about blueprints [here](https://rerun.io/docs/getting-started/configure-the-viewer/through-code-tutorial)). `DisconnectedSpace` will be removed in a future release. + +### `RotationAxisAngle` with zero rotation axis is no longer treated as identity + +Previously, `RotationAxisAngle` with a zero rotation axis was treated as identity. +This is no longer the case, instead it makes the transform invalid in the same way a zeroed transformation matrix does. diff --git a/docs/content/reference/types/archetypes/disconnected_space.md b/docs/content/reference/types/archetypes/disconnected_space.md index b8cf66a9c945..2362dfeb4f6d 100644 --- a/docs/content/reference/types/archetypes/disconnected_space.md +++ b/docs/content/reference/types/archetypes/disconnected_space.md @@ -4,7 +4,7 @@ title: "DisconnectedSpace (deprecated)" **⚠️ This type is deprecated and may be removed in future versions** -Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead. +Use [archetypes.Transform3D] with an invalid transform instead Spatially disconnect this entity from its parent. diff --git a/docs/content/reference/types/archetypes/transform3d.md b/docs/content/reference/types/archetypes/transform3d.md index 2cc39785d4d1..8d63c1681cdd 100644 --- a/docs/content/reference/types/archetypes/transform3d.md +++ b/docs/content/reference/types/archetypes/transform3d.md @@ -18,7 +18,7 @@ For transforms that affect only a single entity and do not propagate along the e ## Components -**Optional**: [`Translation3D`](../components/translation3d.md), [`RotationAxisAngle`](../components/rotation_axis_angle.md), [`RotationQuat`](../components/rotation_quat.md), [`Scale3D`](../components/scale3d.md), [`TransformMat3x3`](../components/transform_mat3x3.md), [`TransformRelation`](../components/transform_relation.md), [`InvalidTransform`](../components/invalid_transform.md), [`AxisLength`](../components/axis_length.md) +**Optional**: [`Translation3D`](../components/translation3d.md), [`RotationAxisAngle`](../components/rotation_axis_angle.md), [`RotationQuat`](../components/rotation_quat.md), [`Scale3D`](../components/scale3d.md), [`TransformMat3x3`](../components/transform_mat3x3.md), [`TransformRelation`](../components/transform_relation.md), [`AxisLength`](../components/axis_length.md) ## Shown in * [Spatial3DView](../views/spatial3d_view.md) diff --git a/docs/content/reference/types/components.md b/docs/content/reference/types/components.md index c087e9b5509b..0ebd0863ab0c 100644 --- a/docs/content/reference/types/components.md +++ b/docs/content/reference/types/components.md @@ -38,7 +38,6 @@ on [Entities and Components](../../concepts/entity-component.md). * [`ImageBuffer`](components/image_buffer.md): A buffer that is known to store image data. * [`ImageFormat`](components/image_format.md): The metadata describing the contents of a [`components.ImageBuffer`](https://rerun.io/docs/reference/types/components/image_buffer). * [`ImagePlaneDistance`](components/image_plane_distance.md): The distance from the camera origin to the image plane when the projection is shown in a 3D viewer. -* [`InvalidTransform`](components/invalid_transform.md): Flags the transform at its entity path as invalid. * [`KeypointId`](components/keypoint_id.md): A 16-bit ID representing a type of semantic keypoint within a class. * [`LatLon`](components/lat_lon.md): A geospatial position expressed in [EPSG:4326](https://epsg.io/4326) latitude and longitude (North/East-positive degrees). * [`Length`](components/length.md): Length, or one-dimensional size. diff --git a/docs/content/reference/types/components/.gitattributes b/docs/content/reference/types/components/.gitattributes index f75b0b17a4ba..ecb4df1c74f1 100644 --- a/docs/content/reference/types/components/.gitattributes +++ b/docs/content/reference/types/components/.gitattributes @@ -26,7 +26,6 @@ half_size3d.md linguist-generated=true image_buffer.md linguist-generated=true image_format.md linguist-generated=true image_plane_distance.md linguist-generated=true -invalid_transform.md linguist-generated=true keypoint_id.md linguist-generated=true lat_lon.md linguist-generated=true length.md linguist-generated=true diff --git a/docs/content/reference/types/components/disconnected_space.md b/docs/content/reference/types/components/disconnected_space.md index e171962746c2..3fbb0ac3f060 100644 --- a/docs/content/reference/types/components/disconnected_space.md +++ b/docs/content/reference/types/components/disconnected_space.md @@ -4,7 +4,7 @@ title: "DisconnectedSpace (deprecated)" **⚠️ This type is deprecated and may be removed in future versions** -Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead. +Use [archetypes.Transform3D] with an invalid transform instead. Spatially disconnect this entity from its parent. diff --git a/docs/content/reference/types/components/invalid_transform.md b/docs/content/reference/types/components/invalid_transform.md deleted file mode 100644 index ba78bdee59ac..000000000000 --- a/docs/content/reference/types/components/invalid_transform.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -title: "InvalidTransform" ---- - - -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. - -## Rerun datatype -[`Bool`](../datatypes/bool.md) - - -## Arrow datatype -``` -boolean -``` - -## API reference links - * 🌊 [C++ API docs for `InvalidTransform`](https://ref.rerun.io/docs/cpp/stable/structrerun_1_1components_1_1InvalidTransform.html?speculative-link) - * 🐍 [Python API docs for `InvalidTransform`](https://ref.rerun.io/docs/python/stable/common/components?speculative-link#rerun.components.InvalidTransform) - * 🦀 [Rust API docs for `InvalidTransform`](https://docs.rs/rerun/latest/rerun/components/struct.InvalidTransform.html?speculative-link) - - -## Used by - -* [`Transform3D`](../archetypes/transform3d.md) diff --git a/docs/content/reference/types/components/pose_rotation_axis_angle.md b/docs/content/reference/types/components/pose_rotation_axis_angle.md index 6361b6f08b1e..fcb951eb7e23 100644 --- a/docs/content/reference/types/components/pose_rotation_axis_angle.md +++ b/docs/content/reference/types/components/pose_rotation_axis_angle.md @@ -5,6 +5,8 @@ title: "PoseRotationAxisAngle" 3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy. +If normalization of the rotation axis fails the rotation is treated as an invalid transform. + ## Rerun datatype [`RotationAxisAngle`](../datatypes/rotation_axis_angle.md) diff --git a/docs/content/reference/types/components/pose_rotation_quat.md b/docs/content/reference/types/components/pose_rotation_quat.md index c0626c2b9f1a..a994e7710507 100644 --- a/docs/content/reference/types/components/pose_rotation_quat.md +++ b/docs/content/reference/types/components/pose_rotation_quat.md @@ -7,7 +7,7 @@ A 3D rotation expressed as a quaternion that doesn't propagate in the transform 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. +If normalization fails the rotation is treated as an invalid transform. ## Rerun datatype [`Quaternion`](../datatypes/quaternion.md) diff --git a/docs/content/reference/types/components/rotation_axis_angle.md b/docs/content/reference/types/components/rotation_axis_angle.md index 134b6f59da59..fff45fe16a41 100644 --- a/docs/content/reference/types/components/rotation_axis_angle.md +++ b/docs/content/reference/types/components/rotation_axis_angle.md @@ -5,6 +5,8 @@ title: "RotationAxisAngle" 3D rotation represented by a rotation around a given axis. +If normalization of the rotation axis fails the rotation is treated as an invalid transform. + ## Rerun datatype [`RotationAxisAngle`](../datatypes/rotation_axis_angle.md) diff --git a/docs/content/reference/types/components/rotation_quat.md b/docs/content/reference/types/components/rotation_quat.md index 8bbbbce81b22..80cb2ff1e3a4 100644 --- a/docs/content/reference/types/components/rotation_quat.md +++ b/docs/content/reference/types/components/rotation_quat.md @@ -7,7 +7,7 @@ A 3D rotation expressed as a quaternion. 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. +If normalization fails the rotation is treated as an invalid transform. ## Rerun datatype [`Quaternion`](../datatypes/quaternion.md) diff --git a/docs/content/reference/types/datatypes/bool.md b/docs/content/reference/types/datatypes/bool.md index 9575a0ee943f..4ee2740a5ed3 100644 --- a/docs/content/reference/types/datatypes/bool.md +++ b/docs/content/reference/types/datatypes/bool.md @@ -21,5 +21,4 @@ boolean * [`ClearIsRecursive`](../components/clear_is_recursive.md) * [`DisconnectedSpace`](../components/disconnected_space.md) -* [`InvalidTransform`](../components/invalid_transform.md?speculative-link) * [`ShowLabels`](../components/show_labels.md) diff --git a/docs/content/reference/types/datatypes/rotation_axis_angle.md b/docs/content/reference/types/datatypes/rotation_axis_angle.md index c84d84e81958..546b31e89067 100644 --- a/docs/content/reference/types/datatypes/rotation_axis_angle.md +++ b/docs/content/reference/types/datatypes/rotation_axis_angle.md @@ -12,8 +12,8 @@ Type: [`Vec3D`](../datatypes/vec3d.md) 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. +However, if normalization of the rotation axis fails (typically due to a zero vector) +the rotation is treated as an invalid transform. #### `angle` Type: [`Angle`](../datatypes/angle.md) diff --git a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py index e900f3c1887d..4ea38aaf153c 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/disconnected_space.py @@ -17,7 +17,7 @@ __all__ = ["DisconnectedSpace"] -@deprecated("""Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead.""") +@deprecated("""Use [archetypes.Transform3D] with an invalid transform instead""") @define(str=False, repr=False, init=False) class DisconnectedSpace(DisconnectedSpaceExt, Archetype): """ diff --git a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py index 96a62cc79da1..b2c8e2daa166 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/transform3d.py @@ -146,7 +146,6 @@ def __attrs_clear__(self) -> None: scale=None, # type: ignore[arg-type] mat3x3=None, # type: ignore[arg-type] relation=None, # type: ignore[arg-type] - invalid=None, # type: ignore[arg-type] axis_length=None, # type: ignore[arg-type] ) @@ -211,21 +210,6 @@ def _clear(cls) -> Transform3D: # # (Docstring intentionally commented out to hide this field from the docs) - invalid: components.InvalidTransformBatch | None = field( - metadata={"component": "optional"}, - default=None, - converter=components.InvalidTransformBatch._required, # type: ignore[misc] - ) - # 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 temporarily unknown transforms. - # - # By default all transforms are considered valid. - # - # (Docstring intentionally commented out to hide this field from the docs) - axis_length: components.AxisLengthBatch | None = field( metadata={"component": "optional"}, default=None, diff --git a/rerun_py/rerun_sdk/rerun/components/.gitattributes b/rerun_py/rerun_sdk/rerun/components/.gitattributes index b80afd72fa3f..bc78f211dc27 100644 --- a/rerun_py/rerun_sdk/rerun/components/.gitattributes +++ b/rerun_py/rerun_sdk/rerun/components/.gitattributes @@ -27,7 +27,6 @@ half_size3d.py linguist-generated=true image_buffer.py linguist-generated=true image_format.py linguist-generated=true image_plane_distance.py linguist-generated=true -invalid_transform.py linguist-generated=true keypoint_id.py linguist-generated=true lat_lon.py linguist-generated=true length.py linguist-generated=true diff --git a/rerun_py/rerun_sdk/rerun/components/__init__.py b/rerun_py/rerun_sdk/rerun/components/__init__.py index 664765d32d3a..1bc230a70e79 100644 --- a/rerun_py/rerun_sdk/rerun/components/__init__.py +++ b/rerun_py/rerun_sdk/rerun/components/__init__.py @@ -37,7 +37,6 @@ from .image_buffer import ImageBuffer, ImageBufferBatch from .image_format import ImageFormat, ImageFormatBatch from .image_plane_distance import ImagePlaneDistance, ImagePlaneDistanceBatch -from .invalid_transform import InvalidTransform, InvalidTransformBatch from .keypoint_id import KeypointId, KeypointIdBatch from .lat_lon import LatLon, LatLonBatch from .length import Length, LengthBatch @@ -158,8 +157,6 @@ "ImageFormatBatch", "ImagePlaneDistance", "ImagePlaneDistanceBatch", - "InvalidTransform", - "InvalidTransformBatch", "KeypointId", "KeypointIdBatch", "LatLon", diff --git a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py index 85464f14ef55..40b9886d8c45 100644 --- a/rerun_py/rerun_sdk/rerun/components/disconnected_space.py +++ b/rerun_py/rerun_sdk/rerun/components/disconnected_space.py @@ -18,7 +18,7 @@ __all__ = ["DisconnectedSpace", "DisconnectedSpaceBatch"] -@deprecated("""Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead.""") +@deprecated("""Use [archetypes.Transform3D] with an invalid transform instead.""") class DisconnectedSpace(DisconnectedSpaceExt, datatypes.Bool, ComponentMixin): """ **Component**: Spatially disconnect this entity from its parent. diff --git a/rerun_py/rerun_sdk/rerun/components/invalid_transform.py b/rerun_py/rerun_sdk/rerun/components/invalid_transform.py deleted file mode 100644 index a2dd5361dd68..000000000000 --- a/rerun_py/rerun_sdk/rerun/components/invalid_transform.py +++ /dev/null @@ -1,41 +0,0 @@ -# DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs -# Based on "crates/store/re_types/definitions/rerun/components/invalid_transform.fbs". - -# You can extend this class by creating a "InvalidTransformExt" class in "invalid_transform_ext.py". - -from __future__ import annotations - -from .. import datatypes -from .._baseclasses import ( - ComponentBatchMixin, - ComponentDescriptor, - ComponentMixin, -) - -__all__ = ["InvalidTransform", "InvalidTransformBatch"] - - -class InvalidTransform(datatypes.Bool, ComponentMixin): - """ - **Component**: 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. - """ - - _BATCH_TYPE = None - # You can define your own __init__ function as a member of InvalidTransformExt in invalid_transform_ext.py - - # Note: there are no fields here because InvalidTransform delegates to datatypes.Bool - pass - - -class InvalidTransformBatch(datatypes.BoolBatch, ComponentBatchMixin): - _COMPONENT_DESCRIPTOR: ComponentDescriptor = ComponentDescriptor("rerun.components.InvalidTransform") - - -# This is patched in late to avoid circular dependencies. -InvalidTransform._BATCH_TYPE = InvalidTransformBatch # type: ignore[assignment] diff --git a/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py index a424304836bd..c90afcab6fa7 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_rotation_axis_angle.py @@ -16,7 +16,11 @@ class PoseRotationAxisAngle(datatypes.RotationAxisAngle, ComponentMixin): - """**Component**: 3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy.""" + """ + **Component**: 3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy. + + If normalization of the rotation axis fails the rotation is treated as an invalid transform. + """ _BATCH_TYPE = None # You can define your own __init__ function as a member of PoseRotationAxisAngleExt in pose_rotation_axis_angle_ext.py diff --git a/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py b/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py index 30468eef8711..4a5dedd372dc 100644 --- a/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py +++ b/rerun_py/rerun_sdk/rerun/components/pose_rotation_quat.py @@ -21,7 +21,7 @@ class PoseRotationQuat(datatypes.Quaternion, ComponentMixin): 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. + If normalization fails the rotation is treated as an invalid transform. """ _BATCH_TYPE = None diff --git a/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py index 81dfeacd37a0..8d357a3cfc03 100644 --- a/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/components/rotation_axis_angle.py @@ -16,7 +16,11 @@ class RotationAxisAngle(datatypes.RotationAxisAngle, ComponentMixin): - """**Component**: 3D rotation represented by a rotation around a given axis.""" + """ + **Component**: 3D rotation represented by a rotation around a given axis. + + If normalization of the rotation axis fails the rotation is treated as an invalid transform. + """ _BATCH_TYPE = None # You can define your own __init__ function as a member of RotationAxisAngleExt in rotation_axis_angle_ext.py diff --git a/rerun_py/rerun_sdk/rerun/components/rotation_quat.py b/rerun_py/rerun_sdk/rerun/components/rotation_quat.py index 6cecc973c48f..a0ce5b014e94 100644 --- a/rerun_py/rerun_sdk/rerun/components/rotation_quat.py +++ b/rerun_py/rerun_sdk/rerun/components/rotation_quat.py @@ -21,7 +21,7 @@ class RotationQuat(datatypes.Quaternion, ComponentMixin): 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. + If normalization fails the rotation is treated as an invalid transform. """ _BATCH_TYPE = None diff --git a/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py b/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py index d63811ac1e3c..d1e87b29dbe4 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/rotation_axis_angle.py @@ -36,8 +36,8 @@ class RotationAxisAngle(RotationAxisAngleExt): # 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. + # However, if normalization of the rotation axis fails (typically due to a zero vector) + # the rotation is treated as an invalid transform. # # (Docstring intentionally commented out to hide this field from the docs) From cc322dd975ef51b45a98496406ba65e94acf1391 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 17:44:16 +0100 Subject: [PATCH 06/13] various fixups, added new invalid transform constants --- .../src/codegen/rust/reflection.rs | 1 + .../src/archetypes/disconnected_space.rs | 4 +- .../re_types/src/archetypes/transform3d.rs | 63 +--------- .../re_types/src/components/.gitattributes | 1 - .../src/components/disconnected_space.rs | 4 +- .../src/components/disconnected_space_ext.rs | 2 + .../src/components/invalid_transform.rs | 113 ------------------ crates/store/re_types/src/components/mod.rs | 2 - .../components/pose_rotation_axis_angle.rs | 2 + .../pose_rotation_axis_angle_ext.rs | 16 +-- .../src/components/pose_rotation_quat.rs | 2 +- .../src/components/pose_rotation_quat_ext.rs | 14 ++- .../src/components/rotation_axis_angle.rs | 2 + .../src/components/rotation_axis_angle_ext.rs | 16 +-- .../re_types/src/components/rotation_quat.rs | 2 +- .../src/components/rotation_quat_ext.rs | 11 +- .../re_types/src/datatypes/quaternion_ext.rs | 17 ++- .../src/datatypes/rotation_axis_angle.rs | 4 +- .../src/datatypes/rotation_axis_angle_ext.rs | 14 ++- crates/store/re_types/src/reflection/mod.rs | 22 +--- .../tests/types/disconnected_space.rs | 2 + .../src/contexts/transform_context.rs | 53 ++++++-- .../re_view_spatial/src/spatial_topology.rs | 3 + .../src/transform_component_tracker.rs | 2 + .../rerun/archetypes/disconnected_space.hpp | 3 +- .../src/rerun/archetypes/transform3d.cpp | 14 +-- .../src/rerun/archetypes/transform3d.hpp | 28 +---- .../src/rerun/archetypes/transform3d_ext.cpp | 15 +++ rerun_cpp/src/rerun/components.hpp | 1 - rerun_cpp/src/rerun/components/.gitattributes | 1 - .../rerun/components/disconnected_space.hpp | 3 +- .../rerun/components/invalid_transform.hpp | 81 ------------- .../components/pose_rotation_axis_angle.hpp | 2 + .../rerun/components/pose_rotation_quat.hpp | 2 +- rerun_cpp/src/rerun/components/resolution.hpp | 2 - .../src/rerun/components/resolution_ext.cpp | 2 - .../rerun/components/rotation_axis_angle.hpp | 2 + .../src/rerun/components/rotation_quat.hpp | 2 +- rerun_cpp/src/rerun/datatypes/mat3x3.hpp | 1 + rerun_cpp/src/rerun/datatypes/mat3x3_ext.cpp | 7 ++ rerun_cpp/src/rerun/datatypes/quaternion.hpp | 1 + .../src/rerun/datatypes/quaternion_ext.cpp | 2 + .../rerun/datatypes/rotation_axis_angle.hpp | 4 +- .../rerun/datatypes/quaternion_ext.py | 6 + .../roundtrips/disconnected_space/src/main.rs | 4 + 45 files changed, 179 insertions(+), 376 deletions(-) delete mode 100644 crates/store/re_types/src/components/invalid_transform.rs delete mode 100644 rerun_cpp/src/rerun/components/invalid_transform.hpp diff --git a/crates/build/re_types_builder/src/codegen/rust/reflection.rs b/crates/build/re_types_builder/src/codegen/rust/reflection.rs index 4ab765164698..d347ba243cfb 100644 --- a/crates/build/re_types_builder/src/codegen/rust/reflection.rs +++ b/crates/build/re_types_builder/src/codegen/rust/reflection.rs @@ -156,6 +156,7 @@ fn generate_component_reflection( #[doc = "Generates reflection about all known components."] #[doc = ""] #[doc = "Call only once and reuse the results."] + #[allow(deprecated)] fn generate_component_reflection() -> Result { re_tracing::profile_function!(); let array = [ diff --git a/crates/store/re_types/src/archetypes/disconnected_space.rs b/crates/store/re_types/src/archetypes/disconnected_space.rs index 2c0ec4bca39f..4bdef89b1be8 100644 --- a/crates/store/re_types/src/archetypes/disconnected_space.rs +++ b/crates/store/re_types/src/archetypes/disconnected_space.rs @@ -63,9 +63,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// #[derive(Clone, Debug, Copy, PartialEq, Eq)] -#[deprecated( - note = "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." -)] +#[deprecated(note = "Use [archetypes.Transform3D] with an invalid transform instead")] pub struct DisconnectedSpace { /// Whether the entity path at which this is logged is disconnected from its parent. pub disconnected_space: crate::components::DisconnectedSpace, diff --git a/crates/store/re_types/src/archetypes/transform3d.rs b/crates/store/re_types/src/archetypes/transform3d.rs index c073ad4234d7..81eeef4990e0 100644 --- a/crates/store/re_types/src/archetypes/transform3d.rs +++ b/crates/store/re_types/src/archetypes/transform3d.rs @@ -186,15 +186,6 @@ pub struct Transform3D { /// Specifies the relation this transform establishes between this entity and its parent. pub relation: Option, - /// 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 temporarily unknown transforms. - /// - /// By default all transforms are considered valid. - pub invalid: Option, - /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. @@ -214,7 +205,7 @@ static RECOMMENDED_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 1usiz }] }); -static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> = +static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 7usize]> = once_cell::sync::Lazy::new(|| { [ ComponentDescriptor { @@ -247,11 +238,6 @@ static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> component_name: "rerun.components.TransformRelation".into(), archetype_field_name: Some("relation".into()), }, - ComponentDescriptor { - archetype_name: Some("rerun.archetypes.Transform3D".into()), - component_name: "rerun.components.InvalidTransform".into(), - archetype_field_name: Some("invalid".into()), - }, ComponentDescriptor { archetype_name: Some("rerun.archetypes.Transform3D".into()), component_name: "rerun.components.AxisLength".into(), @@ -260,7 +246,7 @@ static OPTIONAL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> ] }); -static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 9usize]> = +static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 8usize]> = once_cell::sync::Lazy::new(|| { [ ComponentDescriptor { @@ -298,11 +284,6 @@ static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 9usize]> = component_name: "rerun.components.TransformRelation".into(), archetype_field_name: Some("relation".into()), }, - ComponentDescriptor { - archetype_name: Some("rerun.archetypes.Transform3D".into()), - component_name: "rerun.components.InvalidTransform".into(), - archetype_field_name: Some("invalid".into()), - }, ComponentDescriptor { archetype_name: Some("rerun.archetypes.Transform3D".into()), component_name: "rerun.components.AxisLength".into(), @@ -312,8 +293,8 @@ static ALL_COMPONENTS: once_cell::sync::Lazy<[ComponentDescriptor; 9usize]> = }); impl Transform3D { - /// The total number of components in the archetype: 0 required, 1 recommended, 8 optional - pub const NUM_COMPONENTS: usize = 9usize; + /// The total number of components in the archetype: 0 required, 1 recommended, 7 optional + pub const NUM_COMPONENTS: usize = 8usize; } /// Indicator component for the [`Transform3D`] [`::re_types_core::Archetype`] @@ -425,15 +406,6 @@ impl ::re_types_core::Archetype for Transform3D { } else { None }; - let invalid = if let Some(array) = arrays_by_name.get("rerun.components.InvalidTransform") { - ::from_arrow2_opt(&**array) - .with_context("rerun.archetypes.Transform3D#invalid")? - .into_iter() - .next() - .flatten() - } else { - None - }; let axis_length = if let Some(array) = arrays_by_name.get("rerun.components.AxisLength") { ::from_arrow2_opt(&**array) .with_context("rerun.archetypes.Transform3D#axis_length")? @@ -450,7 +422,6 @@ impl ::re_types_core::Archetype for Transform3D { scale, mat3x3, relation, - invalid, axis_length, }) } @@ -522,16 +493,6 @@ impl ::re_types_core::AsComponents for Transform3D { }), } }), - (Some(&self.invalid as &dyn ComponentBatch)).map(|batch| { - ::re_types_core::ComponentBatchCowWithDescriptor { - batch: batch.into(), - descriptor_override: Some(ComponentDescriptor { - archetype_name: Some("rerun.archetypes.Transform3D".into()), - archetype_field_name: Some(("invalid").into()), - component_name: ("rerun.components.InvalidTransform").into(), - }), - } - }), (Some(&self.axis_length as &dyn ComponentBatch)).map(|batch| { ::re_types_core::ComponentBatchCowWithDescriptor { batch: batch.into(), @@ -562,7 +523,6 @@ impl Transform3D { scale: None, mat3x3: None, relation: None, - invalid: None, axis_length: None, } } @@ -621,19 +581,6 @@ impl Transform3D { self } - /// 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 temporarily unknown transforms. - /// - /// By default all transforms are considered valid. - #[inline] - pub fn with_invalid(mut self, invalid: impl Into) -> Self { - self.invalid = Some(invalid.into()); - self - } - /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. @@ -657,7 +604,6 @@ impl ::re_types_core::SizeBytes for Transform3D { + self.scale.heap_size_bytes() + self.mat3x3.heap_size_bytes() + self.relation.heap_size_bytes() - + self.invalid.heap_size_bytes() + self.axis_length.heap_size_bytes() } @@ -669,7 +615,6 @@ impl ::re_types_core::SizeBytes for Transform3D { && >::is_pod() && >::is_pod() && >::is_pod() - && >::is_pod() && >::is_pod() } } diff --git a/crates/store/re_types/src/components/.gitattributes b/crates/store/re_types/src/components/.gitattributes index cda69ef0f203..3cf54dbb31cb 100644 --- a/crates/store/re_types/src/components/.gitattributes +++ b/crates/store/re_types/src/components/.gitattributes @@ -25,7 +25,6 @@ half_size3d.rs linguist-generated=true image_buffer.rs linguist-generated=true image_format.rs linguist-generated=true image_plane_distance.rs linguist-generated=true -invalid_transform.rs linguist-generated=true keypoint_id.rs linguist-generated=true lat_lon.rs linguist-generated=true length.rs linguist-generated=true diff --git a/crates/store/re_types/src/components/disconnected_space.rs b/crates/store/re_types/src/components/disconnected_space.rs index cc9b25efc2ad..cec09ea9d318 100644 --- a/crates/store/re_types/src/components/disconnected_space.rs +++ b/crates/store/re_types/src/components/disconnected_space.rs @@ -26,9 +26,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// 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. #[derive(Clone, Debug, Copy, PartialEq, Eq)] -#[deprecated( - note = "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." -)] +#[deprecated(note = "Use [archetypes.Transform3D] with an invalid transform instead.")] pub struct DisconnectedSpace( /// Whether the entity path at which this is logged is disconnected from its parent. /// diff --git a/crates/store/re_types/src/components/disconnected_space_ext.rs b/crates/store/re_types/src/components/disconnected_space_ext.rs index aa60226ac9a4..189b5015d0a4 100644 --- a/crates/store/re_types/src/components/disconnected_space_ext.rs +++ b/crates/store/re_types/src/components/disconnected_space_ext.rs @@ -1,3 +1,5 @@ +#![allow(deprecated)] + use super::DisconnectedSpace; impl Default for DisconnectedSpace { diff --git a/crates/store/re_types/src/components/invalid_transform.rs b/crates/store/re_types/src/components/invalid_transform.rs deleted file mode 100644 index 9212a08f341b..000000000000 --- a/crates/store/re_types/src/components/invalid_transform.rs +++ /dev/null @@ -1,113 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/rust/api.rs -// Based on "crates/store/re_types/definitions/rerun/components/invalid_transform.fbs". - -#![allow(unused_imports)] -#![allow(unused_parens)] -#![allow(clippy::clone_on_copy)] -#![allow(clippy::cloned_instead_of_copied)] -#![allow(clippy::map_flatten)] -#![allow(clippy::needless_question_mark)] -#![allow(clippy::new_without_default)] -#![allow(clippy::redundant_closure)] -#![allow(clippy::too_many_arguments)] -#![allow(clippy::too_many_lines)] - -use ::re_types_core::external::arrow2; -use ::re_types_core::SerializationResult; -use ::re_types_core::{ComponentBatch, ComponentBatchCowWithDescriptor}; -use ::re_types_core::{ComponentDescriptor, ComponentName}; -use ::re_types_core::{DeserializationError, DeserializationResult}; - -/// **Component**: 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. -#[derive(Clone, Debug, Copy, PartialEq, Eq)] -pub struct InvalidTransform( - /// Whether the entity path at which this is logged as an invalid transform to its parent. - pub crate::datatypes::Bool, -); - -impl ::re_types_core::Component for InvalidTransform { - #[inline] - fn descriptor() -> ComponentDescriptor { - ComponentDescriptor::new("rerun.components.InvalidTransform") - } -} - -::re_types_core::macros::impl_into_cow!(InvalidTransform); - -impl ::re_types_core::Loggable for InvalidTransform { - #[inline] - fn arrow_datatype() -> arrow::datatypes::DataType { - crate::datatypes::Bool::arrow_datatype() - } - - fn to_arrow_opt<'a>( - data: impl IntoIterator>>>, - ) -> SerializationResult - where - Self: Clone + 'a, - { - crate::datatypes::Bool::to_arrow_opt(data.into_iter().map(|datum| { - datum.map(|datum| match datum.into() { - ::std::borrow::Cow::Borrowed(datum) => ::std::borrow::Cow::Borrowed(&datum.0), - ::std::borrow::Cow::Owned(datum) => ::std::borrow::Cow::Owned(datum.0), - }) - })) - } - - fn from_arrow2_opt( - arrow_data: &dyn arrow2::array::Array, - ) -> DeserializationResult>> - where - Self: Sized, - { - crate::datatypes::Bool::from_arrow2_opt(arrow_data) - .map(|v| v.into_iter().map(|v| v.map(Self)).collect()) - } -} - -impl> From for InvalidTransform { - fn from(v: T) -> Self { - Self(v.into()) - } -} - -impl std::borrow::Borrow for InvalidTransform { - #[inline] - fn borrow(&self) -> &crate::datatypes::Bool { - &self.0 - } -} - -impl std::ops::Deref for InvalidTransform { - type Target = crate::datatypes::Bool; - - #[inline] - fn deref(&self) -> &crate::datatypes::Bool { - &self.0 - } -} - -impl std::ops::DerefMut for InvalidTransform { - #[inline] - fn deref_mut(&mut self) -> &mut crate::datatypes::Bool { - &mut self.0 - } -} - -impl ::re_types_core::SizeBytes for InvalidTransform { - #[inline] - fn heap_size_bytes(&self) -> u64 { - self.0.heap_size_bytes() - } - - #[inline] - fn is_pod() -> bool { - ::is_pod() - } -} diff --git a/crates/store/re_types/src/components/mod.rs b/crates/store/re_types/src/components/mod.rs index d29279cd2c51..7273851612a7 100644 --- a/crates/store/re_types/src/components/mod.rs +++ b/crates/store/re_types/src/components/mod.rs @@ -39,7 +39,6 @@ mod image_format; mod image_format_ext; mod image_plane_distance; mod image_plane_distance_ext; -mod invalid_transform; mod keypoint_id; mod keypoint_id_ext; mod lat_lon; @@ -151,7 +150,6 @@ pub use self::half_size3d::HalfSize3D; pub use self::image_buffer::ImageBuffer; pub use self::image_format::ImageFormat; pub use self::image_plane_distance::ImagePlaneDistance; -pub use self::invalid_transform::InvalidTransform; pub use self::keypoint_id::KeypointId; pub use self::lat_lon::LatLon; pub use self::length::Length; diff --git a/crates/store/re_types/src/components/pose_rotation_axis_angle.rs b/crates/store/re_types/src/components/pose_rotation_axis_angle.rs index f04b0666336c..3aa09bef378b 100644 --- a/crates/store/re_types/src/components/pose_rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/pose_rotation_axis_angle.rs @@ -19,6 +19,8 @@ use ::re_types_core::{ComponentDescriptor, ComponentName}; use ::re_types_core::{DeserializationError, DeserializationResult}; /// **Component**: 3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy. +/// +/// If normalization of the rotation axis fails the rotation is treated as an invalid transform. #[derive(Clone, Debug, Default, Copy, PartialEq)] #[repr(transparent)] pub struct PoseRotationAxisAngle(pub crate::datatypes::RotationAxisAngle); diff --git a/crates/store/re_types/src/components/pose_rotation_axis_angle_ext.rs b/crates/store/re_types/src/components/pose_rotation_axis_angle_ext.rs index 7c1e8f10798b..37f700c5c460 100644 --- a/crates/store/re_types/src/components/pose_rotation_axis_angle_ext.rs +++ b/crates/store/re_types/src/components/pose_rotation_axis_angle_ext.rs @@ -14,14 +14,14 @@ impl PoseRotationAxisAngle { } #[cfg(feature = "glam")] -impl From for glam::Affine3A { +impl TryFrom for glam::Affine3A { + type Error = (); + #[inline] - fn from(val: PoseRotationAxisAngle) -> Self { - if let Some(normalized) = glam::Vec3::from(val.0.axis).try_normalize() { - Self::from_axis_angle(normalized, val.0.angle.radians()) - } else { - // If the axis is zero length, we can't normalize it, so we just use the identity rotation. - Self::IDENTITY - } + fn try_from(val: PoseRotationAxisAngle) -> Result { + glam::Vec3::from(val.0.axis) + .try_normalize() + .map(|normalized| Self::from_axis_angle(normalized, val.0.angle.radians())) + .ok_or(()) } } diff --git a/crates/store/re_types/src/components/pose_rotation_quat.rs b/crates/store/re_types/src/components/pose_rotation_quat.rs index 061b7913d864..964700df594d 100644 --- a/crates/store/re_types/src/components/pose_rotation_quat.rs +++ b/crates/store/re_types/src/components/pose_rotation_quat.rs @@ -22,7 +22,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// 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. +/// If normalization fails the rotation is treated as an invalid transform. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] pub struct PoseRotationQuat(pub crate::datatypes::Quaternion); diff --git a/crates/store/re_types/src/components/pose_rotation_quat_ext.rs b/crates/store/re_types/src/components/pose_rotation_quat_ext.rs index ffdf95624fe7..0aaa24d74e79 100644 --- a/crates/store/re_types/src/components/pose_rotation_quat_ext.rs +++ b/crates/store/re_types/src/components/pose_rotation_quat_ext.rs @@ -2,13 +2,21 @@ use super::PoseRotationQuat; impl PoseRotationQuat { /// The identity rotation, representing no rotation. + /// + /// Keep in mind that logging an identity rotation is different from logging no rotation at all + /// in thus far that it will write data to the store. pub const IDENTITY: Self = Self(crate::datatypes::Quaternion::IDENTITY); + + /// A rotation that represents an invalid transform. + pub const INVALID: Self = Self(crate::datatypes::Quaternion::INVALID); } #[cfg(feature = "glam")] -impl From for glam::Affine3A { +impl TryFrom for glam::Affine3A { + type Error = (); + #[inline] - fn from(val: PoseRotationQuat) -> Self { - Self::from_quat(val.0.into()) + fn try_from(val: PoseRotationQuat) -> Result { + Ok(Self::from_quat(glam::Quat::try_from(val.0)?)) } } diff --git a/crates/store/re_types/src/components/rotation_axis_angle.rs b/crates/store/re_types/src/components/rotation_axis_angle.rs index feb7bfeba9ac..21dafdc16441 100644 --- a/crates/store/re_types/src/components/rotation_axis_angle.rs +++ b/crates/store/re_types/src/components/rotation_axis_angle.rs @@ -19,6 +19,8 @@ use ::re_types_core::{ComponentDescriptor, ComponentName}; use ::re_types_core::{DeserializationError, DeserializationResult}; /// **Component**: 3D rotation represented by a rotation around a given axis. +/// +/// If normalization of the rotation axis fails the rotation is treated as an invalid transform. #[derive(Clone, Debug, Default, Copy, PartialEq)] #[repr(transparent)] pub struct RotationAxisAngle(pub crate::datatypes::RotationAxisAngle); diff --git a/crates/store/re_types/src/components/rotation_axis_angle_ext.rs b/crates/store/re_types/src/components/rotation_axis_angle_ext.rs index 9738aee10231..7884e2aa3434 100644 --- a/crates/store/re_types/src/components/rotation_axis_angle_ext.rs +++ b/crates/store/re_types/src/components/rotation_axis_angle_ext.rs @@ -14,14 +14,14 @@ impl RotationAxisAngle { } #[cfg(feature = "glam")] -impl From for glam::Affine3A { +impl TryFrom for glam::Affine3A { + type Error = (); + #[inline] - fn from(val: RotationAxisAngle) -> Self { - if let Some(normalized) = glam::Vec3::from(val.0.axis).try_normalize() { - Self::from_axis_angle(normalized, val.0.angle.radians()) - } else { - // If the axis is zero length, we can't normalize it, so we just use the identity rotation. - Self::IDENTITY - } + fn try_from(val: RotationAxisAngle) -> Result { + glam::Vec3::from(val.0.axis) + .try_normalize() + .map(|normalized| Self::from_axis_angle(normalized, val.0.angle.radians())) + .ok_or(()) } } diff --git a/crates/store/re_types/src/components/rotation_quat.rs b/crates/store/re_types/src/components/rotation_quat.rs index a6e83d74eea7..0ee536178c0b 100644 --- a/crates/store/re_types/src/components/rotation_quat.rs +++ b/crates/store/re_types/src/components/rotation_quat.rs @@ -22,7 +22,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// 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. +/// If normalization fails the rotation is treated as an invalid transform. #[derive(Clone, Debug, Default, Copy, PartialEq, bytemuck::Pod, bytemuck::Zeroable)] #[repr(transparent)] pub struct RotationQuat(pub crate::datatypes::Quaternion); diff --git a/crates/store/re_types/src/components/rotation_quat_ext.rs b/crates/store/re_types/src/components/rotation_quat_ext.rs index ef4510515e32..e5b81b29e640 100644 --- a/crates/store/re_types/src/components/rotation_quat_ext.rs +++ b/crates/store/re_types/src/components/rotation_quat_ext.rs @@ -6,12 +6,17 @@ impl RotationQuat { /// Keep in mind that logging an identity rotation is different from logging no rotation at all /// in thus far that it will write data to the store. pub const IDENTITY: Self = Self(crate::datatypes::Quaternion::IDENTITY); + + /// A rotation that represents an invalid transform. + pub const INVALID: Self = Self(crate::datatypes::Quaternion::INVALID); } #[cfg(feature = "glam")] -impl From for glam::Affine3A { +impl TryFrom for glam::Affine3A { + type Error = (); + #[inline] - fn from(val: RotationQuat) -> Self { - Self::from_quat(val.0.into()) + fn try_from(val: RotationQuat) -> Result { + Ok(Self::from_quat(glam::Quat::try_from(val.0)?)) } } diff --git a/crates/store/re_types/src/datatypes/quaternion_ext.rs b/crates/store/re_types/src/datatypes/quaternion_ext.rs index 602230ed523b..aae7a4b5a006 100644 --- a/crates/store/re_types/src/datatypes/quaternion_ext.rs +++ b/crates/store/re_types/src/datatypes/quaternion_ext.rs @@ -13,6 +13,9 @@ impl Quaternion { /// The identity quaternion representing no rotation. pub const IDENTITY: Self = Self([0.0, 0.0, 0.0, 1.0]); + /// A quaternion that represents an invalid transform. + pub const INVALID: Self = Self([0.0, 0.0, 0.0, 0.0]); + /// From XYZW. #[inline] pub const fn from_xyzw(xyzw: [f32; 4]) -> Self { @@ -33,13 +36,15 @@ impl Quaternion { } #[cfg(feature = "glam")] -impl From for glam::Quat { +impl TryFrom for glam::Quat { + type Error = (); + #[inline] - fn from(q: Quaternion) -> Self { - let Some(normalized) = glam::Vec4::from(q.0).try_normalize() else { - return Self::IDENTITY; - }; - Self::from_vec4(normalized) + fn try_from(q: Quaternion) -> Result { + glam::Vec4::from(q.0) + .try_normalize() + .map(Self::from_vec4) + .ok_or(()) } } diff --git a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs index 29a5f4228fc9..59218e9ced58 100644 --- a/crates/store/re_types/src/datatypes/rotation_axis_angle.rs +++ b/crates/store/re_types/src/datatypes/rotation_axis_angle.rs @@ -24,8 +24,8 @@ pub struct 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. + /// However, if normalization of the rotation axis fails (typically due to a zero vector) + /// the rotation is treated as an invalid transform. pub axis: crate::datatypes::Vec3D, /// How much to rotate around the axis. diff --git a/crates/store/re_types/src/datatypes/rotation_axis_angle_ext.rs b/crates/store/re_types/src/datatypes/rotation_axis_angle_ext.rs index 27ca8e3057c2..1aae9e45e748 100644 --- a/crates/store/re_types/src/datatypes/rotation_axis_angle_ext.rs +++ b/crates/store/re_types/src/datatypes/rotation_axis_angle_ext.rs @@ -9,6 +9,12 @@ impl RotationAxisAngle { angle: Angle::ZERO, }; + /// A rotation that represents an invalid transform. + pub const INVALID: Self = Self { + axis: Vec3D::ZERO, + angle: Angle::ZERO, + }; + /// Create a new rotation from an axis and an angle. #[inline] pub fn new(axis: impl Into, angle: impl Into) -> Self { @@ -26,13 +32,15 @@ impl, A: Into> From<(V, A)> for RotationAxisAngle { } #[cfg(feature = "glam")] -impl From for glam::Quat { +impl TryFrom for glam::Quat { + type Error = (); + #[inline] - fn from(val: RotationAxisAngle) -> Self { + fn try_from(val: RotationAxisAngle) -> Result { let axis: glam::Vec3 = val.axis.into(); axis.try_normalize() .map(|axis| Self::from_axis_angle(axis, val.angle.radians())) - .unwrap_or_default() + .ok_or(()) } } diff --git a/crates/store/re_types/src/reflection/mod.rs b/crates/store/re_types/src/reflection/mod.rs index 1daeb324d940..129ea7566c7d 100644 --- a/crates/store/re_types/src/reflection/mod.rs +++ b/crates/store/re_types/src/reflection/mod.rs @@ -29,7 +29,7 @@ pub fn generate_reflection() -> Result { /// Generates reflection about all known components. /// /// Call only once and reuse the results. - +#[allow(deprecated)] fn generate_component_reflection() -> Result { re_tracing::profile_function!(); let array = [ @@ -551,14 +551,6 @@ fn generate_component_reflection() -> Result::name(), - ComponentReflection { - docstring_md: "Flags the transform at its entity path as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporarily unknown transforms.\n\nNote that by default all transforms are considered valid.", - custom_placeholder: None, - datatype: InvalidTransform::arrow2_datatype(), - }, - ), ( ::name(), ComponentReflection { @@ -666,7 +658,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy.", + docstring_md: "3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy.\n\nIf normalization of the rotation axis fails the rotation is treated as an invalid transform.", custom_placeholder: Some(PoseRotationAxisAngle::default().to_arrow2()?), datatype: PoseRotationAxisAngle::arrow2_datatype(), }, @@ -674,7 +666,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "A 3D rotation expressed as a quaternion that doesn't propagate in the transform hierarchy.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is silently ignored.", + docstring_md: "A 3D rotation expressed as a quaternion that doesn't propagate in the transform hierarchy.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is treated as an invalid transform.", custom_placeholder: Some(PoseRotationQuat::default().to_arrow2()?), datatype: PoseRotationQuat::arrow2_datatype(), }, @@ -754,7 +746,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "3D rotation represented by a rotation around a given axis.", + docstring_md: "3D rotation represented by a rotation around a given axis.\n\nIf normalization of the rotation axis fails the rotation is treated as an invalid transform.", custom_placeholder: Some(RotationAxisAngle::default().to_arrow2()?), datatype: RotationAxisAngle::arrow2_datatype(), }, @@ -762,7 +754,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "A 3D rotation expressed as a quaternion.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is silently ignored.", + docstring_md: "A 3D rotation expressed as a quaternion.\n\nNote: although the x,y,z,w components of the quaternion will be passed through to the\ndatastore as provided, when used in the Viewer, quaternions will always be normalized.\nIf normalization fails the rotation is treated as an invalid transform.", custom_placeholder: Some(RotationQuat::default().to_arrow2()?), datatype: RotationQuat::arrow2_datatype(), }, @@ -1908,10 +1900,6 @@ fn generate_archetype_reflection() -> ArchetypeReflectionMap { : "Relation", component_name : "rerun.components.TransformRelation" .into(), docstring_md : "Specifies the relation this transform establishes between this entity and its parent.", - is_required : false, }, ArchetypeFieldReflection { name : "invalid", - display_name : "Invalid", component_name : - "rerun.components.InvalidTransform".into(), docstring_md : - "Optionally flags the transform as invalid.\n\nSpecifies that the entity path at which this is logged is spatially disconnected from its parent,\nmaking it impossible to transform the entity path into its parent's space and vice versa.\nThis can be useful for instance to express temporarily unknown transforms.\n\nBy default all transforms are considered valid.", is_required : false, }, ArchetypeFieldReflection { name : "axis_length", display_name : "Axis length", component_name : "rerun.components.AxisLength".into(), docstring_md : diff --git a/crates/store/re_types/tests/types/disconnected_space.rs b/crates/store/re_types/tests/types/disconnected_space.rs index df3b2156f904..94934f4f1b68 100644 --- a/crates/store/re_types/tests/types/disconnected_space.rs +++ b/crates/store/re_types/tests/types/disconnected_space.rs @@ -1,3 +1,5 @@ +#![allow(deprecated)] + use std::collections::HashMap; use re_types::{archetypes::DisconnectedSpace, Archetype as _, AsComponents as _}; diff --git a/crates/viewer/re_view_spatial/src/contexts/transform_context.rs b/crates/viewer/re_view_spatial/src/contexts/transform_context.rs index 82a596ea58b6..8a2264f81295 100644 --- a/crates/viewer/re_view_spatial/src/contexts/transform_context.rs +++ b/crates/viewer/re_view_spatial/src/contexts/transform_context.rs @@ -6,9 +6,9 @@ use re_entity_db::{EntityDb, EntityPath, EntityTree}; use re_types::{ archetypes::{InstancePoses3D, Pinhole, Transform3D}, components::{ - DisconnectedSpace, ImagePlaneDistance, PinholeProjection, PoseRotationAxisAngle, - PoseRotationQuat, PoseScale3D, PoseTransformMat3x3, PoseTranslation3D, RotationAxisAngle, - RotationQuat, Scale3D, TransformMat3x3, TransformRelation, Translation3D, ViewCoordinates, + self, ImagePlaneDistance, PinholeProjection, PoseRotationAxisAngle, PoseRotationQuat, + PoseScale3D, PoseTransformMat3x3, PoseTranslation3D, RotationAxisAngle, RotationQuat, + Scale3D, TransformMat3x3, TransformRelation, Translation3D, ViewCoordinates, }, Archetype, Component as _, ComponentNameSet, }; @@ -169,7 +169,8 @@ impl ViewContextSystem for TransformContext { .map(|descr| descr.component_name) .collect(), std::iter::once(PinholeProjection::name()).collect(), - std::iter::once(DisconnectedSpace::name()).collect(), + #[allow(deprecated)] // `DisconnectedSpace` is on the way out. + std::iter::once(components::DisconnectedSpace::name()).collect(), ] } @@ -550,17 +551,36 @@ fn query_and_resolve_tree_transform_at_entity( if let Some(translation) = result.component_instance::(0) { transform = glam::Affine3A::from(translation); } - if let Some(rotation_quat) = result.component_instance::(0) { - transform *= glam::Affine3A::from(rotation_quat); + if let Some(axis_angle) = result.component_instance::(0) { + if let Ok(axis_angle) = glam::Affine3A::try_from(axis_angle) { + transform *= axis_angle; + } else { + // Invalid transform. + return None; + } } - if let Some(rotation_axis_angle) = result.component_instance::(0) { - transform *= glam::Affine3A::from(rotation_axis_angle); + if let Some(quaternion) = result.component_instance::(0) { + if let Ok(quaternion) = glam::Affine3A::try_from(quaternion) { + transform *= quaternion; + } else { + // Invalid transform. + return None; + } } if let Some(scale) = result.component_instance::(0) { + if scale.x() == 0.0 || scale.y() == 0.0 || scale.z() == 0.0 { + // Invalid scale. + return None; + } transform *= glam::Affine3A::from(scale); } if let Some(mat3x3) = result.component_instance::(0) { - transform *= glam::Affine3A::from(mat3x3); + let affine_transform = glam::Affine3A::from(mat3x3); + if affine_transform.matrix3.determinant() == 0.0 { + // Invalid transform. + return None; + } + transform *= affine_transform; } if result.component_instance::(0) == Some(TransformRelation::ChildFromParent) @@ -647,10 +667,18 @@ fn query_and_resolve_instance_poses_at_entity( transform = glam::Affine3A::from(translation); } if let Some(rotation_quat) = iter_rotation_quat.next() { - transform *= glam::Affine3A::from(rotation_quat); + if let Ok(rotation_quat) = glam::Affine3A::try_from(rotation_quat) { + transform *= rotation_quat; + } else { + transform = glam::Affine3A::ZERO; + } } if let Some(rotation_axis_angle) = iter_rotation_axis_angle.next() { - transform *= glam::Affine3A::from(rotation_axis_angle); + if let Ok(axis_angle) = glam::Affine3A::try_from(rotation_axis_angle) { + transform *= axis_angle; + } else { + transform = glam::Affine3A::ZERO; + } } if let Some(scale) = iter_scale.next() { transform *= glam::Affine3A::from(scale); @@ -802,10 +830,11 @@ fn transforms_at( .instance_from_pinhole_image_plane .is_none(); + #[allow(deprecated)] // `DisconnectedSpace` is on the way out. if no_other_transforms && potential_transform_components.disconnected_space && entity_db - .latest_at_component::(entity_path, query) + .latest_at_component::(entity_path, query) .map_or(false, |(_index, res)| **res) { Err(UnreachableTransformReason::DisconnectedSpace) diff --git a/crates/viewer/re_view_spatial/src/spatial_topology.rs b/crates/viewer/re_view_spatial/src/spatial_topology.rs index 67d3b942ec7c..e33c8ce6ae33 100644 --- a/crates/viewer/re_view_spatial/src/spatial_topology.rs +++ b/crates/viewer/re_view_spatial/src/spatial_topology.rs @@ -1,3 +1,6 @@ +// `DisconnectedSpace` is still around, but to be removed. +#![allow(deprecated)] + use once_cell::sync::OnceCell; use ahash::HashMap; diff --git a/crates/viewer/re_view_spatial/src/transform_component_tracker.rs b/crates/viewer/re_view_spatial/src/transform_component_tracker.rs index bd46be0560cd..a343d2fff3aa 100644 --- a/crates/viewer/re_view_spatial/src/transform_component_tracker.rs +++ b/crates/viewer/re_view_spatial/src/transform_component_tracker.rs @@ -136,6 +136,8 @@ impl PerStoreChunkSubscriber for TransformComponentTrackerStoreSubscriber { .or_default() .pinhole = true; } + // `DisconnectedSpace` is deprecated and will be removed in the future. + #[allow(deprecated)] if component_name == re_types::components::DisconnectedSpace::name() && contains_non_zero_component_array(component_name) { diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp index aeec794912e1..e866a8a6bffc 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp @@ -43,8 +43,7 @@ namespace rerun::archetypes { /// rec.log("world/wormhole/point", rerun::Points3D({{2.0f, 2.0f, 2.0f}})); /// } /// ``` - struct [[deprecated( - "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." + struct [[deprecated("Use [archetypes.Transform3D] with an invalid transform instead" )]] DisconnectedSpace { /// Whether the entity path at which this is logged is disconnected from its parent. rerun::components::DisconnectedSpace disconnected_space; diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.cpp b/rerun_cpp/src/rerun/archetypes/transform3d.cpp index f69183e3668e..d75e3b616af6 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.cpp @@ -14,7 +14,7 @@ namespace rerun { ) { using namespace archetypes; std::vector cells; - cells.reserve(9); + cells.reserve(8); { auto result = ComponentBatch::from_loggable( @@ -88,18 +88,6 @@ namespace rerun { RR_RETURN_NOT_OK(result.error); cells.push_back(std::move(result.value)); } - { - auto result = ComponentBatch::from_loggable( - archetype.invalid, - ComponentDescriptor( - "rerun.archetypes.Transform3D", - "invalid", - "rerun.components.InvalidTransform" - ) - ); - RR_RETURN_NOT_OK(result.error); - cells.push_back(std::move(result.value)); - } { auto result = ComponentBatch::from_loggable( archetype.axis_length, diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.hpp b/rerun_cpp/src/rerun/archetypes/transform3d.hpp index 678c50fec4af..060b8052e872 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.hpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.hpp @@ -7,7 +7,6 @@ #include "../compiler_utils.hpp" #include "../component_batch.hpp" #include "../components/axis_length.hpp" -#include "../components/invalid_transform.hpp" #include "../components/rotation_axis_angle.hpp" #include "../components/rotation_quat.hpp" #include "../components/scale3d.hpp" @@ -170,15 +169,6 @@ namespace rerun::archetypes { /// Specifies the relation this transform establishes between this entity and its parent. std::optional relation; - /// 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 temporarily unknown transforms. - /// - /// By default all transforms are considered valid. - std::optional invalid; - /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. @@ -198,6 +188,11 @@ namespace rerun::archetypes { /// Applying this transform does not alter an entity's transformation. RERUN_SDK_EXPORT static const Transform3D IDENTITY; + /// Invalid transformation. + /// + /// Applying this transform will cause this entity and the entire subtree not to be visualized. + RERUN_SDK_EXPORT static const Transform3D INVALID; + /// Creates a new 3D transform from translation and matrix provided as 3 columns. /// /// \param translation_ \çopydoc Transform3D::translation @@ -570,19 +565,6 @@ namespace rerun::archetypes { RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);) } - /// 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 temporarily unknown transforms. - /// - /// By default all transforms are considered valid. - Transform3D with_invalid(rerun::components::InvalidTransform _invalid) && { - invalid = std::move(_invalid); - // See: https://github.com/rerun-io/rerun/issues/4027 - RR_WITH_MAYBE_UNINITIALIZED_DISABLED(return std::move(*this);) - } - /// Visual length of the 3 axes. /// /// The length is interpreted in the local coordinate system of the transform. diff --git a/rerun_cpp/src/rerun/archetypes/transform3d_ext.cpp b/rerun_cpp/src/rerun/archetypes/transform3d_ext.cpp index 27fccae48924..9e9b04087e1e 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d_ext.cpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d_ext.cpp @@ -16,6 +16,11 @@ namespace rerun::archetypes { /// Applying this transform does not alter an entity's transformation. RERUN_SDK_EXPORT static const Transform3D IDENTITY; + /// Invalid transformation. + /// + /// Applying this transform will cause this entity and the entire subtree not to be visualized. + RERUN_SDK_EXPORT static const Transform3D INVALID; + /// Creates a new 3D transform from translation and matrix provided as 3 columns. /// /// \param translation_ \çopydoc Transform3D::translation @@ -338,4 +343,14 @@ namespace rerun::archetypes { // #endif + /// Identity transformation. + /// + /// Applying this transform does not alter an entity's transformation. + const Transform3D Transform3D::IDENTITY = Transform3D(rerun::datatypes::Mat3x3::IDENTITY); + + /// Invalid transformation. + /// + /// Applying this transform will cause this entity and the entire subtree not to be visualized. + const Transform3D Transform3D::INVALID = Transform3D(rerun::datatypes::Mat3x3::INVALID); + } // namespace rerun::archetypes diff --git a/rerun_cpp/src/rerun/components.hpp b/rerun_cpp/src/rerun/components.hpp index d4db2f6e5f68..17ff34250df4 100644 --- a/rerun_cpp/src/rerun/components.hpp +++ b/rerun_cpp/src/rerun/components.hpp @@ -27,7 +27,6 @@ #include "components/image_buffer.hpp" #include "components/image_format.hpp" #include "components/image_plane_distance.hpp" -#include "components/invalid_transform.hpp" #include "components/keypoint_id.hpp" #include "components/lat_lon.hpp" #include "components/length.hpp" diff --git a/rerun_cpp/src/rerun/components/.gitattributes b/rerun_cpp/src/rerun/components/.gitattributes index e06df9f6df58..57a1800528b7 100644 --- a/rerun_cpp/src/rerun/components/.gitattributes +++ b/rerun_cpp/src/rerun/components/.gitattributes @@ -32,7 +32,6 @@ half_size3d.hpp linguist-generated=true image_buffer.hpp linguist-generated=true image_format.hpp linguist-generated=true image_plane_distance.hpp linguist-generated=true -invalid_transform.hpp linguist-generated=true keypoint_id.hpp linguist-generated=true lat_lon.hpp linguist-generated=true length.hpp linguist-generated=true diff --git a/rerun_cpp/src/rerun/components/disconnected_space.hpp b/rerun_cpp/src/rerun/components/disconnected_space.hpp index 0eb765bf5a1a..c50fdd4ca565 100644 --- a/rerun_cpp/src/rerun/components/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/components/disconnected_space.hpp @@ -17,8 +17,7 @@ namespace rerun::components { /// making it impossible to transform the entity path into its parent's space and vice versa. /// 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 [[deprecated( - "Use [archetypes.Transform3D] with [rerun.components.InvalidTransform] instead." + struct [[deprecated("Use [archetypes.Transform3D] with an invalid transform instead." )]] DisconnectedSpace { /// Whether the entity path at which this is logged is disconnected from its parent. /// diff --git a/rerun_cpp/src/rerun/components/invalid_transform.hpp b/rerun_cpp/src/rerun/components/invalid_transform.hpp deleted file mode 100644 index f73355924054..000000000000 --- a/rerun_cpp/src/rerun/components/invalid_transform.hpp +++ /dev/null @@ -1,81 +0,0 @@ -// DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs -// Based on "crates/store/re_types/definitions/rerun/components/invalid_transform.fbs". - -#pragma once - -#include "../component_descriptor.hpp" -#include "../datatypes/bool.hpp" -#include "../result.hpp" - -#include -#include - -namespace rerun::components { - /// **Component**: 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 { - /// Whether the entity path at which this is logged as an invalid transform to its parent. - rerun::datatypes::Bool invalid; - - public: - InvalidTransform() = default; - - InvalidTransform(rerun::datatypes::Bool invalid_) : invalid(invalid_) {} - - InvalidTransform& operator=(rerun::datatypes::Bool invalid_) { - invalid = invalid_; - return *this; - } - - InvalidTransform(bool value_) : invalid(value_) {} - - InvalidTransform& operator=(bool value_) { - invalid = value_; - return *this; - } - - /// Cast to the underlying Bool datatype - operator rerun::datatypes::Bool() const { - return invalid; - } - }; -} // namespace rerun::components - -namespace rerun { - static_assert(sizeof(rerun::datatypes::Bool) == sizeof(components::InvalidTransform)); - - /// \private - template <> - struct Loggable { - static constexpr ComponentDescriptor Descriptor = "rerun.components.InvalidTransform"; - - /// Returns the arrow data type this type corresponds to. - static const std::shared_ptr& arrow_datatype() { - return Loggable::arrow_datatype(); - } - - /// Serializes an array of `rerun::components::InvalidTransform` into an arrow array. - static Result> to_arrow( - const components::InvalidTransform* instances, size_t num_instances - ) { - if (num_instances == 0) { - return Loggable::to_arrow(nullptr, 0); - } else if (instances == nullptr) { - return rerun::Error( - ErrorCode::UnexpectedNullArgument, - "Passed array instances is null when num_elements> 0." - ); - } else { - return Loggable::to_arrow( - &instances->invalid, - num_instances - ); - } - } - }; -} // namespace rerun diff --git a/rerun_cpp/src/rerun/components/pose_rotation_axis_angle.hpp b/rerun_cpp/src/rerun/components/pose_rotation_axis_angle.hpp index d7d9d6490907..f361fa1d96d7 100644 --- a/rerun_cpp/src/rerun/components/pose_rotation_axis_angle.hpp +++ b/rerun_cpp/src/rerun/components/pose_rotation_axis_angle.hpp @@ -12,6 +12,8 @@ namespace rerun::components { /// **Component**: 3D rotation represented by a rotation around a given axis that doesn't propagate in the transform hierarchy. + /// + /// If normalization of the rotation axis fails the rotation is treated as an invalid transform. struct PoseRotationAxisAngle { rerun::datatypes::RotationAxisAngle rotation; diff --git a/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp b/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp index 98637f680bf7..212cdb630ead 100644 --- a/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp +++ b/rerun_cpp/src/rerun/components/pose_rotation_quat.hpp @@ -15,7 +15,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. + /// If normalization fails the rotation is treated as an invalid transform. struct PoseRotationQuat { rerun::datatypes::Quaternion quaternion; diff --git a/rerun_cpp/src/rerun/components/resolution.hpp b/rerun_cpp/src/rerun/components/resolution.hpp index ef7513a9596b..aacef5296c5c 100644 --- a/rerun_cpp/src/rerun/components/resolution.hpp +++ b/rerun_cpp/src/rerun/components/resolution.hpp @@ -20,8 +20,6 @@ namespace rerun::components { rerun::datatypes::Vec2D resolution; public: // START of extensions from resolution_ext.cpp: - RERUN_SDK_EXPORT static const Resolution IDENTITY; - /// Construct resolution from width and height floats. Resolution(float width, float height) : resolution{width, height} {} diff --git a/rerun_cpp/src/rerun/components/resolution_ext.cpp b/rerun_cpp/src/rerun/components/resolution_ext.cpp index acd7f58e5aad..a9251493105e 100644 --- a/rerun_cpp/src/rerun/components/resolution_ext.cpp +++ b/rerun_cpp/src/rerun/components/resolution_ext.cpp @@ -18,8 +18,6 @@ namespace rerun { // - RERUN_SDK_EXPORT static const Resolution IDENTITY; - /// Construct resolution from width and height floats. Resolution(float width, float height) : resolution{width, height} {} diff --git a/rerun_cpp/src/rerun/components/rotation_axis_angle.hpp b/rerun_cpp/src/rerun/components/rotation_axis_angle.hpp index 46fc2a62142f..86bf63be7103 100644 --- a/rerun_cpp/src/rerun/components/rotation_axis_angle.hpp +++ b/rerun_cpp/src/rerun/components/rotation_axis_angle.hpp @@ -12,6 +12,8 @@ namespace rerun::components { /// **Component**: 3D rotation represented by a rotation around a given axis. + /// + /// If normalization of the rotation axis fails the rotation is treated as an invalid transform. struct RotationAxisAngle { rerun::datatypes::RotationAxisAngle rotation; diff --git a/rerun_cpp/src/rerun/components/rotation_quat.hpp b/rerun_cpp/src/rerun/components/rotation_quat.hpp index 365be7ec9fc2..a7814558eb50 100644 --- a/rerun_cpp/src/rerun/components/rotation_quat.hpp +++ b/rerun_cpp/src/rerun/components/rotation_quat.hpp @@ -15,7 +15,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. + /// If normalization fails the rotation is treated as an invalid transform. struct RotationQuat { rerun::datatypes::Quaternion quaternion; diff --git a/rerun_cpp/src/rerun/datatypes/mat3x3.hpp b/rerun_cpp/src/rerun/datatypes/mat3x3.hpp index d1c5d4caa3fe..a7cd01036079 100644 --- a/rerun_cpp/src/rerun/datatypes/mat3x3.hpp +++ b/rerun_cpp/src/rerun/datatypes/mat3x3.hpp @@ -35,6 +35,7 @@ namespace rerun::datatypes { public: // START of extensions from mat3x3_ext.cpp: static const Mat3x3 IDENTITY; + static const Mat3x3 INVALID; /// Creates a new 3x3 matrix from 3 *columns* of 3 elements each. Mat3x3(const Vec3D (&columns)[3]) diff --git a/rerun_cpp/src/rerun/datatypes/mat3x3_ext.cpp b/rerun_cpp/src/rerun/datatypes/mat3x3_ext.cpp index ecde3c19df89..845c371e3408 100644 --- a/rerun_cpp/src/rerun/datatypes/mat3x3_ext.cpp +++ b/rerun_cpp/src/rerun/datatypes/mat3x3_ext.cpp @@ -13,6 +13,7 @@ namespace rerun { // static const Mat3x3 IDENTITY; + static const Mat3x3 INVALID; /// Creates a new 3x3 matrix from 3 *columns* of 3 elements each. Mat3x3(const Vec3D (&columns)[3]) @@ -51,5 +52,11 @@ namespace rerun { {0.0, 0.0, 1.0}, }); + const Mat3x3 Mat3x3::INVALID = Mat3x3({ + {0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0}, + {0.0, 0.0, 0.0}, + }); + } // namespace datatypes } // namespace rerun diff --git a/rerun_cpp/src/rerun/datatypes/quaternion.hpp b/rerun_cpp/src/rerun/datatypes/quaternion.hpp index cf7115966407..71a35af4f7c6 100644 --- a/rerun_cpp/src/rerun/datatypes/quaternion.hpp +++ b/rerun_cpp/src/rerun/datatypes/quaternion.hpp @@ -27,6 +27,7 @@ namespace rerun::datatypes { public: // START of extensions from quaternion_ext.cpp: RERUN_SDK_EXPORT static const Quaternion IDENTITY; + RERUN_SDK_EXPORT static const Quaternion INVALID; /// Construct Quaternion from x/y/z/w values. static Quaternion from_xyzw(float x, float y, float z, float w) { diff --git a/rerun_cpp/src/rerun/datatypes/quaternion_ext.cpp b/rerun_cpp/src/rerun/datatypes/quaternion_ext.cpp index 39d09d529d22..b9a0c4cfaf6d 100644 --- a/rerun_cpp/src/rerun/datatypes/quaternion_ext.cpp +++ b/rerun_cpp/src/rerun/datatypes/quaternion_ext.cpp @@ -15,6 +15,7 @@ namespace rerun { // RERUN_SDK_EXPORT static const Quaternion IDENTITY; + RERUN_SDK_EXPORT static const Quaternion INVALID; /// Construct Quaternion from x/y/z/w values. static Quaternion from_xyzw(float x, float y, float z, float w) { @@ -68,5 +69,6 @@ namespace rerun { #endif const Quaternion Quaternion::IDENTITY = Quaternion::from_xyzw(0.0f, 0.0f, 0.0f, 1.0f); + const Quaternion Quaternion::INVALID = Quaternion::from_xyzw(0.0f, 0.0f, 0.0f, 0.0f); } // namespace datatypes } // namespace rerun diff --git a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp index e70c0d1ce738..a1c28310d491 100644 --- a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp +++ b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.hpp @@ -23,8 +23,8 @@ namespace rerun::datatypes { /// 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. + /// However, if normalization of the rotation axis fails (typically due to a zero vector) + /// the rotation is treated as an invalid transform. rerun::datatypes::Vec3D axis; /// How much to rotate around the axis. diff --git a/rerun_py/rerun_sdk/rerun/datatypes/quaternion_ext.py b/rerun_py/rerun_sdk/rerun/datatypes/quaternion_ext.py index 29f6290a9c8a..4027612c1dca 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/quaternion_ext.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/quaternion_ext.py @@ -27,6 +27,12 @@ def identity() -> Quaternion: return Quaternion(xyzw=np.array([0, 0, 0, 1], dtype=np.float32)) + @staticmethod + def invalid() -> Quaternion: + from . import Quaternion + + return Quaternion(xyzw=np.array([0, 0, 0, 0], dtype=np.float32)) + @staticmethod def native_to_pa_array_override(data: QuaternionArrayLike, data_type: pa.DataType) -> pa.Array: # TODO(ab): get rid of this once we drop support for Python 3.8. Make sure to pin numpy>=1.25. diff --git a/tests/rust/roundtrips/disconnected_space/src/main.rs b/tests/rust/roundtrips/disconnected_space/src/main.rs index 27cb7eacf00d..a20b1a92391c 100644 --- a/tests/rust/roundtrips/disconnected_space/src/main.rs +++ b/tests/rust/roundtrips/disconnected_space/src/main.rs @@ -1,5 +1,9 @@ //! Logs a `DisconnectedSpace` archetype for roundtrip checks. +// `DisconnectedSpace` is deprecated and will be removed in the future. +// Use an invalid transform (for instance zero scale or zero matrix) instead. +#![allow(deprecated)] + use rerun::{archetypes::DisconnectedSpace, RecordingStream}; #[derive(Debug, clap::Parser)] From 5f8ce3453f741932feddb4b9a69c113f1d780c24 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 17:54:09 +0100 Subject: [PATCH 07/13] fix c++ deprecation warnings --- .../re_types_builder/src/codegen/cpp/mod.rs | 17 +++++++++++++++++ .../all/archetypes/disconnected_space.cpp | 3 +++ .../src/rerun/archetypes/disconnected_space.hpp | 3 +++ .../src/rerun/components/disconnected_space.hpp | 6 ++++++ .../tests/archetypes/disconnected_space.cpp | 2 ++ .../cpp/roundtrips/disconnected_space/main.cpp | 5 +++++ 6 files changed, 36 insertions(+) diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index dd41590729a6..5ddd5528b16d 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -2591,7 +2591,22 @@ fn quote_loggable_hpp_and_cpp( hpp_includes.insert_rerun("component_descriptor.hpp"); + let (deprecation_ignore_start, deprecation_ignore_end) = if obj.deprecation_notice().is_some() { + hpp_includes.insert_rerun("compiler_utils.hpp"); + ( + quote! { + RR_PUSH_WARNINGS #NEWLINE_TOKEN + RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN + }, + quote! { RR_POP_WARNINGS }, + ) + } else { + (quote!(), quote!()) + }; + let hpp = quote! { + #deprecation_ignore_start + namespace rerun { #predeclarations_and_static_assertions @@ -2604,6 +2619,8 @@ fn quote_loggable_hpp_and_cpp( #(#methods_hpp)* }; } + + #deprecation_ignore_end }; let cpp = if methods.iter().any(|m| !m.inline) { diff --git a/docs/snippets/all/archetypes/disconnected_space.cpp b/docs/snippets/all/archetypes/disconnected_space.cpp index b1e50bba108c..e3053c338b62 100644 --- a/docs/snippets/all/archetypes/disconnected_space.cpp +++ b/docs/snippets/all/archetypes/disconnected_space.cpp @@ -2,6 +2,9 @@ #include +// DisconnectedSpace is deprecated and will be removed in the future. +RR_DISABLE_DEPRECATION_WARNING + int main() { const auto rec = rerun::RecordingStream("rerun_example_disconnected_space"); rec.spawn().exit_on_failure(); diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp index e866a8a6bffc..80cb96ebd353 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp @@ -30,6 +30,9 @@ namespace rerun::archetypes { /// ```cpp /// #include /// + /// // DisconnectedSpace is deprecated and will be removed in the future. + /// RR_DISABLE_DEPRECATION_WARNING + /// /// int main() { /// const auto rec = rerun::RecordingStream("rerun_example_disconnected_space"); /// rec.spawn().exit_on_failure(); diff --git a/rerun_cpp/src/rerun/components/disconnected_space.hpp b/rerun_cpp/src/rerun/components/disconnected_space.hpp index c50fdd4ca565..2c659a40ffbd 100644 --- a/rerun_cpp/src/rerun/components/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/components/disconnected_space.hpp @@ -3,6 +3,7 @@ #pragma once +#include "../compiler_utils.hpp" #include "../component_descriptor.hpp" #include "../datatypes/bool.hpp" #include "../result.hpp" @@ -51,6 +52,9 @@ namespace rerun::components { }; } // namespace rerun::components +RR_PUSH_WARNINGS +RR_DISABLE_DEPRECATION_WARNING + namespace rerun { static_assert(sizeof(rerun::datatypes::Bool) == sizeof(components::DisconnectedSpace)); @@ -84,3 +88,5 @@ namespace rerun { } }; } // namespace rerun + +RR_POP_WARNINGS diff --git a/rerun_cpp/tests/archetypes/disconnected_space.cpp b/rerun_cpp/tests/archetypes/disconnected_space.cpp index 35296b67d53b..e20f3f7c38bf 100644 --- a/rerun_cpp/tests/archetypes/disconnected_space.cpp +++ b/rerun_cpp/tests/archetypes/disconnected_space.cpp @@ -1,5 +1,7 @@ #include "archetype_test.hpp" +RR_DISABLE_DEPRECATION_WARNING + #include using namespace rerun::archetypes; diff --git a/tests/cpp/roundtrips/disconnected_space/main.cpp b/tests/cpp/roundtrips/disconnected_space/main.cpp index 5731ed47a0a1..caba6f07d892 100644 --- a/tests/cpp/roundtrips/disconnected_space/main.cpp +++ b/tests/cpp/roundtrips/disconnected_space/main.cpp @@ -1,3 +1,8 @@ +#include + +// DisconnectedSpace is deprecated and will be removed in the future. +RR_DISABLE_DEPRECATION_WARNING + #include #include From ed1756dfdf9434064305ad5f388becdd6b643a2f Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 18:18:29 +0100 Subject: [PATCH 08/13] extra deprecation warning suppression for cpp (unfortunately messes with some whitespace --- .../re_types_builder/src/codegen/cpp/mod.rs | 71 ++++++++++--------- .../rerun/archetypes/annotation_context.cpp | 3 +- rerun_cpp/src/rerun/archetypes/arrows2d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/arrows3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/asset3d.cpp | 3 +- .../src/rerun/archetypes/asset_video.cpp | 3 +- rerun_cpp/src/rerun/archetypes/bar_chart.cpp | 3 +- rerun_cpp/src/rerun/archetypes/boxes2d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/boxes3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/capsules3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/clear.cpp | 3 +- .../src/rerun/archetypes/depth_image.cpp | 3 +- .../rerun/archetypes/disconnected_space.cpp | 7 +- .../src/rerun/archetypes/ellipsoids3d.cpp | 3 +- .../src/rerun/archetypes/encoded_image.cpp | 3 +- .../src/rerun/archetypes/geo_line_strings.cpp | 3 +- rerun_cpp/src/rerun/archetypes/geo_points.cpp | 3 +- .../src/rerun/archetypes/graph_edges.cpp | 3 +- .../src/rerun/archetypes/graph_nodes.cpp | 3 +- rerun_cpp/src/rerun/archetypes/image.cpp | 3 +- .../src/rerun/archetypes/instance_poses3d.cpp | 3 +- .../src/rerun/archetypes/line_strips2d.cpp | 3 +- .../src/rerun/archetypes/line_strips3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/mesh3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/pinhole.cpp | 3 +- rerun_cpp/src/rerun/archetypes/points2d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/points3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/scalar.cpp | 3 +- .../rerun/archetypes/segmentation_image.cpp | 3 +- .../src/rerun/archetypes/series_line.cpp | 3 +- .../src/rerun/archetypes/series_point.cpp | 3 +- rerun_cpp/src/rerun/archetypes/tensor.cpp | 3 +- .../src/rerun/archetypes/text_document.cpp | 3 +- rerun_cpp/src/rerun/archetypes/text_log.cpp | 3 +- .../src/rerun/archetypes/transform3d.cpp | 3 +- .../archetypes/video_frame_reference.cpp | 3 +- .../src/rerun/archetypes/view_coordinates.cpp | 3 +- .../rerun/blueprint/archetypes/background.cpp | 3 +- .../archetypes/container_blueprint.cpp | 3 +- .../blueprint/archetypes/dataframe_query.cpp | 3 +- .../blueprint/archetypes/force_center.cpp | 3 +- .../archetypes/force_collision_radius.cpp | 3 +- .../rerun/blueprint/archetypes/force_link.cpp | 3 +- .../blueprint/archetypes/force_many_body.cpp | 3 +- .../blueprint/archetypes/force_position.cpp | 3 +- .../blueprint/archetypes/line_grid3d.cpp | 3 +- .../blueprint/archetypes/map_background.cpp | 3 +- .../rerun/blueprint/archetypes/map_zoom.cpp | 3 +- .../blueprint/archetypes/panel_blueprint.cpp | 3 +- .../blueprint/archetypes/plot_legend.cpp | 3 +- .../blueprint/archetypes/scalar_axis.cpp | 3 +- .../archetypes/tensor_scalar_mapping.cpp | 3 +- .../archetypes/tensor_slice_selection.cpp | 3 +- .../blueprint/archetypes/tensor_view_fit.cpp | 3 +- .../blueprint/archetypes/view_blueprint.cpp | 3 +- .../blueprint/archetypes/view_contents.cpp | 3 +- .../archetypes/viewport_blueprint.cpp | 3 +- .../archetypes/visible_time_ranges.cpp | 3 +- .../blueprint/archetypes/visual_bounds2d.cpp | 3 +- .../datatypes/component_column_selector.cpp | 3 +- .../blueprint/datatypes/filter_by_range.cpp | 3 +- .../datatypes/filter_is_not_null.cpp | 3 +- .../blueprint/datatypes/selected_columns.cpp | 3 +- .../rerun/components/annotation_context.cpp | 3 +- .../src/rerun/components/geo_line_string.cpp | 3 +- .../src/rerun/components/line_strip2d.cpp | 3 +- .../src/rerun/components/line_strip3d.cpp | 3 +- .../src/rerun/datatypes/annotation_info.cpp | 1 - .../src/rerun/datatypes/class_description.cpp | 3 +- .../datatypes/class_description_map_elem.cpp | 3 +- .../src/rerun/datatypes/image_format.cpp | 3 +- .../src/rerun/datatypes/keypoint_pair.cpp | 3 +- rerun_cpp/src/rerun/datatypes/range2d.cpp | 3 +- .../rerun/datatypes/rotation_axis_angle.cpp | 3 +- rerun_cpp/src/rerun/datatypes/tensor_data.cpp | 3 +- rerun_cpp/src/rerun/datatypes/time_range.cpp | 1 - .../rerun/datatypes/time_range_boundary.cpp | 3 +- rerun_cpp/src/rerun/datatypes/utf8pair.cpp | 3 +- .../rerun/datatypes/visible_time_range.cpp | 3 +- .../generated/components/affix_fuzzer15.cpp | 3 +- .../generated/components/affix_fuzzer16.cpp | 3 +- .../generated/components/affix_fuzzer17.cpp | 3 +- .../generated/components/affix_fuzzer18.cpp | 3 +- .../generated/components/affix_fuzzer22.cpp | 3 +- .../generated/components/affix_fuzzer23.cpp | 3 +- .../generated/components/affix_fuzzer4.cpp | 3 +- .../generated/components/affix_fuzzer5.cpp | 3 +- .../generated/components/affix_fuzzer6.cpp | 3 +- .../generated/components/affix_fuzzer7.cpp | 3 +- .../generated/datatypes/affix_fuzzer1.cpp | 1 - .../generated/datatypes/affix_fuzzer20.cpp | 1 - .../generated/datatypes/affix_fuzzer3.cpp | 3 +- .../generated/datatypes/affix_fuzzer4.cpp | 3 +- .../generated/datatypes/affix_fuzzer5.cpp | 3 +- .../tests/generated/datatypes/multi_enum.cpp | 3 +- 95 files changed, 129 insertions(+), 220 deletions(-) diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index 5ddd5528b16d..d8eeb7ba4160 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -366,21 +366,12 @@ fn generate_hpp_cpp( ) -> Result<(TokenStream, Option)> { let QuotedObject { hpp, cpp } = QuotedObject::new(reporter, objects, obj, hpp_includes, hpp_type_extensions)?; - let snake_case_name = obj.snake_case_name(); - let hash = quote! { # }; let pragma_once = pragma_once(); - let header_file_name = format!("{snake_case_name}.hpp"); let hpp = quote! { #pragma_once #hpp }; - let cpp = cpp.map(|cpp| { - quote! { - #hash include #header_file_name #NEWLINE_TOKEN #NEWLINE_TOKEN - #cpp - } - }); Ok((hpp, cpp)) } @@ -454,6 +445,7 @@ impl QuotedObject { let quoted_docs = quote_obj_docs(reporter, objects, obj); let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); + cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); cpp_includes.insert_rerun("collection_adapter_builtins.hpp"); hpp_includes.insert_system("utility"); // std::move hpp_includes.insert_rerun("indicator_component.hpp"); @@ -567,19 +559,17 @@ impl QuotedObject { format!("{}Indicator", obj.fqname).replace("archetypes", "components"); let doc_hide_comment = quote_hide_from_docs(); let deprecation_notice = quote_deprecation_notice(obj); + let has_deprecation = obj.deprecation_notice().is_some(); let (deprecation_ignore_start, deprecation_ignore_end) = - if obj.deprecation_notice().is_some() { - hpp_includes.insert_rerun("compiler_utils.hpp"); - ( - quote! { - RR_PUSH_WARNINGS #NEWLINE_TOKEN - RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN - }, - quote! { RR_POP_WARNINGS }, - ) - } else { - (quote!(), quote!()) - }; + quote_deprecation_ignore_start_and_end(&mut hpp_includes, has_deprecation); + + let extra_compiler_utils_include = if has_deprecation { + let hash = quote! { # }; + let compiler_utils_path = "../compiler_utils.hpp"; + quote! { #hash include #compiler_utils_path #NEWLINE_TOKEN } + } else { + quote! {} + }; let hpp = quote! { #hpp_includes @@ -628,9 +618,11 @@ impl QuotedObject { }; let cpp = quote! { + #extra_compiler_utils_include + #deprecation_ignore_start + #cpp_includes - #deprecation_ignore_start namespace rerun::#quoted_namespace { #(#methods_cpp)* @@ -672,6 +664,7 @@ impl QuotedObject { let deprecation_notice = quote_deprecation_notice(obj); let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); + cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); let mut hpp_declarations = ForwardDecls::default(); let field_declarations = obj @@ -852,6 +845,7 @@ impl QuotedObject { hpp_includes.insert_system("cstring"); // std::memcpy let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); + cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); #[allow(unused)] let mut hpp_declarations = ForwardDecls::default(); @@ -1245,6 +1239,7 @@ impl QuotedObject { let deprecation_notice = quote_deprecation_notice(obj); let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); + cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); let mut hpp_declarations = ForwardDecls::default(); let field_declarations = obj @@ -2591,18 +2586,8 @@ fn quote_loggable_hpp_and_cpp( hpp_includes.insert_rerun("component_descriptor.hpp"); - let (deprecation_ignore_start, deprecation_ignore_end) = if obj.deprecation_notice().is_some() { - hpp_includes.insert_rerun("compiler_utils.hpp"); - ( - quote! { - RR_PUSH_WARNINGS #NEWLINE_TOKEN - RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN - }, - quote! { RR_POP_WARNINGS }, - ) - } else { - (quote!(), quote!()) - }; + let (deprecation_ignore_start, deprecation_ignore_end) = + quote_deprecation_ignore_start_and_end(hpp_includes, obj.deprecation_notice().is_some()); let hpp = quote! { #deprecation_ignore_start @@ -2646,3 +2631,21 @@ fn quote_deprecation_notice(obj: &Object) -> TokenStream { quote! {} } } + +fn quote_deprecation_ignore_start_and_end( + includes: &mut Includes, + should_deprecate: bool, +) -> (TokenStream, TokenStream) { + if should_deprecate { + includes.insert_rerun("compiler_utils.hpp"); + ( + quote! { + RR_PUSH_WARNINGS #NEWLINE_TOKEN + RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN + }, + quote! { RR_POP_WARNINGS }, + ) + } else { + (quote!(), quote!()) + } +} diff --git a/rerun_cpp/src/rerun/archetypes/annotation_context.cpp b/rerun_cpp/src/rerun/archetypes/annotation_context.cpp index 79b5004d00b8..232a706ac3f7 100644 --- a/rerun_cpp/src/rerun/archetypes/annotation_context.cpp +++ b/rerun_cpp/src/rerun/archetypes/annotation_context.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/annotation_context.fbs". -#include "annotation_context.hpp" - #include "../collection_adapter_builtins.hpp" +#include "annotation_context.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/arrows2d.cpp b/rerun_cpp/src/rerun/archetypes/arrows2d.cpp index ee120118aabd..9ddd0da4919b 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/arrows2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/arrows2d.fbs". -#include "arrows2d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "arrows2d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/arrows3d.cpp b/rerun_cpp/src/rerun/archetypes/arrows3d.cpp index 613974c52858..f65152cc9646 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/arrows3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/arrows3d.fbs". -#include "arrows3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "arrows3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/asset3d.cpp b/rerun_cpp/src/rerun/archetypes/asset3d.cpp index 534445449a2c..7d3173422e81 100644 --- a/rerun_cpp/src/rerun/archetypes/asset3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/asset3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/asset3d.fbs". -#include "asset3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "asset3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/asset_video.cpp b/rerun_cpp/src/rerun/archetypes/asset_video.cpp index 2cdce3808707..bbd3cf810f40 100644 --- a/rerun_cpp/src/rerun/archetypes/asset_video.cpp +++ b/rerun_cpp/src/rerun/archetypes/asset_video.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/asset_video.fbs". -#include "asset_video.hpp" - #include "../collection_adapter_builtins.hpp" +#include "asset_video.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/bar_chart.cpp b/rerun_cpp/src/rerun/archetypes/bar_chart.cpp index 626d369ffb2e..0cd6a2ee7c09 100644 --- a/rerun_cpp/src/rerun/archetypes/bar_chart.cpp +++ b/rerun_cpp/src/rerun/archetypes/bar_chart.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/bar_chart.fbs". -#include "bar_chart.hpp" - #include "../collection_adapter_builtins.hpp" +#include "bar_chart.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/boxes2d.cpp b/rerun_cpp/src/rerun/archetypes/boxes2d.cpp index 2433a8159e24..af4c57c595d9 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/boxes2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/boxes2d.fbs". -#include "boxes2d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "boxes2d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/boxes3d.cpp b/rerun_cpp/src/rerun/archetypes/boxes3d.cpp index 09aed4b597b8..fac2a6dc5f95 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/boxes3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/boxes3d.fbs". -#include "boxes3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "boxes3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/capsules3d.cpp b/rerun_cpp/src/rerun/archetypes/capsules3d.cpp index 90de18765748..55f68a5e7d6d 100644 --- a/rerun_cpp/src/rerun/archetypes/capsules3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/capsules3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/capsules3d.fbs". -#include "capsules3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "capsules3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/clear.cpp b/rerun_cpp/src/rerun/archetypes/clear.cpp index 92d248eb2a13..8f1c764cdf7b 100644 --- a/rerun_cpp/src/rerun/archetypes/clear.cpp +++ b/rerun_cpp/src/rerun/archetypes/clear.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/clear.fbs". -#include "clear.hpp" - #include "../collection_adapter_builtins.hpp" +#include "clear.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/depth_image.cpp b/rerun_cpp/src/rerun/archetypes/depth_image.cpp index a84c4a68595e..c0899f78c3a5 100644 --- a/rerun_cpp/src/rerun/archetypes/depth_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/depth_image.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/depth_image.fbs". -#include "depth_image.hpp" - #include "../collection_adapter_builtins.hpp" +#include "depth_image.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp index 4c1ca31b8df6..940ede7f00ca 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp @@ -1,12 +1,11 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs". -#include "disconnected_space.hpp" - -#include "../collection_adapter_builtins.hpp" - +#include "../compiler_utils.hpp" RR_PUSH_WARNINGS RR_DISABLE_DEPRECATION_WARNING +#include "../collection_adapter_builtins.hpp" +#include "disconnected_space.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp index d519c2adf952..c8c04c3f2744 100644 --- a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/ellipsoids3d.fbs". -#include "ellipsoids3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "ellipsoids3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/encoded_image.cpp b/rerun_cpp/src/rerun/archetypes/encoded_image.cpp index ca81939c8f39..c455e5b43c3f 100644 --- a/rerun_cpp/src/rerun/archetypes/encoded_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/encoded_image.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/encoded_image.fbs". -#include "encoded_image.hpp" - #include "../collection_adapter_builtins.hpp" +#include "encoded_image.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp b/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp index 35221f8ce8ae..f50b5fd5f56c 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp +++ b/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/geo_line_strings.fbs". -#include "geo_line_strings.hpp" - #include "../collection_adapter_builtins.hpp" +#include "geo_line_strings.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/geo_points.cpp b/rerun_cpp/src/rerun/archetypes/geo_points.cpp index 2b62c2f800aa..614851c48362 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_points.cpp +++ b/rerun_cpp/src/rerun/archetypes/geo_points.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/geo_points.fbs". -#include "geo_points.hpp" - #include "../collection_adapter_builtins.hpp" +#include "geo_points.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/graph_edges.cpp b/rerun_cpp/src/rerun/archetypes/graph_edges.cpp index 3c95c41b2797..a95e9b6d868c 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_edges.cpp +++ b/rerun_cpp/src/rerun/archetypes/graph_edges.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/graph_edges.fbs". -#include "graph_edges.hpp" - #include "../collection_adapter_builtins.hpp" +#include "graph_edges.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp b/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp index c130e47eddd6..7717c404f34e 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp +++ b/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/graph_nodes.fbs". -#include "graph_nodes.hpp" - #include "../collection_adapter_builtins.hpp" +#include "graph_nodes.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/image.cpp b/rerun_cpp/src/rerun/archetypes/image.cpp index 6b6bd5a51a59..a9cbbc7b77b6 100644 --- a/rerun_cpp/src/rerun/archetypes/image.cpp +++ b/rerun_cpp/src/rerun/archetypes/image.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/image.fbs". -#include "image.hpp" - #include "../collection_adapter_builtins.hpp" +#include "image.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp b/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp index c30de2bcd51e..029b01f00894 100644 --- a/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/instance_poses3d.fbs". -#include "instance_poses3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "instance_poses3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp b/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp index a6611651cd98..2ad7020190bb 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/line_strips2d.fbs". -#include "line_strips2d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "line_strips2d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp b/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp index 3f3f0bf021c9..41265a38ad3b 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/line_strips3d.fbs". -#include "line_strips3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "line_strips3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/mesh3d.cpp b/rerun_cpp/src/rerun/archetypes/mesh3d.cpp index a55b9310d1c1..601710bf96cf 100644 --- a/rerun_cpp/src/rerun/archetypes/mesh3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/mesh3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/mesh3d.fbs". -#include "mesh3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "mesh3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/pinhole.cpp b/rerun_cpp/src/rerun/archetypes/pinhole.cpp index 27582e7914f8..682775cd9317 100644 --- a/rerun_cpp/src/rerun/archetypes/pinhole.cpp +++ b/rerun_cpp/src/rerun/archetypes/pinhole.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/pinhole.fbs". -#include "pinhole.hpp" - #include "../collection_adapter_builtins.hpp" +#include "pinhole.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/points2d.cpp b/rerun_cpp/src/rerun/archetypes/points2d.cpp index 56aadab05adc..109b8cd23fe9 100644 --- a/rerun_cpp/src/rerun/archetypes/points2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/points2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/points2d.fbs". -#include "points2d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "points2d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/points3d.cpp b/rerun_cpp/src/rerun/archetypes/points3d.cpp index 45992227d6b7..f486a973fe94 100644 --- a/rerun_cpp/src/rerun/archetypes/points3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/points3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/points3d.fbs". -#include "points3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "points3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/scalar.cpp b/rerun_cpp/src/rerun/archetypes/scalar.cpp index cd98fd18ad2b..c808760aee5b 100644 --- a/rerun_cpp/src/rerun/archetypes/scalar.cpp +++ b/rerun_cpp/src/rerun/archetypes/scalar.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/scalar.fbs". -#include "scalar.hpp" - #include "../collection_adapter_builtins.hpp" +#include "scalar.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp b/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp index d5463fd7c5a7..e163f8ab3b9b 100644 --- a/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/segmentation_image.fbs". -#include "segmentation_image.hpp" - #include "../collection_adapter_builtins.hpp" +#include "segmentation_image.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/series_line.cpp b/rerun_cpp/src/rerun/archetypes/series_line.cpp index c91dea4a1178..bf1194965ec2 100644 --- a/rerun_cpp/src/rerun/archetypes/series_line.cpp +++ b/rerun_cpp/src/rerun/archetypes/series_line.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/series_line.fbs". -#include "series_line.hpp" - #include "../collection_adapter_builtins.hpp" +#include "series_line.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/series_point.cpp b/rerun_cpp/src/rerun/archetypes/series_point.cpp index 216ad86a7f4f..72cfac93c25a 100644 --- a/rerun_cpp/src/rerun/archetypes/series_point.cpp +++ b/rerun_cpp/src/rerun/archetypes/series_point.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/series_point.fbs". -#include "series_point.hpp" - #include "../collection_adapter_builtins.hpp" +#include "series_point.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/tensor.cpp b/rerun_cpp/src/rerun/archetypes/tensor.cpp index dd73253e9df0..16009b8c71da 100644 --- a/rerun_cpp/src/rerun/archetypes/tensor.cpp +++ b/rerun_cpp/src/rerun/archetypes/tensor.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/tensor.fbs". -#include "tensor.hpp" - #include "../collection_adapter_builtins.hpp" +#include "tensor.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/text_document.cpp b/rerun_cpp/src/rerun/archetypes/text_document.cpp index e6c9e0530ea7..6c2a6b91d953 100644 --- a/rerun_cpp/src/rerun/archetypes/text_document.cpp +++ b/rerun_cpp/src/rerun/archetypes/text_document.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/text_document.fbs". -#include "text_document.hpp" - #include "../collection_adapter_builtins.hpp" +#include "text_document.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/text_log.cpp b/rerun_cpp/src/rerun/archetypes/text_log.cpp index 2b5baa4caa3f..26b1604737db 100644 --- a/rerun_cpp/src/rerun/archetypes/text_log.cpp +++ b/rerun_cpp/src/rerun/archetypes/text_log.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/text_log.fbs". -#include "text_log.hpp" - #include "../collection_adapter_builtins.hpp" +#include "text_log.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.cpp b/rerun_cpp/src/rerun/archetypes/transform3d.cpp index d75e3b616af6..bed89702afb2 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs". -#include "transform3d.hpp" - #include "../collection_adapter_builtins.hpp" +#include "transform3d.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp b/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp index 5b489a53aab4..d9e2cda63584 100644 --- a/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp +++ b/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/video_frame_reference.fbs". -#include "video_frame_reference.hpp" - #include "../collection_adapter_builtins.hpp" +#include "video_frame_reference.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp b/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp index 028b7c36a88b..0b60e12ce129 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/view_coordinates.fbs". -#include "view_coordinates.hpp" - #include "../collection_adapter_builtins.hpp" +#include "view_coordinates.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp index da81f2e5cc17..17fffd8c814d 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/background.fbs". -#include "background.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "background.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp index 8e197acfea17..af35d9b50c48 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/container_blueprint.fbs". -#include "container_blueprint.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "container_blueprint.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp index f24cf3f2b6a3..802968d4fdd6 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs". -#include "dataframe_query.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "dataframe_query.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp index a05527d07e18..06c9d499b2fe 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_center.fbs". -#include "force_center.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "force_center.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp index 1fd8539d8a54..d03feb5c8a21 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_collision_radius.fbs". -#include "force_collision_radius.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "force_collision_radius.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp index 7cda317fa91b..ff26f7ad5018 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_link.fbs". -#include "force_link.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "force_link.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp index 58a115516b29..a9a614c9e7cb 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_many_body.fbs". -#include "force_many_body.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "force_many_body.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp index d30542673513..2a706a563c6b 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_position.fbs". -#include "force_position.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "force_position.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp index fffa50ee1e49..c7fa72163ddb 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/line_grid3d.fbs". -#include "line_grid3d.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "line_grid3d.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp index 47e424f3ea5f..0cbd71236599 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/map_background.fbs". -#include "map_background.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "map_background.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp index fa5393a4f11a..096eb20d41c5 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/map_zoom.fbs". -#include "map_zoom.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "map_zoom.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp index 9a1167cd7efd..6990b0a3cc27 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/panel_blueprint.fbs". -#include "panel_blueprint.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "panel_blueprint.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp index 9533c1371c0b..0893014c37aa 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/plot_legend.fbs". -#include "plot_legend.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "plot_legend.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp index da9db9ccec3a..bff29ff4c071 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/scalar_axis.fbs". -#include "scalar_axis.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "scalar_axis.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp index c5cfdb319373..463858c320ed 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/tensor_scalar_mapping.fbs". -#include "tensor_scalar_mapping.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "tensor_scalar_mapping.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp index 59de883f0b2c..159936f28105 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/tensor_slice_selection.fbs". -#include "tensor_slice_selection.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "tensor_slice_selection.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp index 0cd0674ea46d..d9333afefb87 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/tensor_view_fit.fbs". -#include "tensor_view_fit.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "tensor_view_fit.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp index 4ce5f6614fe7..d75ffdfdafc1 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/view_blueprint.fbs". -#include "view_blueprint.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "view_blueprint.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp index 4a506dfae983..5e7568c74afc 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/view_contents.fbs". -#include "view_contents.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "view_contents.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp index 40accef09eb8..671eee346f97 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/viewport_blueprint.fbs". -#include "viewport_blueprint.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "viewport_blueprint.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp index 2decd46e74f0..878da48aa7e5 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/visible_time_ranges.fbs". -#include "visible_time_ranges.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "visible_time_ranges.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp index d5756b46e0ef..7567ab03d44a 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/visual_bounds2d.fbs". -#include "visual_bounds2d.hpp" - #include "../../collection_adapter_builtins.hpp" +#include "visual_bounds2d.hpp" namespace rerun::blueprint::archetypes {} diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp index 8f1cf763182d..a06531b56912 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp @@ -1,10 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/component_column_selector.fbs". -#include "component_column_selector.hpp" - #include "../../datatypes/entity_path.hpp" #include "../../datatypes/utf8.hpp" +#include "component_column_selector.hpp" #include #include diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp index 78ba99789bd4..39bfc4e9b7bb 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/filter_by_range.fbs". -#include "filter_by_range.hpp" - #include "../../datatypes/time_int.hpp" +#include "filter_by_range.hpp" #include #include diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp index 4c9653f934af..4f45640390ca 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp @@ -1,10 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/filter_is_not_null.fbs". -#include "filter_is_not_null.hpp" - #include "../../datatypes/bool.hpp" #include "component_column_selector.hpp" +#include "filter_is_not_null.hpp" #include #include diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp index df48039456c4..0844f464e272 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp @@ -1,10 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/selected_columns.fbs". -#include "selected_columns.hpp" - #include "../../datatypes/utf8.hpp" #include "component_column_selector.hpp" +#include "selected_columns.hpp" #include #include diff --git a/rerun_cpp/src/rerun/components/annotation_context.cpp b/rerun_cpp/src/rerun/components/annotation_context.cpp index 9d846c9a61fb..779467f6ce6d 100644 --- a/rerun_cpp/src/rerun/components/annotation_context.cpp +++ b/rerun_cpp/src/rerun/components/annotation_context.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/annotation_context.fbs". -#include "annotation_context.hpp" - #include "../datatypes/class_description_map_elem.hpp" +#include "annotation_context.hpp" #include #include diff --git a/rerun_cpp/src/rerun/components/geo_line_string.cpp b/rerun_cpp/src/rerun/components/geo_line_string.cpp index 05cf6c8bf846..a4fb59c13296 100644 --- a/rerun_cpp/src/rerun/components/geo_line_string.cpp +++ b/rerun_cpp/src/rerun/components/geo_line_string.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/geo_line_string.fbs". -#include "geo_line_string.hpp" - #include "../datatypes/dvec2d.hpp" +#include "geo_line_string.hpp" #include #include diff --git a/rerun_cpp/src/rerun/components/line_strip2d.cpp b/rerun_cpp/src/rerun/components/line_strip2d.cpp index 561a86d0c9fe..b2382d301ea0 100644 --- a/rerun_cpp/src/rerun/components/line_strip2d.cpp +++ b/rerun_cpp/src/rerun/components/line_strip2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/line_strip2d.fbs". -#include "line_strip2d.hpp" - #include "../datatypes/vec2d.hpp" +#include "line_strip2d.hpp" #include #include diff --git a/rerun_cpp/src/rerun/components/line_strip3d.cpp b/rerun_cpp/src/rerun/components/line_strip3d.cpp index 5a8db8adc752..bbcdbff549d2 100644 --- a/rerun_cpp/src/rerun/components/line_strip3d.cpp +++ b/rerun_cpp/src/rerun/components/line_strip3d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/line_strip3d.fbs". -#include "line_strip3d.hpp" - #include "../datatypes/vec3d.hpp" +#include "line_strip3d.hpp" #include #include diff --git a/rerun_cpp/src/rerun/datatypes/annotation_info.cpp b/rerun_cpp/src/rerun/datatypes/annotation_info.cpp index 63a2585e6e21..3e127e01303c 100644 --- a/rerun_cpp/src/rerun/datatypes/annotation_info.cpp +++ b/rerun_cpp/src/rerun/datatypes/annotation_info.cpp @@ -2,7 +2,6 @@ // Based on "crates/store/re_types/definitions/rerun/datatypes/annotation_info.fbs". #include "annotation_info.hpp" - #include "rgba32.hpp" #include "utf8.hpp" diff --git a/rerun_cpp/src/rerun/datatypes/class_description.cpp b/rerun_cpp/src/rerun/datatypes/class_description.cpp index 40bfbf575c6c..2af14a6e5549 100644 --- a/rerun_cpp/src/rerun/datatypes/class_description.cpp +++ b/rerun_cpp/src/rerun/datatypes/class_description.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/class_description.fbs". -#include "class_description.hpp" - #include "annotation_info.hpp" +#include "class_description.hpp" #include "keypoint_pair.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp b/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp index 646328ddcabe..4415d1d63501 100644 --- a/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp +++ b/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/class_description_map_elem.fbs". -#include "class_description_map_elem.hpp" - #include "class_description.hpp" +#include "class_description_map_elem.hpp" #include "class_id.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/image_format.cpp b/rerun_cpp/src/rerun/datatypes/image_format.cpp index f0c990f20b83..5069416c7ff0 100644 --- a/rerun_cpp/src/rerun/datatypes/image_format.cpp +++ b/rerun_cpp/src/rerun/datatypes/image_format.cpp @@ -1,10 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/image_format.fbs". -#include "image_format.hpp" - #include "channel_datatype.hpp" #include "color_model.hpp" +#include "image_format.hpp" #include "pixel_format.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp b/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp index 896d1eea5d9c..9f9d22aae57a 100644 --- a/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp +++ b/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/keypoint_pair.fbs". -#include "keypoint_pair.hpp" - #include "keypoint_id.hpp" +#include "keypoint_pair.hpp" #include #include diff --git a/rerun_cpp/src/rerun/datatypes/range2d.cpp b/rerun_cpp/src/rerun/datatypes/range2d.cpp index d4f5c60ce96b..0e0b5255f4ae 100644 --- a/rerun_cpp/src/rerun/datatypes/range2d.cpp +++ b/rerun_cpp/src/rerun/datatypes/range2d.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/range2d.fbs". -#include "range2d.hpp" - #include "range1d.hpp" +#include "range2d.hpp" #include #include diff --git a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp index 8f047dd15c0f..5d5ac4d22d63 100644 --- a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp +++ b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs". -#include "rotation_axis_angle.hpp" - #include "angle.hpp" +#include "rotation_axis_angle.hpp" #include "vec3d.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/tensor_data.cpp b/rerun_cpp/src/rerun/datatypes/tensor_data.cpp index dfaa17f489c0..64a90a4f25c4 100644 --- a/rerun_cpp/src/rerun/datatypes/tensor_data.cpp +++ b/rerun_cpp/src/rerun/datatypes/tensor_data.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/tensor_data.fbs". -#include "tensor_data.hpp" - #include "tensor_buffer.hpp" +#include "tensor_data.hpp" #include "tensor_dimension.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/time_range.cpp b/rerun_cpp/src/rerun/datatypes/time_range.cpp index 18c22a7dc1d4..bf08ca0c2742 100644 --- a/rerun_cpp/src/rerun/datatypes/time_range.cpp +++ b/rerun_cpp/src/rerun/datatypes/time_range.cpp @@ -2,7 +2,6 @@ // Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs". #include "time_range.hpp" - #include "time_range_boundary.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp b/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp index cd33f7186ffa..f811bcbe1c28 100644 --- a/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp +++ b/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs". -#include "time_range_boundary.hpp" - #include "time_int.hpp" +#include "time_range_boundary.hpp" #include #include diff --git a/rerun_cpp/src/rerun/datatypes/utf8pair.cpp b/rerun_cpp/src/rerun/datatypes/utf8pair.cpp index 2014e39616e5..ffc3479c921b 100644 --- a/rerun_cpp/src/rerun/datatypes/utf8pair.cpp +++ b/rerun_cpp/src/rerun/datatypes/utf8pair.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/utf8_pair.fbs". -#include "utf8pair.hpp" - #include "utf8.hpp" +#include "utf8pair.hpp" #include #include diff --git a/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp b/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp index 314a8639dc7f..6c8ce61d8a80 100644 --- a/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp +++ b/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp @@ -1,10 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs". -#include "visible_time_range.hpp" - #include "time_range.hpp" #include "utf8.hpp" +#include "visible_time_range.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp index 8de038608077..7f5cc172ad44 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer15.hpp" - #include "../datatypes/affix_fuzzer3.hpp" +#include "affix_fuzzer15.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp index 4bbe913a2a38..fcdd548a2970 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer16.hpp" - #include "../datatypes/affix_fuzzer3.hpp" +#include "affix_fuzzer16.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp index 7fe3e9dd7746..c2560e1c72f1 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer17.hpp" - #include "../datatypes/affix_fuzzer3.hpp" +#include "affix_fuzzer17.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp index 4677e85ee015..8bc03ae053c4 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer18.hpp" - #include "../datatypes/affix_fuzzer4.hpp" +#include "affix_fuzzer18.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp index 75a7dd2f8aa0..c16f20167da9 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer22.hpp" - #include "../datatypes/affix_fuzzer22.hpp" +#include "affix_fuzzer22.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp index 31b13bf308e0..1e72248e1652 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer23.hpp" - #include "../datatypes/multi_enum.hpp" +#include "affix_fuzzer23.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp index 8fc8e76ac0d2..e1d943e43612 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer4.hpp" - #include "../datatypes/affix_fuzzer1.hpp" +#include "affix_fuzzer4.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp index f0448cc21227..39902bbfba71 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer5.hpp" - #include "../datatypes/affix_fuzzer1.hpp" +#include "affix_fuzzer5.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp index 3139cc83b690..9486ac6ed076 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer6.hpp" - #include "../datatypes/affix_fuzzer1.hpp" +#include "affix_fuzzer6.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp index 38fcae0d788b..019dd8f3a2b5 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "affix_fuzzer7.hpp" - #include "../datatypes/affix_fuzzer1.hpp" +#include "affix_fuzzer7.hpp" #include #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp index 72943439ecf1..24237c42f2d5 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp @@ -2,7 +2,6 @@ // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". #include "affix_fuzzer1.hpp" - #include "flattened_scalar.hpp" #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp index b66ef4f25c80..455688bff4f5 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp @@ -2,7 +2,6 @@ // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". #include "affix_fuzzer20.hpp" - #include "primitive_component.hpp" #include "string_component.hpp" diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp index 9ee5f26242b2..fb0e2a3b4408 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". -#include "affix_fuzzer3.hpp" - #include "affix_fuzzer1.hpp" +#include "affix_fuzzer3.hpp" #include #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp index a5d65655006a..6fe5713554c7 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". -#include "affix_fuzzer4.hpp" - #include "affix_fuzzer3.hpp" +#include "affix_fuzzer4.hpp" #include #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp index b7f03dbe5f9a..655c1fe4d76d 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". -#include "affix_fuzzer5.hpp" - #include "affix_fuzzer4.hpp" +#include "affix_fuzzer5.hpp" #include #include diff --git a/rerun_cpp/tests/generated/datatypes/multi_enum.cpp b/rerun_cpp/tests/generated/datatypes/multi_enum.cpp index ea4c2cdb47ea..a4942054461d 100644 --- a/rerun_cpp/tests/generated/datatypes/multi_enum.cpp +++ b/rerun_cpp/tests/generated/datatypes/multi_enum.cpp @@ -1,9 +1,8 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/enum_test.fbs". -#include "multi_enum.hpp" - #include "enum_test.hpp" +#include "multi_enum.hpp" #include "valued_enum.hpp" #include From 261df817f34904b0a85b4e8c00876430d3318b90 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 18:20:36 +0100 Subject: [PATCH 09/13] fix rust deprecation warning --- docs/snippets/all/archetypes/disconnected_space.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/snippets/all/archetypes/disconnected_space.rs b/docs/snippets/all/archetypes/disconnected_space.rs index 9f2d49ae2b42..250f8018cbea 100644 --- a/docs/snippets/all/archetypes/disconnected_space.rs +++ b/docs/snippets/all/archetypes/disconnected_space.rs @@ -1,5 +1,9 @@ //! Disconnect two spaces. +// `DisconnectedSpace` is deprecated and will be removed in the future. +// Use an invalid transform (e.g. zeroed out 3x3 matrix) instead. +#![allow(deprecated)] + fn main() -> Result<(), Box> { let rec = rerun::RecordingStreamBuilder::new("rerun_example_disconnected_space").spawn()?; From af700f0abfee5b33a8fff922fb3809add7a695b5 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 18:27:55 +0100 Subject: [PATCH 10/13] remove disconnected space test. was too hard to preserve it with deprecation warnings and it doesn't do much --- .../tests/unit/test_disconnected_space.py | 25 ------------------- 1 file changed, 25 deletions(-) delete mode 100644 rerun_py/tests/unit/test_disconnected_space.py diff --git a/rerun_py/tests/unit/test_disconnected_space.py b/rerun_py/tests/unit/test_disconnected_space.py deleted file mode 100644 index d66730f0d136..000000000000 --- a/rerun_py/tests/unit/test_disconnected_space.py +++ /dev/null @@ -1,25 +0,0 @@ -from __future__ import annotations - -import rerun as rr -from rerun.components import DisconnectedSpace, DisconnectedSpaceBatch -from rerun.datatypes.bool import BoolLike - - -def test_disconnected_space() -> None: - disconnected_spaces: list[BoolLike] = [ - # DisconnectedSpaceLike: bool - True, - # DisconnectedSpaceLike: DisconnectedSpace - DisconnectedSpace(), - ] - - for disconnected_space in disconnected_spaces: - print(f"rr.DisconnectedSpace(\n" f" disconnected_space={disconnected_space}\n" f")") - arch = rr.DisconnectedSpace(disconnected_space) - print(f"{arch}\n") - - assert arch.disconnected_space == DisconnectedSpaceBatch([True]) - - -if __name__ == "__main__": - test_disconnected_space() From f52884a80a0eb4180ed9cf6409d204745ee99469 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 18:28:34 +0100 Subject: [PATCH 11/13] Don't make single plane collapse be an invalid transform Co-authored-by: Jeremy Leibs --- crates/viewer/re_view_spatial/src/contexts/transform_context.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/viewer/re_view_spatial/src/contexts/transform_context.rs b/crates/viewer/re_view_spatial/src/contexts/transform_context.rs index 8a2264f81295..b533536755a7 100644 --- a/crates/viewer/re_view_spatial/src/contexts/transform_context.rs +++ b/crates/viewer/re_view_spatial/src/contexts/transform_context.rs @@ -568,7 +568,7 @@ fn query_and_resolve_tree_transform_at_entity( } } if let Some(scale) = result.component_instance::(0) { - if scale.x() == 0.0 || scale.y() == 0.0 || scale.z() == 0.0 { + if scale.x() == 0.0 && scale.y() == 0.0 && scale.z() == 0.0 { // Invalid scale. return None; } From 28173bb6fd2cd801766a4e54c91a108672cf94d1 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 18:29:45 +0100 Subject: [PATCH 12/13] Revert "extra deprecation warning suppression for cpp (unfortunately messes with some whitespace" This reverts commit ed1756dfdf9434064305ad5f388becdd6b643a2f. --- .../re_types_builder/src/codegen/cpp/mod.rs | 71 +++++++++---------- .../rerun/archetypes/annotation_context.cpp | 3 +- rerun_cpp/src/rerun/archetypes/arrows2d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/arrows3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/asset3d.cpp | 3 +- .../src/rerun/archetypes/asset_video.cpp | 3 +- rerun_cpp/src/rerun/archetypes/bar_chart.cpp | 3 +- rerun_cpp/src/rerun/archetypes/boxes2d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/boxes3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/capsules3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/clear.cpp | 3 +- .../src/rerun/archetypes/depth_image.cpp | 3 +- .../rerun/archetypes/disconnected_space.cpp | 7 +- .../src/rerun/archetypes/ellipsoids3d.cpp | 3 +- .../src/rerun/archetypes/encoded_image.cpp | 3 +- .../src/rerun/archetypes/geo_line_strings.cpp | 3 +- rerun_cpp/src/rerun/archetypes/geo_points.cpp | 3 +- .../src/rerun/archetypes/graph_edges.cpp | 3 +- .../src/rerun/archetypes/graph_nodes.cpp | 3 +- rerun_cpp/src/rerun/archetypes/image.cpp | 3 +- .../src/rerun/archetypes/instance_poses3d.cpp | 3 +- .../src/rerun/archetypes/line_strips2d.cpp | 3 +- .../src/rerun/archetypes/line_strips3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/mesh3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/pinhole.cpp | 3 +- rerun_cpp/src/rerun/archetypes/points2d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/points3d.cpp | 3 +- rerun_cpp/src/rerun/archetypes/scalar.cpp | 3 +- .../rerun/archetypes/segmentation_image.cpp | 3 +- .../src/rerun/archetypes/series_line.cpp | 3 +- .../src/rerun/archetypes/series_point.cpp | 3 +- rerun_cpp/src/rerun/archetypes/tensor.cpp | 3 +- .../src/rerun/archetypes/text_document.cpp | 3 +- rerun_cpp/src/rerun/archetypes/text_log.cpp | 3 +- .../src/rerun/archetypes/transform3d.cpp | 3 +- .../archetypes/video_frame_reference.cpp | 3 +- .../src/rerun/archetypes/view_coordinates.cpp | 3 +- .../rerun/blueprint/archetypes/background.cpp | 3 +- .../archetypes/container_blueprint.cpp | 3 +- .../blueprint/archetypes/dataframe_query.cpp | 3 +- .../blueprint/archetypes/force_center.cpp | 3 +- .../archetypes/force_collision_radius.cpp | 3 +- .../rerun/blueprint/archetypes/force_link.cpp | 3 +- .../blueprint/archetypes/force_many_body.cpp | 3 +- .../blueprint/archetypes/force_position.cpp | 3 +- .../blueprint/archetypes/line_grid3d.cpp | 3 +- .../blueprint/archetypes/map_background.cpp | 3 +- .../rerun/blueprint/archetypes/map_zoom.cpp | 3 +- .../blueprint/archetypes/panel_blueprint.cpp | 3 +- .../blueprint/archetypes/plot_legend.cpp | 3 +- .../blueprint/archetypes/scalar_axis.cpp | 3 +- .../archetypes/tensor_scalar_mapping.cpp | 3 +- .../archetypes/tensor_slice_selection.cpp | 3 +- .../blueprint/archetypes/tensor_view_fit.cpp | 3 +- .../blueprint/archetypes/view_blueprint.cpp | 3 +- .../blueprint/archetypes/view_contents.cpp | 3 +- .../archetypes/viewport_blueprint.cpp | 3 +- .../archetypes/visible_time_ranges.cpp | 3 +- .../blueprint/archetypes/visual_bounds2d.cpp | 3 +- .../datatypes/component_column_selector.cpp | 3 +- .../blueprint/datatypes/filter_by_range.cpp | 3 +- .../datatypes/filter_is_not_null.cpp | 3 +- .../blueprint/datatypes/selected_columns.cpp | 3 +- .../rerun/components/annotation_context.cpp | 3 +- .../src/rerun/components/geo_line_string.cpp | 3 +- .../src/rerun/components/line_strip2d.cpp | 3 +- .../src/rerun/components/line_strip3d.cpp | 3 +- .../src/rerun/datatypes/annotation_info.cpp | 1 + .../src/rerun/datatypes/class_description.cpp | 3 +- .../datatypes/class_description_map_elem.cpp | 3 +- .../src/rerun/datatypes/image_format.cpp | 3 +- .../src/rerun/datatypes/keypoint_pair.cpp | 3 +- rerun_cpp/src/rerun/datatypes/range2d.cpp | 3 +- .../rerun/datatypes/rotation_axis_angle.cpp | 3 +- rerun_cpp/src/rerun/datatypes/tensor_data.cpp | 3 +- rerun_cpp/src/rerun/datatypes/time_range.cpp | 1 + .../rerun/datatypes/time_range_boundary.cpp | 3 +- rerun_cpp/src/rerun/datatypes/utf8pair.cpp | 3 +- .../rerun/datatypes/visible_time_range.cpp | 3 +- .../generated/components/affix_fuzzer15.cpp | 3 +- .../generated/components/affix_fuzzer16.cpp | 3 +- .../generated/components/affix_fuzzer17.cpp | 3 +- .../generated/components/affix_fuzzer18.cpp | 3 +- .../generated/components/affix_fuzzer22.cpp | 3 +- .../generated/components/affix_fuzzer23.cpp | 3 +- .../generated/components/affix_fuzzer4.cpp | 3 +- .../generated/components/affix_fuzzer5.cpp | 3 +- .../generated/components/affix_fuzzer6.cpp | 3 +- .../generated/components/affix_fuzzer7.cpp | 3 +- .../generated/datatypes/affix_fuzzer1.cpp | 1 + .../generated/datatypes/affix_fuzzer20.cpp | 1 + .../generated/datatypes/affix_fuzzer3.cpp | 3 +- .../generated/datatypes/affix_fuzzer4.cpp | 3 +- .../generated/datatypes/affix_fuzzer5.cpp | 3 +- .../tests/generated/datatypes/multi_enum.cpp | 3 +- 95 files changed, 220 insertions(+), 129 deletions(-) diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index d8eeb7ba4160..5ddd5528b16d 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -366,12 +366,21 @@ fn generate_hpp_cpp( ) -> Result<(TokenStream, Option)> { let QuotedObject { hpp, cpp } = QuotedObject::new(reporter, objects, obj, hpp_includes, hpp_type_extensions)?; + let snake_case_name = obj.snake_case_name(); + let hash = quote! { # }; let pragma_once = pragma_once(); + let header_file_name = format!("{snake_case_name}.hpp"); let hpp = quote! { #pragma_once #hpp }; + let cpp = cpp.map(|cpp| { + quote! { + #hash include #header_file_name #NEWLINE_TOKEN #NEWLINE_TOKEN + #cpp + } + }); Ok((hpp, cpp)) } @@ -445,7 +454,6 @@ impl QuotedObject { let quoted_docs = quote_obj_docs(reporter, objects, obj); let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); - cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); cpp_includes.insert_rerun("collection_adapter_builtins.hpp"); hpp_includes.insert_system("utility"); // std::move hpp_includes.insert_rerun("indicator_component.hpp"); @@ -559,17 +567,19 @@ impl QuotedObject { format!("{}Indicator", obj.fqname).replace("archetypes", "components"); let doc_hide_comment = quote_hide_from_docs(); let deprecation_notice = quote_deprecation_notice(obj); - let has_deprecation = obj.deprecation_notice().is_some(); let (deprecation_ignore_start, deprecation_ignore_end) = - quote_deprecation_ignore_start_and_end(&mut hpp_includes, has_deprecation); - - let extra_compiler_utils_include = if has_deprecation { - let hash = quote! { # }; - let compiler_utils_path = "../compiler_utils.hpp"; - quote! { #hash include #compiler_utils_path #NEWLINE_TOKEN } - } else { - quote! {} - }; + if obj.deprecation_notice().is_some() { + hpp_includes.insert_rerun("compiler_utils.hpp"); + ( + quote! { + RR_PUSH_WARNINGS #NEWLINE_TOKEN + RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN + }, + quote! { RR_POP_WARNINGS }, + ) + } else { + (quote!(), quote!()) + }; let hpp = quote! { #hpp_includes @@ -618,11 +628,9 @@ impl QuotedObject { }; let cpp = quote! { - #extra_compiler_utils_include - #deprecation_ignore_start - #cpp_includes + #deprecation_ignore_start namespace rerun::#quoted_namespace { #(#methods_cpp)* @@ -664,7 +672,6 @@ impl QuotedObject { let deprecation_notice = quote_deprecation_notice(obj); let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); - cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); let mut hpp_declarations = ForwardDecls::default(); let field_declarations = obj @@ -845,7 +852,6 @@ impl QuotedObject { hpp_includes.insert_system("cstring"); // std::memcpy let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); - cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); #[allow(unused)] let mut hpp_declarations = ForwardDecls::default(); @@ -1239,7 +1245,6 @@ impl QuotedObject { let deprecation_notice = quote_deprecation_notice(obj); let mut cpp_includes = Includes::new(obj.fqname.clone(), obj.scope()); - cpp_includes.insert_relative(&format!("{}.hpp", obj.snake_case_name())); let mut hpp_declarations = ForwardDecls::default(); let field_declarations = obj @@ -2586,8 +2591,18 @@ fn quote_loggable_hpp_and_cpp( hpp_includes.insert_rerun("component_descriptor.hpp"); - let (deprecation_ignore_start, deprecation_ignore_end) = - quote_deprecation_ignore_start_and_end(hpp_includes, obj.deprecation_notice().is_some()); + let (deprecation_ignore_start, deprecation_ignore_end) = if obj.deprecation_notice().is_some() { + hpp_includes.insert_rerun("compiler_utils.hpp"); + ( + quote! { + RR_PUSH_WARNINGS #NEWLINE_TOKEN + RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN + }, + quote! { RR_POP_WARNINGS }, + ) + } else { + (quote!(), quote!()) + }; let hpp = quote! { #deprecation_ignore_start @@ -2631,21 +2646,3 @@ fn quote_deprecation_notice(obj: &Object) -> TokenStream { quote! {} } } - -fn quote_deprecation_ignore_start_and_end( - includes: &mut Includes, - should_deprecate: bool, -) -> (TokenStream, TokenStream) { - if should_deprecate { - includes.insert_rerun("compiler_utils.hpp"); - ( - quote! { - RR_PUSH_WARNINGS #NEWLINE_TOKEN - RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN - }, - quote! { RR_POP_WARNINGS }, - ) - } else { - (quote!(), quote!()) - } -} diff --git a/rerun_cpp/src/rerun/archetypes/annotation_context.cpp b/rerun_cpp/src/rerun/archetypes/annotation_context.cpp index 232a706ac3f7..79b5004d00b8 100644 --- a/rerun_cpp/src/rerun/archetypes/annotation_context.cpp +++ b/rerun_cpp/src/rerun/archetypes/annotation_context.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/annotation_context.fbs". -#include "../collection_adapter_builtins.hpp" #include "annotation_context.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/arrows2d.cpp b/rerun_cpp/src/rerun/archetypes/arrows2d.cpp index 9ddd0da4919b..ee120118aabd 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/arrows2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/arrows2d.fbs". -#include "../collection_adapter_builtins.hpp" #include "arrows2d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/arrows3d.cpp b/rerun_cpp/src/rerun/archetypes/arrows3d.cpp index f65152cc9646..613974c52858 100644 --- a/rerun_cpp/src/rerun/archetypes/arrows3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/arrows3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/arrows3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "arrows3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/asset3d.cpp b/rerun_cpp/src/rerun/archetypes/asset3d.cpp index 7d3173422e81..534445449a2c 100644 --- a/rerun_cpp/src/rerun/archetypes/asset3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/asset3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/asset3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "asset3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/asset_video.cpp b/rerun_cpp/src/rerun/archetypes/asset_video.cpp index bbd3cf810f40..2cdce3808707 100644 --- a/rerun_cpp/src/rerun/archetypes/asset_video.cpp +++ b/rerun_cpp/src/rerun/archetypes/asset_video.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/asset_video.fbs". -#include "../collection_adapter_builtins.hpp" #include "asset_video.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/bar_chart.cpp b/rerun_cpp/src/rerun/archetypes/bar_chart.cpp index 0cd6a2ee7c09..626d369ffb2e 100644 --- a/rerun_cpp/src/rerun/archetypes/bar_chart.cpp +++ b/rerun_cpp/src/rerun/archetypes/bar_chart.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/bar_chart.fbs". -#include "../collection_adapter_builtins.hpp" #include "bar_chart.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/boxes2d.cpp b/rerun_cpp/src/rerun/archetypes/boxes2d.cpp index af4c57c595d9..2433a8159e24 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/boxes2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/boxes2d.fbs". -#include "../collection_adapter_builtins.hpp" #include "boxes2d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/boxes3d.cpp b/rerun_cpp/src/rerun/archetypes/boxes3d.cpp index fac2a6dc5f95..09aed4b597b8 100644 --- a/rerun_cpp/src/rerun/archetypes/boxes3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/boxes3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/boxes3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "boxes3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/capsules3d.cpp b/rerun_cpp/src/rerun/archetypes/capsules3d.cpp index 55f68a5e7d6d..90de18765748 100644 --- a/rerun_cpp/src/rerun/archetypes/capsules3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/capsules3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/capsules3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "capsules3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/clear.cpp b/rerun_cpp/src/rerun/archetypes/clear.cpp index 8f1c764cdf7b..92d248eb2a13 100644 --- a/rerun_cpp/src/rerun/archetypes/clear.cpp +++ b/rerun_cpp/src/rerun/archetypes/clear.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/clear.fbs". -#include "../collection_adapter_builtins.hpp" #include "clear.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/depth_image.cpp b/rerun_cpp/src/rerun/archetypes/depth_image.cpp index c0899f78c3a5..a84c4a68595e 100644 --- a/rerun_cpp/src/rerun/archetypes/depth_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/depth_image.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/depth_image.fbs". -#include "../collection_adapter_builtins.hpp" #include "depth_image.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp index 940ede7f00ca..4c1ca31b8df6 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.cpp @@ -1,11 +1,12 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/disconnected_space.fbs". -#include "../compiler_utils.hpp" +#include "disconnected_space.hpp" + +#include "../collection_adapter_builtins.hpp" + RR_PUSH_WARNINGS RR_DISABLE_DEPRECATION_WARNING -#include "../collection_adapter_builtins.hpp" -#include "disconnected_space.hpp" namespace rerun::archetypes {} diff --git a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp index c8c04c3f2744..d519c2adf952 100644 --- a/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/ellipsoids3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/ellipsoids3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "ellipsoids3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/encoded_image.cpp b/rerun_cpp/src/rerun/archetypes/encoded_image.cpp index c455e5b43c3f..ca81939c8f39 100644 --- a/rerun_cpp/src/rerun/archetypes/encoded_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/encoded_image.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/encoded_image.fbs". -#include "../collection_adapter_builtins.hpp" #include "encoded_image.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp b/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp index f50b5fd5f56c..35221f8ce8ae 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp +++ b/rerun_cpp/src/rerun/archetypes/geo_line_strings.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/geo_line_strings.fbs". -#include "../collection_adapter_builtins.hpp" #include "geo_line_strings.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/geo_points.cpp b/rerun_cpp/src/rerun/archetypes/geo_points.cpp index 614851c48362..2b62c2f800aa 100644 --- a/rerun_cpp/src/rerun/archetypes/geo_points.cpp +++ b/rerun_cpp/src/rerun/archetypes/geo_points.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/geo_points.fbs". -#include "../collection_adapter_builtins.hpp" #include "geo_points.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/graph_edges.cpp b/rerun_cpp/src/rerun/archetypes/graph_edges.cpp index a95e9b6d868c..3c95c41b2797 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_edges.cpp +++ b/rerun_cpp/src/rerun/archetypes/graph_edges.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/graph_edges.fbs". -#include "../collection_adapter_builtins.hpp" #include "graph_edges.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp b/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp index 7717c404f34e..c130e47eddd6 100644 --- a/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp +++ b/rerun_cpp/src/rerun/archetypes/graph_nodes.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/graph_nodes.fbs". -#include "../collection_adapter_builtins.hpp" #include "graph_nodes.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/image.cpp b/rerun_cpp/src/rerun/archetypes/image.cpp index a9cbbc7b77b6..6b6bd5a51a59 100644 --- a/rerun_cpp/src/rerun/archetypes/image.cpp +++ b/rerun_cpp/src/rerun/archetypes/image.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/image.fbs". -#include "../collection_adapter_builtins.hpp" #include "image.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp b/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp index 029b01f00894..c30de2bcd51e 100644 --- a/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/instance_poses3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/instance_poses3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "instance_poses3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp b/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp index 2ad7020190bb..a6611651cd98 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/line_strips2d.fbs". -#include "../collection_adapter_builtins.hpp" #include "line_strips2d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp b/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp index 41265a38ad3b..3f3f0bf021c9 100644 --- a/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/line_strips3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/line_strips3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "line_strips3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/mesh3d.cpp b/rerun_cpp/src/rerun/archetypes/mesh3d.cpp index 601710bf96cf..a55b9310d1c1 100644 --- a/rerun_cpp/src/rerun/archetypes/mesh3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/mesh3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/mesh3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "mesh3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/pinhole.cpp b/rerun_cpp/src/rerun/archetypes/pinhole.cpp index 682775cd9317..27582e7914f8 100644 --- a/rerun_cpp/src/rerun/archetypes/pinhole.cpp +++ b/rerun_cpp/src/rerun/archetypes/pinhole.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/pinhole.fbs". -#include "../collection_adapter_builtins.hpp" #include "pinhole.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/points2d.cpp b/rerun_cpp/src/rerun/archetypes/points2d.cpp index 109b8cd23fe9..56aadab05adc 100644 --- a/rerun_cpp/src/rerun/archetypes/points2d.cpp +++ b/rerun_cpp/src/rerun/archetypes/points2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/points2d.fbs". -#include "../collection_adapter_builtins.hpp" #include "points2d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/points3d.cpp b/rerun_cpp/src/rerun/archetypes/points3d.cpp index f486a973fe94..45992227d6b7 100644 --- a/rerun_cpp/src/rerun/archetypes/points3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/points3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/points3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "points3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/scalar.cpp b/rerun_cpp/src/rerun/archetypes/scalar.cpp index c808760aee5b..cd98fd18ad2b 100644 --- a/rerun_cpp/src/rerun/archetypes/scalar.cpp +++ b/rerun_cpp/src/rerun/archetypes/scalar.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/scalar.fbs". -#include "../collection_adapter_builtins.hpp" #include "scalar.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp b/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp index e163f8ab3b9b..d5463fd7c5a7 100644 --- a/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp +++ b/rerun_cpp/src/rerun/archetypes/segmentation_image.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/segmentation_image.fbs". -#include "../collection_adapter_builtins.hpp" #include "segmentation_image.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/series_line.cpp b/rerun_cpp/src/rerun/archetypes/series_line.cpp index bf1194965ec2..c91dea4a1178 100644 --- a/rerun_cpp/src/rerun/archetypes/series_line.cpp +++ b/rerun_cpp/src/rerun/archetypes/series_line.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/series_line.fbs". -#include "../collection_adapter_builtins.hpp" #include "series_line.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/series_point.cpp b/rerun_cpp/src/rerun/archetypes/series_point.cpp index 72cfac93c25a..216ad86a7f4f 100644 --- a/rerun_cpp/src/rerun/archetypes/series_point.cpp +++ b/rerun_cpp/src/rerun/archetypes/series_point.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/series_point.fbs". -#include "../collection_adapter_builtins.hpp" #include "series_point.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/tensor.cpp b/rerun_cpp/src/rerun/archetypes/tensor.cpp index 16009b8c71da..dd73253e9df0 100644 --- a/rerun_cpp/src/rerun/archetypes/tensor.cpp +++ b/rerun_cpp/src/rerun/archetypes/tensor.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/tensor.fbs". -#include "../collection_adapter_builtins.hpp" #include "tensor.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/text_document.cpp b/rerun_cpp/src/rerun/archetypes/text_document.cpp index 6c2a6b91d953..e6c9e0530ea7 100644 --- a/rerun_cpp/src/rerun/archetypes/text_document.cpp +++ b/rerun_cpp/src/rerun/archetypes/text_document.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/text_document.fbs". -#include "../collection_adapter_builtins.hpp" #include "text_document.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/text_log.cpp b/rerun_cpp/src/rerun/archetypes/text_log.cpp index 26b1604737db..2b5baa4caa3f 100644 --- a/rerun_cpp/src/rerun/archetypes/text_log.cpp +++ b/rerun_cpp/src/rerun/archetypes/text_log.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/text_log.fbs". -#include "../collection_adapter_builtins.hpp" #include "text_log.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/transform3d.cpp b/rerun_cpp/src/rerun/archetypes/transform3d.cpp index bed89702afb2..d75e3b616af6 100644 --- a/rerun_cpp/src/rerun/archetypes/transform3d.cpp +++ b/rerun_cpp/src/rerun/archetypes/transform3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/transform3d.fbs". -#include "../collection_adapter_builtins.hpp" #include "transform3d.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp b/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp index d9e2cda63584..5b489a53aab4 100644 --- a/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp +++ b/rerun_cpp/src/rerun/archetypes/video_frame_reference.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/video_frame_reference.fbs". -#include "../collection_adapter_builtins.hpp" #include "video_frame_reference.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp b/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp index 0b60e12ce129..028b7c36a88b 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/archetypes/view_coordinates.fbs". -#include "../collection_adapter_builtins.hpp" #include "view_coordinates.hpp" +#include "../collection_adapter_builtins.hpp" + namespace rerun::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp index 17fffd8c814d..da81f2e5cc17 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/background.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/background.fbs". -#include "../../collection_adapter_builtins.hpp" #include "background.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp index af35d9b50c48..8e197acfea17 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/container_blueprint.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/container_blueprint.fbs". -#include "../../collection_adapter_builtins.hpp" #include "container_blueprint.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp index 802968d4fdd6..f24cf3f2b6a3 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/dataframe_query.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/dataframe_query.fbs". -#include "../../collection_adapter_builtins.hpp" #include "dataframe_query.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp index 06c9d499b2fe..a05527d07e18 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_center.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_center.fbs". -#include "../../collection_adapter_builtins.hpp" #include "force_center.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp index d03feb5c8a21..1fd8539d8a54 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_collision_radius.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_collision_radius.fbs". -#include "../../collection_adapter_builtins.hpp" #include "force_collision_radius.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp index ff26f7ad5018..7cda317fa91b 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_link.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_link.fbs". -#include "../../collection_adapter_builtins.hpp" #include "force_link.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp index a9a614c9e7cb..58a115516b29 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_many_body.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_many_body.fbs". -#include "../../collection_adapter_builtins.hpp" #include "force_many_body.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp index 2a706a563c6b..d30542673513 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/force_position.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/force_position.fbs". -#include "../../collection_adapter_builtins.hpp" #include "force_position.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp index c7fa72163ddb..fffa50ee1e49 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/line_grid3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/line_grid3d.fbs". -#include "../../collection_adapter_builtins.hpp" #include "line_grid3d.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp index 0cbd71236599..47e424f3ea5f 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_background.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/map_background.fbs". -#include "../../collection_adapter_builtins.hpp" #include "map_background.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp index 096eb20d41c5..fa5393a4f11a 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/map_zoom.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/map_zoom.fbs". -#include "../../collection_adapter_builtins.hpp" #include "map_zoom.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp index 6990b0a3cc27..9a1167cd7efd 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/panel_blueprint.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/panel_blueprint.fbs". -#include "../../collection_adapter_builtins.hpp" #include "panel_blueprint.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp index 0893014c37aa..9533c1371c0b 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/plot_legend.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/plot_legend.fbs". -#include "../../collection_adapter_builtins.hpp" #include "plot_legend.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp index bff29ff4c071..da9db9ccec3a 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/scalar_axis.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/scalar_axis.fbs". -#include "../../collection_adapter_builtins.hpp" #include "scalar_axis.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp index 463858c320ed..c5cfdb319373 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_scalar_mapping.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/tensor_scalar_mapping.fbs". -#include "../../collection_adapter_builtins.hpp" #include "tensor_scalar_mapping.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp index 159936f28105..59de883f0b2c 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_slice_selection.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/tensor_slice_selection.fbs". -#include "../../collection_adapter_builtins.hpp" #include "tensor_slice_selection.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp index d9333afefb87..0cd0674ea46d 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/tensor_view_fit.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/tensor_view_fit.fbs". -#include "../../collection_adapter_builtins.hpp" #include "tensor_view_fit.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp index d75ffdfdafc1..4ce5f6614fe7 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_blueprint.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/view_blueprint.fbs". -#include "../../collection_adapter_builtins.hpp" #include "view_blueprint.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp index 5e7568c74afc..4a506dfae983 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/view_contents.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/view_contents.fbs". -#include "../../collection_adapter_builtins.hpp" #include "view_contents.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp index 671eee346f97..40accef09eb8 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/viewport_blueprint.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/viewport_blueprint.fbs". -#include "../../collection_adapter_builtins.hpp" #include "viewport_blueprint.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp index 878da48aa7e5..2decd46e74f0 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visible_time_ranges.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/visible_time_ranges.fbs". -#include "../../collection_adapter_builtins.hpp" #include "visible_time_ranges.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp index 7567ab03d44a..d5756b46e0ef 100644 --- a/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp +++ b/rerun_cpp/src/rerun/blueprint/archetypes/visual_bounds2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/archetypes/visual_bounds2d.fbs". -#include "../../collection_adapter_builtins.hpp" #include "visual_bounds2d.hpp" +#include "../../collection_adapter_builtins.hpp" + namespace rerun::blueprint::archetypes {} namespace rerun { diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp index a06531b56912..8f1cf763182d 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/component_column_selector.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/component_column_selector.fbs". +#include "component_column_selector.hpp" + #include "../../datatypes/entity_path.hpp" #include "../../datatypes/utf8.hpp" -#include "component_column_selector.hpp" #include #include diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp index 39bfc4e9b7bb..78ba99789bd4 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/filter_by_range.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/filter_by_range.fbs". -#include "../../datatypes/time_int.hpp" #include "filter_by_range.hpp" +#include "../../datatypes/time_int.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp index 4f45640390ca..4c9653f934af 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/filter_is_not_null.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/filter_is_not_null.fbs". +#include "filter_is_not_null.hpp" + #include "../../datatypes/bool.hpp" #include "component_column_selector.hpp" -#include "filter_is_not_null.hpp" #include #include diff --git a/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp b/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp index 0844f464e272..df48039456c4 100644 --- a/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp +++ b/rerun_cpp/src/rerun/blueprint/datatypes/selected_columns.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/blueprint/datatypes/selected_columns.fbs". +#include "selected_columns.hpp" + #include "../../datatypes/utf8.hpp" #include "component_column_selector.hpp" -#include "selected_columns.hpp" #include #include diff --git a/rerun_cpp/src/rerun/components/annotation_context.cpp b/rerun_cpp/src/rerun/components/annotation_context.cpp index 779467f6ce6d..9d846c9a61fb 100644 --- a/rerun_cpp/src/rerun/components/annotation_context.cpp +++ b/rerun_cpp/src/rerun/components/annotation_context.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/annotation_context.fbs". -#include "../datatypes/class_description_map_elem.hpp" #include "annotation_context.hpp" +#include "../datatypes/class_description_map_elem.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/components/geo_line_string.cpp b/rerun_cpp/src/rerun/components/geo_line_string.cpp index a4fb59c13296..05cf6c8bf846 100644 --- a/rerun_cpp/src/rerun/components/geo_line_string.cpp +++ b/rerun_cpp/src/rerun/components/geo_line_string.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/geo_line_string.fbs". -#include "../datatypes/dvec2d.hpp" #include "geo_line_string.hpp" +#include "../datatypes/dvec2d.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/components/line_strip2d.cpp b/rerun_cpp/src/rerun/components/line_strip2d.cpp index b2382d301ea0..561a86d0c9fe 100644 --- a/rerun_cpp/src/rerun/components/line_strip2d.cpp +++ b/rerun_cpp/src/rerun/components/line_strip2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/line_strip2d.fbs". -#include "../datatypes/vec2d.hpp" #include "line_strip2d.hpp" +#include "../datatypes/vec2d.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/components/line_strip3d.cpp b/rerun_cpp/src/rerun/components/line_strip3d.cpp index bbcdbff549d2..5a8db8adc752 100644 --- a/rerun_cpp/src/rerun/components/line_strip3d.cpp +++ b/rerun_cpp/src/rerun/components/line_strip3d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/components/line_strip3d.fbs". -#include "../datatypes/vec3d.hpp" #include "line_strip3d.hpp" +#include "../datatypes/vec3d.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/datatypes/annotation_info.cpp b/rerun_cpp/src/rerun/datatypes/annotation_info.cpp index 3e127e01303c..63a2585e6e21 100644 --- a/rerun_cpp/src/rerun/datatypes/annotation_info.cpp +++ b/rerun_cpp/src/rerun/datatypes/annotation_info.cpp @@ -2,6 +2,7 @@ // Based on "crates/store/re_types/definitions/rerun/datatypes/annotation_info.fbs". #include "annotation_info.hpp" + #include "rgba32.hpp" #include "utf8.hpp" diff --git a/rerun_cpp/src/rerun/datatypes/class_description.cpp b/rerun_cpp/src/rerun/datatypes/class_description.cpp index 2af14a6e5549..40bfbf575c6c 100644 --- a/rerun_cpp/src/rerun/datatypes/class_description.cpp +++ b/rerun_cpp/src/rerun/datatypes/class_description.cpp @@ -1,8 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/class_description.fbs". -#include "annotation_info.hpp" #include "class_description.hpp" + +#include "annotation_info.hpp" #include "keypoint_pair.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp b/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp index 4415d1d63501..646328ddcabe 100644 --- a/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp +++ b/rerun_cpp/src/rerun/datatypes/class_description_map_elem.cpp @@ -1,8 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/class_description_map_elem.fbs". -#include "class_description.hpp" #include "class_description_map_elem.hpp" + +#include "class_description.hpp" #include "class_id.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/image_format.cpp b/rerun_cpp/src/rerun/datatypes/image_format.cpp index 5069416c7ff0..f0c990f20b83 100644 --- a/rerun_cpp/src/rerun/datatypes/image_format.cpp +++ b/rerun_cpp/src/rerun/datatypes/image_format.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/image_format.fbs". +#include "image_format.hpp" + #include "channel_datatype.hpp" #include "color_model.hpp" -#include "image_format.hpp" #include "pixel_format.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp b/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp index 9f9d22aae57a..896d1eea5d9c 100644 --- a/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp +++ b/rerun_cpp/src/rerun/datatypes/keypoint_pair.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/keypoint_pair.fbs". -#include "keypoint_id.hpp" #include "keypoint_pair.hpp" +#include "keypoint_id.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/datatypes/range2d.cpp b/rerun_cpp/src/rerun/datatypes/range2d.cpp index 0e0b5255f4ae..d4f5c60ce96b 100644 --- a/rerun_cpp/src/rerun/datatypes/range2d.cpp +++ b/rerun_cpp/src/rerun/datatypes/range2d.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/range2d.fbs". -#include "range1d.hpp" #include "range2d.hpp" +#include "range1d.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp index 5d5ac4d22d63..8f047dd15c0f 100644 --- a/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp +++ b/rerun_cpp/src/rerun/datatypes/rotation_axis_angle.cpp @@ -1,8 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/rotation_axis_angle.fbs". -#include "angle.hpp" #include "rotation_axis_angle.hpp" + +#include "angle.hpp" #include "vec3d.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/tensor_data.cpp b/rerun_cpp/src/rerun/datatypes/tensor_data.cpp index 64a90a4f25c4..dfaa17f489c0 100644 --- a/rerun_cpp/src/rerun/datatypes/tensor_data.cpp +++ b/rerun_cpp/src/rerun/datatypes/tensor_data.cpp @@ -1,8 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/tensor_data.fbs". -#include "tensor_buffer.hpp" #include "tensor_data.hpp" + +#include "tensor_buffer.hpp" #include "tensor_dimension.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/time_range.cpp b/rerun_cpp/src/rerun/datatypes/time_range.cpp index bf08ca0c2742..18c22a7dc1d4 100644 --- a/rerun_cpp/src/rerun/datatypes/time_range.cpp +++ b/rerun_cpp/src/rerun/datatypes/time_range.cpp @@ -2,6 +2,7 @@ // Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs". #include "time_range.hpp" + #include "time_range_boundary.hpp" #include diff --git a/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp b/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp index f811bcbe1c28..cd33f7186ffa 100644 --- a/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp +++ b/rerun_cpp/src/rerun/datatypes/time_range_boundary.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs". -#include "time_int.hpp" #include "time_range_boundary.hpp" +#include "time_int.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/datatypes/utf8pair.cpp b/rerun_cpp/src/rerun/datatypes/utf8pair.cpp index ffc3479c921b..2014e39616e5 100644 --- a/rerun_cpp/src/rerun/datatypes/utf8pair.cpp +++ b/rerun_cpp/src/rerun/datatypes/utf8pair.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/utf8_pair.fbs". -#include "utf8.hpp" #include "utf8pair.hpp" +#include "utf8.hpp" + #include #include diff --git a/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp b/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp index 6c8ce61d8a80..314a8639dc7f 100644 --- a/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp +++ b/rerun_cpp/src/rerun/datatypes/visible_time_range.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/datatypes/visible_time_range.fbs". +#include "visible_time_range.hpp" + #include "time_range.hpp" #include "utf8.hpp" -#include "visible_time_range.hpp" #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp index 7f5cc172ad44..8de038608077 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer15.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer3.hpp" #include "affix_fuzzer15.hpp" +#include "../datatypes/affix_fuzzer3.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp index fcdd548a2970..4bbe913a2a38 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer16.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer3.hpp" #include "affix_fuzzer16.hpp" +#include "../datatypes/affix_fuzzer3.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp index c2560e1c72f1..7fe3e9dd7746 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer17.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer3.hpp" #include "affix_fuzzer17.hpp" +#include "../datatypes/affix_fuzzer3.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp index 8bc03ae053c4..4677e85ee015 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer18.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer4.hpp" #include "affix_fuzzer18.hpp" +#include "../datatypes/affix_fuzzer4.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp index c16f20167da9..75a7dd2f8aa0 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer22.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer22.hpp" #include "affix_fuzzer22.hpp" +#include "../datatypes/affix_fuzzer22.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp index 1e72248e1652..31b13bf308e0 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer23.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/multi_enum.hpp" #include "affix_fuzzer23.hpp" +#include "../datatypes/multi_enum.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp index e1d943e43612..8fc8e76ac0d2 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer4.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer1.hpp" #include "affix_fuzzer4.hpp" +#include "../datatypes/affix_fuzzer1.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp index 39902bbfba71..f0448cc21227 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer5.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer1.hpp" #include "affix_fuzzer5.hpp" +#include "../datatypes/affix_fuzzer1.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp index 9486ac6ed076..3139cc83b690 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer6.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer1.hpp" #include "affix_fuzzer6.hpp" +#include "../datatypes/affix_fuzzer1.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp b/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp index 019dd8f3a2b5..38fcae0d788b 100644 --- a/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp +++ b/rerun_cpp/tests/generated/components/affix_fuzzer7.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/fuzzy.fbs". -#include "../datatypes/affix_fuzzer1.hpp" #include "affix_fuzzer7.hpp" +#include "../datatypes/affix_fuzzer1.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp index 24237c42f2d5..72943439ecf1 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer1.cpp @@ -2,6 +2,7 @@ // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". #include "affix_fuzzer1.hpp" + #include "flattened_scalar.hpp" #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp index 455688bff4f5..b66ef4f25c80 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer20.cpp @@ -2,6 +2,7 @@ // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". #include "affix_fuzzer20.hpp" + #include "primitive_component.hpp" #include "string_component.hpp" diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp index fb0e2a3b4408..9ee5f26242b2 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer3.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". -#include "affix_fuzzer1.hpp" #include "affix_fuzzer3.hpp" +#include "affix_fuzzer1.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp index 6fe5713554c7..a5d65655006a 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer4.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". -#include "affix_fuzzer3.hpp" #include "affix_fuzzer4.hpp" +#include "affix_fuzzer3.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp b/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp index 655c1fe4d76d..b7f03dbe5f9a 100644 --- a/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp +++ b/rerun_cpp/tests/generated/datatypes/affix_fuzzer5.cpp @@ -1,9 +1,10 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/datatypes/fuzzy.fbs". -#include "affix_fuzzer4.hpp" #include "affix_fuzzer5.hpp" +#include "affix_fuzzer4.hpp" + #include #include diff --git a/rerun_cpp/tests/generated/datatypes/multi_enum.cpp b/rerun_cpp/tests/generated/datatypes/multi_enum.cpp index a4942054461d..ea4c2cdb47ea 100644 --- a/rerun_cpp/tests/generated/datatypes/multi_enum.cpp +++ b/rerun_cpp/tests/generated/datatypes/multi_enum.cpp @@ -1,8 +1,9 @@ // DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/cpp/mod.rs // Based on "crates/store/re_types/definitions/rerun/testing/components/enum_test.fbs". -#include "enum_test.hpp" #include "multi_enum.hpp" + +#include "enum_test.hpp" #include "valued_enum.hpp" #include From 85d151dee63be8a9f88790b056b46d329128b29e Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Mon, 16 Dec 2024 18:41:41 +0100 Subject: [PATCH 13/13] Fix cpp deprecation warnings some more? --- .../re_types_builder/src/codegen/cpp/mod.rs | 64 +++++++++++-------- .../src/archetypes/disconnected_space.rs | 4 ++ .../rerun/archetypes/disconnected_space.hpp | 7 +- 3 files changed, 47 insertions(+), 28 deletions(-) diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index 5ddd5528b16d..f8a3a8a82d28 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -567,23 +567,27 @@ impl QuotedObject { format!("{}Indicator", obj.fqname).replace("archetypes", "components"); let doc_hide_comment = quote_hide_from_docs(); let deprecation_notice = quote_deprecation_notice(obj); + + // Note that GCC doesn't like using deprecated fields even if the archetype itself is deprecated. + // In that case we're just being generous with the ignore warnings, making it finegrained is hard and not really worth it anyways. + let has_any_deprecated_fields = obj.fields.iter().any(|field| { + field + .typ + .fqname() + .and_then(|fqname| objects.get(fqname)) + .map_or(false, |obj| obj.deprecation_notice().is_some()) + }); let (deprecation_ignore_start, deprecation_ignore_end) = - if obj.deprecation_notice().is_some() { - hpp_includes.insert_rerun("compiler_utils.hpp"); - ( - quote! { - RR_PUSH_WARNINGS #NEWLINE_TOKEN - RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN - }, - quote! { RR_POP_WARNINGS }, - ) - } else { - (quote!(), quote!()) - }; + quote_deprecation_ignore_start_and_end( + &mut hpp_includes, + obj.deprecation_notice().is_some() || has_any_deprecated_fields, + ); let hpp = quote! { #hpp_includes + #deprecation_ignore_start + namespace rerun::#quoted_namespace { #quoted_docs struct #deprecation_notice #type_ident { @@ -622,9 +626,9 @@ impl QuotedObject { struct AsComponents<#quoted_namespace::#type_ident> { #serialize_hpp }; - - #deprecation_ignore_end } + + #deprecation_ignore_end }; let cpp = quote! { @@ -2591,18 +2595,8 @@ fn quote_loggable_hpp_and_cpp( hpp_includes.insert_rerun("component_descriptor.hpp"); - let (deprecation_ignore_start, deprecation_ignore_end) = if obj.deprecation_notice().is_some() { - hpp_includes.insert_rerun("compiler_utils.hpp"); - ( - quote! { - RR_PUSH_WARNINGS #NEWLINE_TOKEN - RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN - }, - quote! { RR_POP_WARNINGS }, - ) - } else { - (quote!(), quote!()) - }; + let (deprecation_ignore_start, deprecation_ignore_end) = + quote_deprecation_ignore_start_and_end(hpp_includes, obj.deprecation_notice().is_some()); let hpp = quote! { #deprecation_ignore_start @@ -2646,3 +2640,21 @@ fn quote_deprecation_notice(obj: &Object) -> TokenStream { quote! {} } } + +fn quote_deprecation_ignore_start_and_end( + includes: &mut Includes, + should_deprecate: bool, +) -> (TokenStream, TokenStream) { + if should_deprecate { + includes.insert_rerun("compiler_utils.hpp"); + ( + quote! { + RR_PUSH_WARNINGS #NEWLINE_TOKEN + RR_DISABLE_DEPRECATION_WARNING #NEWLINE_TOKEN + }, + quote! { RR_POP_WARNINGS }, + ) + } else { + (quote!(), quote!()) + } +} diff --git a/crates/store/re_types/src/archetypes/disconnected_space.rs b/crates/store/re_types/src/archetypes/disconnected_space.rs index 4bdef89b1be8..642694071edc 100644 --- a/crates/store/re_types/src/archetypes/disconnected_space.rs +++ b/crates/store/re_types/src/archetypes/disconnected_space.rs @@ -30,6 +30,10 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// ### Disconnected space /// ```ignore +/// // `DisconnectedSpace` is deprecated and will be removed in the future. +/// // Use an invalid transform (e.g. zeroed out 3x3 matrix) instead. +/// #![allow(deprecated)] +/// /// fn main() -> Result<(), Box> { /// let rec = rerun::RecordingStreamBuilder::new("rerun_example_disconnected_space").spawn()?; /// diff --git a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp index 80cb96ebd353..19d598b0a5d7 100644 --- a/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp +++ b/rerun_cpp/src/rerun/archetypes/disconnected_space.hpp @@ -14,6 +14,9 @@ #include #include +RR_PUSH_WARNINGS +RR_DISABLE_DEPRECATION_WARNING + namespace rerun::archetypes { /// **Archetype**: Spatially disconnect this entity from its parent. /// @@ -83,6 +86,6 @@ namespace rerun { const archetypes::DisconnectedSpace& archetype ); }; - - RR_POP_WARNINGS } // namespace rerun + +RR_POP_WARNINGS