From ea8c3111f2f0647473a82c0a7734a2cbf36bfb77 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 30 Apr 2024 19:40:24 -0400 Subject: [PATCH 1/3] Add support for an Unused ViewDir --- .../rerun/components/view_coordinates.fbs | 2 ++ .../src/components/view_coordinates.rs | 1 + .../src/components/view_coordinates_ext.rs | 18 ++++++++++-------- crates/re_types/src/view_coordinates.rs | 4 ++++ .../types/components/view_coordinates.md | 1 + .../src/rerun/components/view_coordinates.hpp | 2 ++ .../rerun/components/view_coordinates_ext.cpp | 1 + .../rerun/components/view_coordinates.py | 1 + .../rerun/components/view_coordinates_ext.py | 1 + 9 files changed, 23 insertions(+), 8 deletions(-) diff --git a/crates/re_types/definitions/rerun/components/view_coordinates.fbs b/crates/re_types/definitions/rerun/components/view_coordinates.fbs index a29011d9a770..628c217498f6 100644 --- a/crates/re_types/definitions/rerun/components/view_coordinates.fbs +++ b/crates/re_types/definitions/rerun/components/view_coordinates.fbs @@ -10,6 +10,7 @@ namespace rerun.components; // TODO(#3384) /* enum ViewDir: byte { + Unused = 0, Up = 1, Down = 2, Right = 3, @@ -29,6 +30,7 @@ enum ViewDir: byte { /// down, and the Z axis points forward. /// /// The following constants are used to represent the different directions: +/// * Unused = 0 /// * Up = 1 /// * Down = 2 /// * Right = 3 diff --git a/crates/re_types/src/components/view_coordinates.rs b/crates/re_types/src/components/view_coordinates.rs index 445b9457db98..4891ff95fcda 100644 --- a/crates/re_types/src/components/view_coordinates.rs +++ b/crates/re_types/src/components/view_coordinates.rs @@ -32,6 +32,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// down, and the Z axis points forward. /// /// The following constants are used to represent the different directions: +/// * Unused = 0 /// * Up = 1 /// * Down = 2 /// * Right = 3 diff --git a/crates/re_types/src/components/view_coordinates_ext.rs b/crates/re_types/src/components/view_coordinates_ext.rs index c9221c42b851..b0fa26f14cb3 100644 --- a/crates/re_types/src/components/view_coordinates_ext.rs +++ b/crates/re_types/src/components/view_coordinates_ext.rs @@ -39,12 +39,14 @@ impl ViewCoordinates { pub fn sanity_check(&self) -> Result<(), String> { let mut dims = [false; 3]; for dir in self.0 { - let dim = match ViewDir::try_from(dir)? { - ViewDir::Up | ViewDir::Down => 0, - ViewDir::Right | ViewDir::Left => 1, - ViewDir::Forward | ViewDir::Back => 2, - }; - dims[dim] = true; + if let Some(dim) = match ViewDir::try_from(dir)? { + ViewDir::Up | ViewDir::Down => Some(0), + ViewDir::Right | ViewDir::Left => Some(1), + ViewDir::Forward | ViewDir::Back => Some(2), + ViewDir::Unused => None, + } { + dims[dim] = true; + } } if dims == [true; 3] { Ok(()) @@ -139,7 +141,7 @@ impl ViewCoordinates { Some(ViewDir::Forward) => [0.0, 0.0, 1.0], // TODO(jleibs): Is there a better value to return here? // this means the ViewCoordinates aren't valid. - None => [0.0, 0.0, 0.0], + _ => [0.0, 0.0, 0.0], } } @@ -175,7 +177,7 @@ impl ViewCoordinates { Some(ViewDir::Forward) => [0.0, 0.0, -1.0], // TODO(jleibs): Is there a better value to return here? // this means the ViewCoordinates aren't valid. - None => [0.0, 0.0, 0.0], + _ => [0.0, 0.0, 0.0], } } diff --git a/crates/re_types/src/view_coordinates.rs b/crates/re_types/src/view_coordinates.rs index 1819f43bba0d..16f2293fb5f6 100644 --- a/crates/re_types/src/view_coordinates.rs +++ b/crates/re_types/src/view_coordinates.rs @@ -3,6 +3,7 @@ /// The six cardinal directions for 3D view-space and image-space. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum ViewDir { + Unused = 0, Up = 1, Down = 2, Right = 3, @@ -17,6 +18,7 @@ impl TryFrom for ViewDir { #[inline] fn try_from(i: u8) -> Result { match i { + 0 => Ok(Self::Unused), 1 => Ok(Self::Up), 2 => Ok(Self::Down), 3 => Ok(Self::Right), @@ -61,6 +63,7 @@ impl ViewDir { #[inline] pub fn short(&self) -> &'static str { match self { + Self::Unused => "", Self::Up => "U", Self::Down => "D", Self::Right => "R", @@ -74,6 +77,7 @@ impl ViewDir { #[inline] pub fn long(&self) -> &'static str { match self { + Self::Unused => "Unused", Self::Up => "Up", Self::Down => "Down", Self::Right => "Right", diff --git a/docs/content/reference/types/components/view_coordinates.md b/docs/content/reference/types/components/view_coordinates.md index 006e9f373b24..0f7f133a0db7 100644 --- a/docs/content/reference/types/components/view_coordinates.md +++ b/docs/content/reference/types/components/view_coordinates.md @@ -12,6 +12,7 @@ For example [Right, Down, Forward] means that the X axis points to the right, th down, and the Z axis points forward. The following constants are used to represent the different directions: + * Unused = 0 * Up = 1 * Down = 2 * Right = 3 diff --git a/rerun_cpp/src/rerun/components/view_coordinates.hpp b/rerun_cpp/src/rerun/components/view_coordinates.hpp index 9e90da3616c7..08c62b6ac0c4 100644 --- a/rerun_cpp/src/rerun/components/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/components/view_coordinates.hpp @@ -27,6 +27,7 @@ namespace rerun::components { /// down, and the Z axis points forward. /// /// The following constants are used to represent the different directions: + /// * Unused = 0 /// * Up = 1 /// * Down = 2 /// * Right = 3 @@ -41,6 +42,7 @@ namespace rerun::components { // Extensions to generated type defined in 'view_coordinates_ext.cpp' enum ViewDir : uint8_t { + Unused = 0, Up = 1, Down = 2, Right = 3, diff --git a/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp b/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp index 17b88072237a..21ac2fe10409 100644 --- a/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp +++ b/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp @@ -19,6 +19,7 @@ namespace rerun { // enum ViewDir : uint8_t { + Unused = 0, Up = 1, Down = 2, Right = 3, diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py index baccd8390d21..4588a2679ab2 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py @@ -37,6 +37,7 @@ class ViewCoordinates(ViewCoordinatesExt): down, and the Z axis points forward. The following constants are used to represent the different directions: + * Unused = 0 * Up = 1 * Down = 2 * Right = 3 diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py index e889fa680cb5..59863415f57d 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py @@ -16,6 +16,7 @@ class ViewCoordinatesExt: """Extension for [ViewCoordinates][rerun.components.ViewCoordinates].""" class ViewDir(IntEnum): + Unused = 0 Up = 1 Down = 2 Right = 3 From a9d550b12b498f91ee2a2f81940e177028e3e491 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 30 Apr 2024 19:40:40 -0400 Subject: [PATCH 2/3] Generate 2D ViewDirs --- scripts/generate_view_coordinate_defs.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/generate_view_coordinate_defs.py b/scripts/generate_view_coordinate_defs.py index adaa800e7ae1..4a4bd0f37961 100755 --- a/scripts/generate_view_coordinate_defs.py +++ b/scripts/generate_view_coordinate_defs.py @@ -46,6 +46,11 @@ def generate_view_permutations() -> Iterable[ViewCoordinates]: for x, y, z in itertools.permutations([i, j, k]): name = f"{x[0]}{y[0]}{z[0]}" yield ViewCoordinates(name, x, y, z) + for i in D1: + for j in D2: + for x, y in itertools.permutations([i, j]): + name = f"{x[0]}{y[0]}" + yield ViewCoordinates(name, x, y, "Unused") def generate_up_handed_permutations() -> Iterable[ViewCoordinates]: From fa353879343a5d253c3f2f64fe1b4c16319746f8 Mon Sep 17 00:00:00 2001 From: Jeremy Leibs Date: Tue, 30 Apr 2024 19:50:36 -0400 Subject: [PATCH 3/3] Generate the new constants --- .../src/archetypes/view_coordinates_ext.rs | 8 +++ .../src/components/view_coordinates_ext.rs | 8 +++ .../src/rerun/archetypes/view_coordinates.hpp | 24 ++++++++ .../rerun/archetypes/view_coordinates_ext.cpp | 40 +++++++++++++ .../src/rerun/components/view_coordinates.hpp | 24 ++++++++ .../rerun/components/view_coordinates_ext.cpp | 56 +++++++++++++++++++ .../rerun/archetypes/view_coordinates_ext.py | 16 ++++++ .../rerun/components/view_coordinates_ext.py | 32 +++++++++++ 8 files changed, 208 insertions(+) diff --git a/crates/re_types/src/archetypes/view_coordinates_ext.rs b/crates/re_types/src/archetypes/view_coordinates_ext.rs index c4c568100810..a9ac12e6a126 100644 --- a/crates/re_types/src/archetypes/view_coordinates_ext.rs +++ b/crates/re_types/src/archetypes/view_coordinates_ext.rs @@ -62,6 +62,14 @@ impl ViewCoordinates { define_coordinates!("X=Right, Y=Back, Z=Down", RBD => (Right, Back, Down)); define_coordinates!("X=Back, Y=Down, Z=Right", BDR => (Back, Down, Right)); define_coordinates!("X=Back, Y=Right, Z=Down", BRD => (Back, Right, Down)); + define_coordinates!("X=Up, Y=Left, Z=Unused", UL => (Up, Left, Unused)); + define_coordinates!("X=Left, Y=Up, Z=Unused", LU => (Left, Up, Unused)); + define_coordinates!("X=Up, Y=Right, Z=Unused", UR => (Up, Right, Unused)); + define_coordinates!("X=Right, Y=Up, Z=Unused", RU => (Right, Up, Unused)); + define_coordinates!("X=Down, Y=Left, Z=Unused", DL => (Down, Left, Unused)); + define_coordinates!("X=Left, Y=Down, Z=Unused", LD => (Left, Down, Unused)); + define_coordinates!("X=Down, Y=Right, Z=Unused", DR => (Down, Right, Unused)); + define_coordinates!("X=Right, Y=Down, Z=Unused", RD => (Right, Down, Unused)); define_coordinates!("X=Up, Y=Right, Z=Forward", RIGHT_HAND_X_UP => (Up, Right, Forward)); define_coordinates!("X=Down, Y=Right, Z=Back", RIGHT_HAND_X_DOWN => (Down, Right, Back)); define_coordinates!("X=Right, Y=Up, Z=Back", RIGHT_HAND_Y_UP => (Right, Up, Back)); diff --git a/crates/re_types/src/components/view_coordinates_ext.rs b/crates/re_types/src/components/view_coordinates_ext.rs index b0fa26f14cb3..4804e9f18450 100644 --- a/crates/re_types/src/components/view_coordinates_ext.rs +++ b/crates/re_types/src/components/view_coordinates_ext.rs @@ -321,6 +321,14 @@ impl ViewCoordinates { define_coordinates!("X=Right, Y=Back, Z=Down", RBD => (Right, Back, Down)); define_coordinates!("X=Back, Y=Down, Z=Right", BDR => (Back, Down, Right)); define_coordinates!("X=Back, Y=Right, Z=Down", BRD => (Back, Right, Down)); + define_coordinates!("X=Up, Y=Left, Z=Unused", UL => (Up, Left, Unused)); + define_coordinates!("X=Left, Y=Up, Z=Unused", LU => (Left, Up, Unused)); + define_coordinates!("X=Up, Y=Right, Z=Unused", UR => (Up, Right, Unused)); + define_coordinates!("X=Right, Y=Up, Z=Unused", RU => (Right, Up, Unused)); + define_coordinates!("X=Down, Y=Left, Z=Unused", DL => (Down, Left, Unused)); + define_coordinates!("X=Left, Y=Down, Z=Unused", LD => (Left, Down, Unused)); + define_coordinates!("X=Down, Y=Right, Z=Unused", DR => (Down, Right, Unused)); + define_coordinates!("X=Right, Y=Down, Z=Unused", RD => (Right, Down, Unused)); define_coordinates!("X=Up, Y=Right, Z=Forward", RIGHT_HAND_X_UP => (Up, Right, Forward)); define_coordinates!("X=Down, Y=Right, Z=Back", RIGHT_HAND_X_DOWN => (Down, Right, Back)); define_coordinates!("X=Right, Y=Up, Z=Back", RIGHT_HAND_Y_UP => (Right, Up, Back)); diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp b/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp index ff4a42d137c9..91a170d48b9a 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp @@ -208,6 +208,30 @@ namespace rerun::archetypes { /// X=Back, Y=Right, Z=Down RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BRD; + /// X=Up, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UL; + + /// X=Left, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LU; + + /// X=Up, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UR; + + /// X=Right, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RU; + + /// X=Down, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DL; + + /// X=Left, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LD; + + /// X=Down, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DR; + + /// X=Right, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RD; + /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RIGHT_HAND_X_UP; diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp b/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp index 31de3b47e54b..523184a74007 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp @@ -168,6 +168,30 @@ namespace rerun { /// X=Back, Y=Right, Z=Down RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BRD; + /// X=Up, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UL; + + /// X=Left, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LU; + + /// X=Up, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UR; + + /// X=Right, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RU; + + /// X=Down, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DL; + + /// X=Left, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LD; + + /// X=Down, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DR; + + /// X=Right, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RD; + /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RIGHT_HAND_X_UP; @@ -308,6 +332,22 @@ namespace rerun { ViewCoordinates(rerun::components::ViewCoordinates::BDR); const ViewCoordinates ViewCoordinates::BRD = ViewCoordinates(rerun::components::ViewCoordinates::BRD); + const ViewCoordinates ViewCoordinates::UL = + ViewCoordinates(rerun::components::ViewCoordinates::UL); + const ViewCoordinates ViewCoordinates::LU = + ViewCoordinates(rerun::components::ViewCoordinates::LU); + const ViewCoordinates ViewCoordinates::UR = + ViewCoordinates(rerun::components::ViewCoordinates::UR); + const ViewCoordinates ViewCoordinates::RU = + ViewCoordinates(rerun::components::ViewCoordinates::RU); + const ViewCoordinates ViewCoordinates::DL = + ViewCoordinates(rerun::components::ViewCoordinates::DL); + const ViewCoordinates ViewCoordinates::LD = + ViewCoordinates(rerun::components::ViewCoordinates::LD); + const ViewCoordinates ViewCoordinates::DR = + ViewCoordinates(rerun::components::ViewCoordinates::DR); + const ViewCoordinates ViewCoordinates::RD = + ViewCoordinates(rerun::components::ViewCoordinates::RD); const ViewCoordinates ViewCoordinates::RIGHT_HAND_X_UP = ViewCoordinates(rerun::components::ViewCoordinates::RIGHT_HAND_X_UP); const ViewCoordinates ViewCoordinates::RIGHT_HAND_X_DOWN = diff --git a/rerun_cpp/src/rerun/components/view_coordinates.hpp b/rerun_cpp/src/rerun/components/view_coordinates.hpp index 08c62b6ac0c4..54eb1b351183 100644 --- a/rerun_cpp/src/rerun/components/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/components/view_coordinates.hpp @@ -205,6 +205,30 @@ namespace rerun::components { /// X=Back, Y=Right, Z=Down RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BRD; + /// X=Up, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UL; + + /// X=Left, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LU; + + /// X=Up, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UR; + + /// X=Right, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RU; + + /// X=Down, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DL; + + /// X=Left, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LD; + + /// X=Down, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DR; + + /// X=Right, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RD; + /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RIGHT_HAND_X_UP; diff --git a/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp b/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp index 21ac2fe10409..fd14a8d847b4 100644 --- a/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp +++ b/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp @@ -182,6 +182,30 @@ namespace rerun { /// X=Back, Y=Right, Z=Down RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BRD; + /// X=Up, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UL; + + /// X=Left, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LU; + + /// X=Up, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UR; + + /// X=Right, Y=Up, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RU; + + /// X=Down, Y=Left, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DL; + + /// X=Left, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LD; + + /// X=Down, Y=Right, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DR; + + /// X=Right, Y=Down, Z=Unused + RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RD; + /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RIGHT_HAND_X_UP; @@ -417,6 +441,38 @@ namespace rerun { rerun::components::ViewCoordinates::Back, rerun::components::ViewCoordinates::Right, rerun::components::ViewCoordinates::Down ); + const ViewCoordinates ViewCoordinates::UL = ViewCoordinates( + rerun::components::ViewCoordinates::Up, rerun::components::ViewCoordinates::Left, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::LU = ViewCoordinates( + rerun::components::ViewCoordinates::Left, rerun::components::ViewCoordinates::Up, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::UR = ViewCoordinates( + rerun::components::ViewCoordinates::Up, rerun::components::ViewCoordinates::Right, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::RU = ViewCoordinates( + rerun::components::ViewCoordinates::Right, rerun::components::ViewCoordinates::Up, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::DL = ViewCoordinates( + rerun::components::ViewCoordinates::Down, rerun::components::ViewCoordinates::Left, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::LD = ViewCoordinates( + rerun::components::ViewCoordinates::Left, rerun::components::ViewCoordinates::Down, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::DR = ViewCoordinates( + rerun::components::ViewCoordinates::Down, rerun::components::ViewCoordinates::Right, + rerun::components::ViewCoordinates::Unused + ); + const ViewCoordinates ViewCoordinates::RD = ViewCoordinates( + rerun::components::ViewCoordinates::Right, rerun::components::ViewCoordinates::Down, + rerun::components::ViewCoordinates::Unused + ); const ViewCoordinates ViewCoordinates::RIGHT_HAND_X_UP = ViewCoordinates( rerun::components::ViewCoordinates::Up, rerun::components::ViewCoordinates::Right, rerun::components::ViewCoordinates::Forward diff --git a/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates_ext.py b/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates_ext.py index 937c1b089772..3d05ae445467 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates_ext.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates_ext.py @@ -62,6 +62,14 @@ class ViewCoordinatesExt: RBD: ViewCoordinates = None # type: ignore[assignment] BDR: ViewCoordinates = None # type: ignore[assignment] BRD: ViewCoordinates = None # type: ignore[assignment] + UL: ViewCoordinates = None # type: ignore[assignment] + LU: ViewCoordinates = None # type: ignore[assignment] + UR: ViewCoordinates = None # type: ignore[assignment] + RU: ViewCoordinates = None # type: ignore[assignment] + DL: ViewCoordinates = None # type: ignore[assignment] + LD: ViewCoordinates = None # type: ignore[assignment] + DR: ViewCoordinates = None # type: ignore[assignment] + RD: ViewCoordinates = None # type: ignore[assignment] RIGHT_HAND_X_UP: ViewCoordinates = None # type: ignore[assignment] RIGHT_HAND_X_DOWN: ViewCoordinates = None # type: ignore[assignment] RIGHT_HAND_Y_UP: ViewCoordinates = None # type: ignore[assignment] @@ -128,6 +136,14 @@ def deferred_patch_class(cls: Any) -> None: cls.RBD = Component.RBD cls.BDR = Component.BDR cls.BRD = Component.BRD + cls.UL = Component.UL + cls.LU = Component.LU + cls.UR = Component.UR + cls.RU = Component.RU + cls.DL = Component.DL + cls.LD = Component.LD + cls.DR = Component.DR + cls.RD = Component.RD cls.RIGHT_HAND_X_UP = Component.RIGHT_HAND_X_UP cls.RIGHT_HAND_X_DOWN = Component.RIGHT_HAND_X_DOWN cls.RIGHT_HAND_Y_UP = Component.RIGHT_HAND_Y_UP diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py index 59863415f57d..110409db044a 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py @@ -222,6 +222,30 @@ def num_instances(self) -> int: BRD: ViewCoordinates = None # type: ignore[assignment] """X=Back, Y=Right, Z=Down""" + UL: ViewCoordinates = None # type: ignore[assignment] + """X=Up, Y=Left, Z=Unused""" + + LU: ViewCoordinates = None # type: ignore[assignment] + """X=Left, Y=Up, Z=Unused""" + + UR: ViewCoordinates = None # type: ignore[assignment] + """X=Up, Y=Right, Z=Unused""" + + RU: ViewCoordinates = None # type: ignore[assignment] + """X=Right, Y=Up, Z=Unused""" + + DL: ViewCoordinates = None # type: ignore[assignment] + """X=Down, Y=Left, Z=Unused""" + + LD: ViewCoordinates = None # type: ignore[assignment] + """X=Left, Y=Down, Z=Unused""" + + DR: ViewCoordinates = None # type: ignore[assignment] + """X=Down, Y=Right, Z=Unused""" + + RD: ViewCoordinates = None # type: ignore[assignment] + """X=Right, Y=Down, Z=Unused""" + RIGHT_HAND_X_UP: ViewCoordinates = None # type: ignore[assignment] """X=Up, Y=Right, Z=Forward""" @@ -312,6 +336,14 @@ def deferred_patch_class(cls: Any) -> None: cls.RBD = cls([cls.ViewDir.Right, cls.ViewDir.Back, cls.ViewDir.Down]) cls.BDR = cls([cls.ViewDir.Back, cls.ViewDir.Down, cls.ViewDir.Right]) cls.BRD = cls([cls.ViewDir.Back, cls.ViewDir.Right, cls.ViewDir.Down]) + cls.UL = cls([cls.ViewDir.Up, cls.ViewDir.Left, cls.ViewDir.Unused]) + cls.LU = cls([cls.ViewDir.Left, cls.ViewDir.Up, cls.ViewDir.Unused]) + cls.UR = cls([cls.ViewDir.Up, cls.ViewDir.Right, cls.ViewDir.Unused]) + cls.RU = cls([cls.ViewDir.Right, cls.ViewDir.Up, cls.ViewDir.Unused]) + cls.DL = cls([cls.ViewDir.Down, cls.ViewDir.Left, cls.ViewDir.Unused]) + cls.LD = cls([cls.ViewDir.Left, cls.ViewDir.Down, cls.ViewDir.Unused]) + cls.DR = cls([cls.ViewDir.Down, cls.ViewDir.Right, cls.ViewDir.Unused]) + cls.RD = cls([cls.ViewDir.Right, cls.ViewDir.Down, cls.ViewDir.Unused]) cls.RIGHT_HAND_X_UP = cls([cls.ViewDir.Up, cls.ViewDir.Right, cls.ViewDir.Forward]) cls.RIGHT_HAND_X_DOWN = cls([cls.ViewDir.Down, cls.ViewDir.Right, cls.ViewDir.Back]) cls.RIGHT_HAND_Y_UP = cls([cls.ViewDir.Right, cls.ViewDir.Up, cls.ViewDir.Back])