From c06745f71bfec9fee0789a39b305ed7b2003c8ce Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Fri, 11 Oct 2024 13:32:26 +0200 Subject: [PATCH] Document that Rerun does not support left-handed coords (#7690) ### What * Closes https://github.com/rerun-io/rerun/issues/5033 * Screenshot 2024-10-11 at 11 27 56 Screenshot 2024-10-11 at 11 25 48 ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using examples from latest `main` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7690?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [rerun.io/viewer](https://rerun.io/viewer/pr/7690?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! * [x] If have noted any breaking changes to the log API in `CHANGELOG.md` and the migration guide - [PR Build Summary](https://build.rerun.io/pr/7690) - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html) To run all checks from `main`, comment on the PR with `@rerun-bot full-check`. --- .../rerun/archetypes/view_coordinates.fbs | 4 +- .../rerun/components/view_coordinates.fbs | 4 +- .../rerun/datatypes/view_coordinates.fbs | 4 +- .../src/archetypes/view_coordinates.rs | 4 +- .../src/archetypes/view_coordinates_ext.rs | 120 +++++++++++++----- .../src/components/view_coordinates.rs | 4 +- .../src/components/view_coordinates_ext.rs | 120 +++++++++++++----- .../src/datatypes/view_coordinates.rs | 4 +- crates/viewer/re_viewer/src/reflection/mod.rs | 2 +- .../types/archetypes/view_coordinates.md | 4 +- .../types/components/view_coordinates.md | 4 +- .../types/datatypes/view_coordinates.md | 4 +- .../src/rerun/archetypes/view_coordinates.hpp | 64 +++++++++- .../rerun/archetypes/view_coordinates_ext.cpp | 60 +++++++++ .../src/rerun/components/view_coordinates.hpp | 64 +++++++++- .../rerun/components/view_coordinates_ext.cpp | 60 +++++++++ .../src/rerun/datatypes/view_coordinates.hpp | 4 +- .../rerun/archetypes/view_coordinates.py | 4 +- .../rerun/components/view_coordinates.py | 4 +- .../rerun/components/view_coordinates_ext.py | 120 +++++++++++++----- .../rerun/datatypes/view_coordinates.py | 4 +- scripts/generate_view_coordinate_defs.py | 63 +++++++-- 22 files changed, 607 insertions(+), 118 deletions(-) diff --git a/crates/store/re_types/definitions/rerun/archetypes/view_coordinates.fbs b/crates/store/re_types/definitions/rerun/archetypes/view_coordinates.fbs index 733d7fac48c9..88cf09f52a40 100644 --- a/crates/store/re_types/definitions/rerun/archetypes/view_coordinates.fbs +++ b/crates/store/re_types/definitions/rerun/archetypes/view_coordinates.fbs @@ -4,7 +4,7 @@ namespace rerun.archetypes; /// How we interpret the coordinate system of an entity/space. /// -/// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +/// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// @@ -13,6 +13,8 @@ namespace rerun.archetypes; /// /// Make sure that this archetype is logged at or above the origin entity path of your 3D views. /// +/// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). +/// /// \example archetypes/view_coordinates_simple title="View coordinates for adjusting the eye camera" image="https://static.rerun.io/viewcoordinates/0833f0dc8616a676b7b2c566f2a6f613363680c5/1200w.png" table ViewCoordinates ( "attr.rust.derive": "Copy, PartialEq, Eq, bytemuck::Pod, bytemuck::Zeroable", diff --git a/crates/store/re_types/definitions/rerun/components/view_coordinates.fbs b/crates/store/re_types/definitions/rerun/components/view_coordinates.fbs index dae19f24c67c..1ff35d3722b1 100644 --- a/crates/store/re_types/definitions/rerun/components/view_coordinates.fbs +++ b/crates/store/re_types/definitions/rerun/components/view_coordinates.fbs @@ -15,13 +15,15 @@ enum ViewDir: ubyte { /// How we interpret the coordinate system of an entity/space. /// -/// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +/// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points /// down, and the Z axis points forward. /// +/// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). +/// /// The following constants are used to represent the different directions: /// * Up = 1 /// * Down = 2 diff --git a/crates/store/re_types/definitions/rerun/datatypes/view_coordinates.fbs b/crates/store/re_types/definitions/rerun/datatypes/view_coordinates.fbs index f68f1adcf9af..8e4aecaba5c3 100644 --- a/crates/store/re_types/definitions/rerun/datatypes/view_coordinates.fbs +++ b/crates/store/re_types/definitions/rerun/datatypes/view_coordinates.fbs @@ -15,13 +15,15 @@ enum ViewDir: ubyte { /// How we interpret the coordinate system of an entity/space. /// -/// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +/// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points /// down, and the Z axis points forward. /// +/// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). +/// /// The following constants are used to represent the different directions: /// * Up = 1 /// * Down = 2 diff --git a/crates/store/re_types/src/archetypes/view_coordinates.rs b/crates/store/re_types/src/archetypes/view_coordinates.rs index cf42a3e7e37e..b358ef9cdcbb 100644 --- a/crates/store/re_types/src/archetypes/view_coordinates.rs +++ b/crates/store/re_types/src/archetypes/view_coordinates.rs @@ -20,7 +20,7 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// **Archetype**: How we interpret the coordinate system of an entity/space. /// -/// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +/// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// @@ -29,6 +29,8 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// /// Make sure that this archetype is logged at or above the origin entity path of your 3D views. /// +/// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). +/// /// ## Example /// /// ### View coordinates for adjusting the eye camera diff --git a/crates/store/re_types/src/archetypes/view_coordinates_ext.rs b/crates/store/re_types/src/archetypes/view_coordinates_ext.rs index c4c568100810..3961280ab492 100644 --- a/crates/store/re_types/src/archetypes/view_coordinates_ext.rs +++ b/crates/store/re_types/src/archetypes/view_coordinates_ext.rs @@ -14,65 +14,125 @@ macro_rules! define_coordinates { impl ViewCoordinates { // // This section is generated by running `scripts/generate_view_coordinate_defs.py --rust` - define_coordinates!("X=Up, Y=Left, Z=Forward", ULF => (Up, Left, Forward)); + define_coordinates!("X=Up, Y=Left, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", ULF => (Up, Left, Forward)); define_coordinates!("X=Up, Y=Forward, Z=Left", UFL => (Up, Forward, Left)); define_coordinates!("X=Left, Y=Up, Z=Forward", LUF => (Left, Up, Forward)); - define_coordinates!("X=Left, Y=Forward, Z=Up", LFU => (Left, Forward, Up)); - define_coordinates!("X=Forward, Y=Up, Z=Left", FUL => (Forward, Up, Left)); + define_coordinates!("X=Left, Y=Forward, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LFU => (Left, Forward, Up)); + define_coordinates!("X=Forward, Y=Up, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FUL => (Forward, Up, Left)); define_coordinates!("X=Forward, Y=Left, Z=Up", FLU => (Forward, Left, Up)); define_coordinates!("X=Up, Y=Left, Z=Back", ULB => (Up, Left, Back)); - define_coordinates!("X=Up, Y=Back, Z=Left", UBL => (Up, Back, Left)); - define_coordinates!("X=Left, Y=Up, Z=Back", LUB => (Left, Up, Back)); + define_coordinates!("X=Up, Y=Back, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", UBL => (Up, Back, Left)); + define_coordinates!("X=Left, Y=Up, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LUB => (Left, Up, Back)); define_coordinates!("X=Left, Y=Back, Z=Up", LBU => (Left, Back, Up)); define_coordinates!("X=Back, Y=Up, Z=Left", BUL => (Back, Up, Left)); - define_coordinates!("X=Back, Y=Left, Z=Up", BLU => (Back, Left, Up)); + define_coordinates!("X=Back, Y=Left, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BLU => (Back, Left, Up)); define_coordinates!("X=Up, Y=Right, Z=Forward", URF => (Up, Right, Forward)); - define_coordinates!("X=Up, Y=Forward, Z=Right", UFR => (Up, Forward, Right)); - define_coordinates!("X=Right, Y=Up, Z=Forward", RUF => (Right, Up, Forward)); + define_coordinates!("X=Up, Y=Forward, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", UFR => (Up, Forward, Right)); + define_coordinates!("X=Right, Y=Up, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RUF => (Right, Up, Forward)); define_coordinates!("X=Right, Y=Forward, Z=Up", RFU => (Right, Forward, Up)); define_coordinates!("X=Forward, Y=Up, Z=Right", FUR => (Forward, Up, Right)); - define_coordinates!("X=Forward, Y=Right, Z=Up", FRU => (Forward, Right, Up)); - define_coordinates!("X=Up, Y=Right, Z=Back", URB => (Up, Right, Back)); + define_coordinates!("X=Forward, Y=Right, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FRU => (Forward, Right, Up)); + define_coordinates!("X=Up, Y=Right, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", URB => (Up, Right, Back)); define_coordinates!("X=Up, Y=Back, Z=Right", UBR => (Up, Back, Right)); define_coordinates!("X=Right, Y=Up, Z=Back", RUB => (Right, Up, Back)); - define_coordinates!("X=Right, Y=Back, Z=Up", RBU => (Right, Back, Up)); - define_coordinates!("X=Back, Y=Up, Z=Right", BUR => (Back, Up, Right)); + define_coordinates!("X=Right, Y=Back, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RBU => (Right, Back, Up)); + define_coordinates!("X=Back, Y=Up, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BUR => (Back, Up, Right)); define_coordinates!("X=Back, Y=Right, Z=Up", BRU => (Back, Right, Up)); define_coordinates!("X=Down, Y=Left, Z=Forward", DLF => (Down, Left, Forward)); - define_coordinates!("X=Down, Y=Forward, Z=Left", DFL => (Down, Forward, Left)); - define_coordinates!("X=Left, Y=Down, Z=Forward", LDF => (Left, Down, Forward)); + define_coordinates!("X=Down, Y=Forward, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DFL => (Down, Forward, Left)); + define_coordinates!("X=Left, Y=Down, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LDF => (Left, Down, Forward)); define_coordinates!("X=Left, Y=Forward, Z=Down", LFD => (Left, Forward, Down)); define_coordinates!("X=Forward, Y=Down, Z=Left", FDL => (Forward, Down, Left)); - define_coordinates!("X=Forward, Y=Left, Z=Down", FLD => (Forward, Left, Down)); - define_coordinates!("X=Down, Y=Left, Z=Back", DLB => (Down, Left, Back)); + define_coordinates!("X=Forward, Y=Left, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FLD => (Forward, Left, Down)); + define_coordinates!("X=Down, Y=Left, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DLB => (Down, Left, Back)); define_coordinates!("X=Down, Y=Back, Z=Left", DBL => (Down, Back, Left)); define_coordinates!("X=Left, Y=Down, Z=Back", LDB => (Left, Down, Back)); - define_coordinates!("X=Left, Y=Back, Z=Down", LBD => (Left, Back, Down)); - define_coordinates!("X=Back, Y=Down, Z=Left", BDL => (Back, Down, Left)); + define_coordinates!("X=Left, Y=Back, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LBD => (Left, Back, Down)); + define_coordinates!("X=Back, Y=Down, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BDL => (Back, Down, Left)); define_coordinates!("X=Back, Y=Left, Z=Down", BLD => (Back, Left, Down)); - define_coordinates!("X=Down, Y=Right, Z=Forward", DRF => (Down, Right, Forward)); + define_coordinates!("X=Down, Y=Right, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DRF => (Down, Right, Forward)); define_coordinates!("X=Down, Y=Forward, Z=Right", DFR => (Down, Forward, Right)); define_coordinates!("X=Right, Y=Down, Z=Forward", RDF => (Right, Down, Forward)); - define_coordinates!("X=Right, Y=Forward, Z=Down", RFD => (Right, Forward, Down)); - define_coordinates!("X=Forward, Y=Down, Z=Right", FDR => (Forward, Down, Right)); + define_coordinates!("X=Right, Y=Forward, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RFD => (Right, Forward, Down)); + define_coordinates!("X=Forward, Y=Down, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FDR => (Forward, Down, Right)); define_coordinates!("X=Forward, Y=Right, Z=Down", FRD => (Forward, Right, Down)); define_coordinates!("X=Down, Y=Right, Z=Back", DRB => (Down, Right, Back)); - define_coordinates!("X=Down, Y=Back, Z=Right", DBR => (Down, Back, Right)); - define_coordinates!("X=Right, Y=Down, Z=Back", RDB => (Right, Down, Back)); + define_coordinates!("X=Down, Y=Back, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DBR => (Down, Back, Right)); + define_coordinates!("X=Right, Y=Down, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RDB => (Right, Down, Back)); 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=Back, Y=Right, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BRD => (Back, Right, Down)); 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)); define_coordinates!("X=Right, Y=Down, Z=Forward", RIGHT_HAND_Y_DOWN => (Right, Down, Forward)); define_coordinates!("X=Right, Y=Forward, Z=Up", RIGHT_HAND_Z_UP => (Right, Forward, Up)); define_coordinates!("X=Right, Y=Back, Z=Down", RIGHT_HAND_Z_DOWN => (Right, Back, Down)); - define_coordinates!("X=Up, Y=Right, Z=Back", LEFT_HAND_X_UP => (Up, Right, Back)); - define_coordinates!("X=Down, Y=Right, Z=Forward", LEFT_HAND_X_DOWN => (Down, Right, Forward)); - define_coordinates!("X=Right, Y=Up, Z=Forward", LEFT_HAND_Y_UP => (Right, Up, Forward)); - define_coordinates!("X=Right, Y=Down, Z=Back", LEFT_HAND_Y_DOWN => (Right, Down, Back)); - define_coordinates!("X=Right, Y=Back, Z=Up", LEFT_HAND_Z_UP => (Right, Back, Up)); - define_coordinates!("X=Right, Y=Forward, Z=Down", LEFT_HAND_Z_DOWN => (Right, Forward, Down)); + define_coordinates!("X=Up, Y=Right, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_X_UP => (Up, Right, Back)); + define_coordinates!("X=Down, Y=Right, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_X_DOWN => (Down, Right, Forward)); + define_coordinates!("X=Right, Y=Up, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Y_UP => (Right, Up, Forward)); + define_coordinates!("X=Right, Y=Down, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Y_DOWN => (Right, Down, Back)); + define_coordinates!("X=Right, Y=Back, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Z_UP => (Right, Back, Up)); + define_coordinates!("X=Right, Y=Forward, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Z_DOWN => (Right, Forward, Down)); // } diff --git a/crates/store/re_types/src/components/view_coordinates.rs b/crates/store/re_types/src/components/view_coordinates.rs index e2e19b78de3e..1fece1f587dc 100644 --- a/crates/store/re_types/src/components/view_coordinates.rs +++ b/crates/store/re_types/src/components/view_coordinates.rs @@ -20,13 +20,15 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// **Component**: How we interpret the coordinate system of an entity/space. /// -/// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +/// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points /// down, and the Z axis points forward. /// +/// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). +/// /// The following constants are used to represent the different directions: /// * Up = 1 /// * Down = 2 diff --git a/crates/store/re_types/src/components/view_coordinates_ext.rs b/crates/store/re_types/src/components/view_coordinates_ext.rs index 3d4342816c21..f5eaa0e1a3e0 100644 --- a/crates/store/re_types/src/components/view_coordinates_ext.rs +++ b/crates/store/re_types/src/components/view_coordinates_ext.rs @@ -284,65 +284,125 @@ macro_rules! define_coordinates { impl ViewCoordinates { // // This section is generated by running `scripts/generate_view_coordinate_defs.py --rust` - define_coordinates!("X=Up, Y=Left, Z=Forward", ULF => (Up, Left, Forward)); + define_coordinates!("X=Up, Y=Left, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", ULF => (Up, Left, Forward)); define_coordinates!("X=Up, Y=Forward, Z=Left", UFL => (Up, Forward, Left)); define_coordinates!("X=Left, Y=Up, Z=Forward", LUF => (Left, Up, Forward)); - define_coordinates!("X=Left, Y=Forward, Z=Up", LFU => (Left, Forward, Up)); - define_coordinates!("X=Forward, Y=Up, Z=Left", FUL => (Forward, Up, Left)); + define_coordinates!("X=Left, Y=Forward, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LFU => (Left, Forward, Up)); + define_coordinates!("X=Forward, Y=Up, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FUL => (Forward, Up, Left)); define_coordinates!("X=Forward, Y=Left, Z=Up", FLU => (Forward, Left, Up)); define_coordinates!("X=Up, Y=Left, Z=Back", ULB => (Up, Left, Back)); - define_coordinates!("X=Up, Y=Back, Z=Left", UBL => (Up, Back, Left)); - define_coordinates!("X=Left, Y=Up, Z=Back", LUB => (Left, Up, Back)); + define_coordinates!("X=Up, Y=Back, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", UBL => (Up, Back, Left)); + define_coordinates!("X=Left, Y=Up, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LUB => (Left, Up, Back)); define_coordinates!("X=Left, Y=Back, Z=Up", LBU => (Left, Back, Up)); define_coordinates!("X=Back, Y=Up, Z=Left", BUL => (Back, Up, Left)); - define_coordinates!("X=Back, Y=Left, Z=Up", BLU => (Back, Left, Up)); + define_coordinates!("X=Back, Y=Left, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BLU => (Back, Left, Up)); define_coordinates!("X=Up, Y=Right, Z=Forward", URF => (Up, Right, Forward)); - define_coordinates!("X=Up, Y=Forward, Z=Right", UFR => (Up, Forward, Right)); - define_coordinates!("X=Right, Y=Up, Z=Forward", RUF => (Right, Up, Forward)); + define_coordinates!("X=Up, Y=Forward, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", UFR => (Up, Forward, Right)); + define_coordinates!("X=Right, Y=Up, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RUF => (Right, Up, Forward)); define_coordinates!("X=Right, Y=Forward, Z=Up", RFU => (Right, Forward, Up)); define_coordinates!("X=Forward, Y=Up, Z=Right", FUR => (Forward, Up, Right)); - define_coordinates!("X=Forward, Y=Right, Z=Up", FRU => (Forward, Right, Up)); - define_coordinates!("X=Up, Y=Right, Z=Back", URB => (Up, Right, Back)); + define_coordinates!("X=Forward, Y=Right, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FRU => (Forward, Right, Up)); + define_coordinates!("X=Up, Y=Right, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", URB => (Up, Right, Back)); define_coordinates!("X=Up, Y=Back, Z=Right", UBR => (Up, Back, Right)); define_coordinates!("X=Right, Y=Up, Z=Back", RUB => (Right, Up, Back)); - define_coordinates!("X=Right, Y=Back, Z=Up", RBU => (Right, Back, Up)); - define_coordinates!("X=Back, Y=Up, Z=Right", BUR => (Back, Up, Right)); + define_coordinates!("X=Right, Y=Back, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RBU => (Right, Back, Up)); + define_coordinates!("X=Back, Y=Up, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BUR => (Back, Up, Right)); define_coordinates!("X=Back, Y=Right, Z=Up", BRU => (Back, Right, Up)); define_coordinates!("X=Down, Y=Left, Z=Forward", DLF => (Down, Left, Forward)); - define_coordinates!("X=Down, Y=Forward, Z=Left", DFL => (Down, Forward, Left)); - define_coordinates!("X=Left, Y=Down, Z=Forward", LDF => (Left, Down, Forward)); + define_coordinates!("X=Down, Y=Forward, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DFL => (Down, Forward, Left)); + define_coordinates!("X=Left, Y=Down, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LDF => (Left, Down, Forward)); define_coordinates!("X=Left, Y=Forward, Z=Down", LFD => (Left, Forward, Down)); define_coordinates!("X=Forward, Y=Down, Z=Left", FDL => (Forward, Down, Left)); - define_coordinates!("X=Forward, Y=Left, Z=Down", FLD => (Forward, Left, Down)); - define_coordinates!("X=Down, Y=Left, Z=Back", DLB => (Down, Left, Back)); + define_coordinates!("X=Forward, Y=Left, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FLD => (Forward, Left, Down)); + define_coordinates!("X=Down, Y=Left, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DLB => (Down, Left, Back)); define_coordinates!("X=Down, Y=Back, Z=Left", DBL => (Down, Back, Left)); define_coordinates!("X=Left, Y=Down, Z=Back", LDB => (Left, Down, Back)); - define_coordinates!("X=Left, Y=Back, Z=Down", LBD => (Left, Back, Down)); - define_coordinates!("X=Back, Y=Down, Z=Left", BDL => (Back, Down, Left)); + define_coordinates!("X=Left, Y=Back, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LBD => (Left, Back, Down)); + define_coordinates!("X=Back, Y=Down, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BDL => (Back, Down, Left)); define_coordinates!("X=Back, Y=Left, Z=Down", BLD => (Back, Left, Down)); - define_coordinates!("X=Down, Y=Right, Z=Forward", DRF => (Down, Right, Forward)); + define_coordinates!("X=Down, Y=Right, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DRF => (Down, Right, Forward)); define_coordinates!("X=Down, Y=Forward, Z=Right", DFR => (Down, Forward, Right)); define_coordinates!("X=Right, Y=Down, Z=Forward", RDF => (Right, Down, Forward)); - define_coordinates!("X=Right, Y=Forward, Z=Down", RFD => (Right, Forward, Down)); - define_coordinates!("X=Forward, Y=Down, Z=Right", FDR => (Forward, Down, Right)); + define_coordinates!("X=Right, Y=Forward, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RFD => (Right, Forward, Down)); + define_coordinates!("X=Forward, Y=Down, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", FDR => (Forward, Down, Right)); define_coordinates!("X=Forward, Y=Right, Z=Down", FRD => (Forward, Right, Down)); define_coordinates!("X=Down, Y=Right, Z=Back", DRB => (Down, Right, Back)); - define_coordinates!("X=Down, Y=Back, Z=Right", DBR => (Down, Back, Right)); - define_coordinates!("X=Right, Y=Down, Z=Back", RDB => (Right, Down, Back)); + define_coordinates!("X=Down, Y=Back, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", DBR => (Down, Back, Right)); + define_coordinates!("X=Right, Y=Down, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", RDB => (Right, Down, Back)); 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=Back, Y=Right, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", BRD => (Back, Right, Down)); 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)); define_coordinates!("X=Right, Y=Down, Z=Forward", RIGHT_HAND_Y_DOWN => (Right, Down, Forward)); define_coordinates!("X=Right, Y=Forward, Z=Up", RIGHT_HAND_Z_UP => (Right, Forward, Up)); define_coordinates!("X=Right, Y=Back, Z=Down", RIGHT_HAND_Z_DOWN => (Right, Back, Down)); - define_coordinates!("X=Up, Y=Right, Z=Back", LEFT_HAND_X_UP => (Up, Right, Back)); - define_coordinates!("X=Down, Y=Right, Z=Forward", LEFT_HAND_X_DOWN => (Down, Right, Forward)); - define_coordinates!("X=Right, Y=Up, Z=Forward", LEFT_HAND_Y_UP => (Right, Up, Forward)); - define_coordinates!("X=Right, Y=Down, Z=Back", LEFT_HAND_Y_DOWN => (Right, Down, Back)); - define_coordinates!("X=Right, Y=Back, Z=Up", LEFT_HAND_Z_UP => (Right, Back, Up)); - define_coordinates!("X=Right, Y=Forward, Z=Down", LEFT_HAND_Z_DOWN => (Right, Forward, Down)); + define_coordinates!("X=Up, Y=Right, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_X_UP => (Up, Right, Back)); + define_coordinates!("X=Down, Y=Right, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_X_DOWN => (Down, Right, Forward)); + define_coordinates!("X=Right, Y=Up, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Y_UP => (Right, Up, Forward)); + define_coordinates!("X=Right, Y=Down, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Y_DOWN => (Right, Down, Back)); + define_coordinates!("X=Right, Y=Back, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Z_UP => (Right, Back, Up)); + define_coordinates!("X=Right, Y=Forward, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).", LEFT_HAND_Z_DOWN => (Right, Forward, Down)); // } diff --git a/crates/store/re_types/src/datatypes/view_coordinates.rs b/crates/store/re_types/src/datatypes/view_coordinates.rs index 1da2ae98aea0..ce99e676e6b7 100644 --- a/crates/store/re_types/src/datatypes/view_coordinates.rs +++ b/crates/store/re_types/src/datatypes/view_coordinates.rs @@ -20,13 +20,15 @@ use ::re_types_core::{DeserializationError, DeserializationResult}; /// **Datatype**: How we interpret the coordinate system of an entity/space. /// -/// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +/// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points /// down, and the Z axis points forward. /// +/// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). +/// /// The following constants are used to represent the different directions: /// * Up = 1 /// * Down = 2 diff --git a/crates/viewer/re_viewer/src/reflection/mod.rs b/crates/viewer/re_viewer/src/reflection/mod.rs index 24d6a1935d60..025522c5253d 100644 --- a/crates/viewer/re_viewer/src/reflection/mod.rs +++ b/crates/viewer/re_viewer/src/reflection/mod.rs @@ -695,7 +695,7 @@ fn generate_component_reflection() -> Result::name(), ComponentReflection { - docstring_md: "How we interpret the coordinate system of an entity/space.\n\nFor instance: What is \"up\"? What does the Z axis mean? Is this right-handed or left-handed?\n\nThe three coordinates are always ordered as [x, y, z].\n\nFor example [Right, Down, Forward] means that the X axis points to the right, the Y axis points\ndown, and the Z axis points forward.\n\nThe following constants are used to represent the different directions:\n * Up = 1\n * Down = 2\n * Right = 3\n * Left = 4\n * Forward = 5\n * Back = 6", + docstring_md: "How we interpret the coordinate system of an entity/space.\n\nFor instance: What is \"up\"? What does the Z axis mean?\n\nThe three coordinates are always ordered as [x, y, z].\n\nFor example [Right, Down, Forward] means that the X axis points to the right, the Y axis points\ndown, and the Z axis points forward.\n\n⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032).\n\nThe following constants are used to represent the different directions:\n * Up = 1\n * Down = 2\n * Right = 3\n * Left = 4\n * Forward = 5\n * Back = 6", placeholder: Some(ViewCoordinates::default().to_arrow()?), }, ), diff --git a/docs/content/reference/types/archetypes/view_coordinates.md b/docs/content/reference/types/archetypes/view_coordinates.md index 68d44f93d9f4..544fd552f529 100644 --- a/docs/content/reference/types/archetypes/view_coordinates.md +++ b/docs/content/reference/types/archetypes/view_coordinates.md @@ -5,7 +5,7 @@ title: "ViewCoordinates" How we interpret the coordinate system of an entity/space. -For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +For instance: What is "up"? What does the Z axis mean? The three coordinates are always ordered as [x, y, z]. @@ -14,6 +14,8 @@ down, and the Z axis points forward. Make sure that this archetype is logged at or above the origin entity path of your 3D views. +⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + ## Components **Required**: [`ViewCoordinates`](../components/view_coordinates.md) diff --git a/docs/content/reference/types/components/view_coordinates.md b/docs/content/reference/types/components/view_coordinates.md index ad993b0098ac..567b88663c15 100644 --- a/docs/content/reference/types/components/view_coordinates.md +++ b/docs/content/reference/types/components/view_coordinates.md @@ -5,13 +5,15 @@ title: "ViewCoordinates" How we interpret the coordinate system of an entity/space. -For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +For instance: What is "up"? What does the Z axis mean? The three coordinates are always ordered as [x, y, z]. For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points down, and the Z axis points forward. +⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + The following constants are used to represent the different directions: * Up = 1 * Down = 2 diff --git a/docs/content/reference/types/datatypes/view_coordinates.md b/docs/content/reference/types/datatypes/view_coordinates.md index a3eeb9e5fb1d..bf2b806b42cd 100644 --- a/docs/content/reference/types/datatypes/view_coordinates.md +++ b/docs/content/reference/types/datatypes/view_coordinates.md @@ -5,13 +5,15 @@ title: "ViewCoordinates" How we interpret the coordinate system of an entity/space. -For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? +For instance: What is "up"? What does the Z axis mean? The three coordinates are always ordered as [x, y, z]. For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points down, and the Z axis points forward. +⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + The following constants are used to represent the different directions: * Up = 1 * Down = 2 diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp b/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp index 779a54a632fc..e23893a79f89 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates.hpp @@ -17,7 +17,7 @@ namespace rerun::archetypes { /// **Archetype**: How we interpret the coordinate system of an entity/space. /// - /// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? + /// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// @@ -26,6 +26,8 @@ namespace rerun::archetypes { /// /// Make sure that this archetype is logged at or above the origin entity path of your 3D views. /// + /// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + /// /// ## Example /// /// ### View coordinates for adjusting the eye camera @@ -65,6 +67,8 @@ namespace rerun::archetypes { // // This section is generated by running `scripts/generate_view_coordinate_defs.py --cpp` /// X=Up, Y=Left, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates ULF; /// X=Up, Y=Forward, Z=Left @@ -74,9 +78,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LUF; /// X=Left, Y=Forward, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LFU; /// X=Forward, Y=Up, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FUL; /// X=Forward, Y=Left, Z=Up @@ -86,9 +94,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates ULB; /// X=Up, Y=Back, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UBL; /// X=Left, Y=Up, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LUB; /// X=Left, Y=Back, Z=Up @@ -98,15 +110,21 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BUL; /// X=Back, Y=Left, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BLU; /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates URF; /// X=Up, Y=Forward, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UFR; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RUF; /// X=Right, Y=Forward, Z=Up @@ -116,9 +134,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FUR; /// X=Forward, Y=Right, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FRU; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates URB; /// X=Up, Y=Back, Z=Right @@ -128,9 +150,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RUB; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RBU; /// X=Back, Y=Up, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BUR; /// X=Back, Y=Right, Z=Up @@ -140,9 +166,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DLF; /// X=Down, Y=Forward, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DFL; /// X=Left, Y=Down, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LDF; /// X=Left, Y=Forward, Z=Down @@ -152,9 +182,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FDL; /// X=Forward, Y=Left, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FLD; /// X=Down, Y=Left, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DLB; /// X=Down, Y=Back, Z=Left @@ -164,15 +198,21 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LDB; /// X=Left, Y=Back, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LBD; /// X=Back, Y=Down, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BDL; /// X=Back, Y=Left, Z=Down RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BLD; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DRF; /// X=Down, Y=Forward, Z=Right @@ -182,9 +222,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RDF; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RFD; /// X=Forward, Y=Down, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FDR; /// X=Forward, Y=Right, Z=Down @@ -194,9 +238,13 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DRB; /// X=Down, Y=Back, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DBR; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RDB; /// X=Right, Y=Back, Z=Down @@ -206,6 +254,8 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BDR; /// X=Back, Y=Right, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BRD; /// X=Up, Y=Right, Z=Forward @@ -227,21 +277,33 @@ namespace rerun::archetypes { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RIGHT_HAND_Z_DOWN; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_X_UP; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_X_DOWN; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_UP; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_DOWN; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_UP; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_DOWN; // diff --git a/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp b/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp index 31de3b47e54b..484f0bb3f0b1 100644 --- a/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp +++ b/rerun_cpp/src/rerun/archetypes/view_coordinates_ext.cpp @@ -25,6 +25,8 @@ namespace rerun { // // This section is generated by running `scripts/generate_view_coordinate_defs.py --cpp` /// X=Up, Y=Left, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates ULF; /// X=Up, Y=Forward, Z=Left @@ -34,9 +36,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LUF; /// X=Left, Y=Forward, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LFU; /// X=Forward, Y=Up, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FUL; /// X=Forward, Y=Left, Z=Up @@ -46,9 +52,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates ULB; /// X=Up, Y=Back, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UBL; /// X=Left, Y=Up, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LUB; /// X=Left, Y=Back, Z=Up @@ -58,15 +68,21 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BUL; /// X=Back, Y=Left, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BLU; /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates URF; /// X=Up, Y=Forward, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates UFR; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RUF; /// X=Right, Y=Forward, Z=Up @@ -76,9 +92,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FUR; /// X=Forward, Y=Right, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FRU; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates URB; /// X=Up, Y=Back, Z=Right @@ -88,9 +108,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RUB; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RBU; /// X=Back, Y=Up, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BUR; /// X=Back, Y=Right, Z=Up @@ -100,9 +124,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DLF; /// X=Down, Y=Forward, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DFL; /// X=Left, Y=Down, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LDF; /// X=Left, Y=Forward, Z=Down @@ -112,9 +140,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FDL; /// X=Forward, Y=Left, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FLD; /// X=Down, Y=Left, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DLB; /// X=Down, Y=Back, Z=Left @@ -124,15 +156,21 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LDB; /// X=Left, Y=Back, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LBD; /// X=Back, Y=Down, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BDL; /// X=Back, Y=Left, Z=Down RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BLD; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DRF; /// X=Down, Y=Forward, Z=Right @@ -142,9 +180,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RDF; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RFD; /// X=Forward, Y=Down, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates FDR; /// X=Forward, Y=Right, Z=Down @@ -154,9 +196,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DRB; /// X=Down, Y=Back, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates DBR; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RDB; /// X=Right, Y=Back, Z=Down @@ -166,6 +212,8 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BDR; /// X=Back, Y=Right, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates BRD; /// X=Up, Y=Right, Z=Forward @@ -187,21 +235,33 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates RIGHT_HAND_Z_DOWN; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_X_UP; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_X_DOWN; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_UP; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Y_DOWN; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_UP; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates LEFT_HAND_Z_DOWN; // diff --git a/rerun_cpp/src/rerun/components/view_coordinates.hpp b/rerun_cpp/src/rerun/components/view_coordinates.hpp index 849fe074cbe9..5485e1aae665 100644 --- a/rerun_cpp/src/rerun/components/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/components/view_coordinates.hpp @@ -13,13 +13,15 @@ namespace rerun::components { /// **Component**: How we interpret the coordinate system of an entity/space. /// - /// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? + /// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points /// down, and the Z axis points forward. /// + /// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + /// /// The following constants are used to represent the different directions: /// * Up = 1 /// * Down = 2 @@ -52,6 +54,8 @@ namespace rerun::components { // // This section is generated by running `scripts/generate_view_coordinate_defs.py --cpp` /// X=Up, Y=Left, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates ULF; /// X=Up, Y=Forward, Z=Left @@ -61,9 +65,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LUF; /// X=Left, Y=Forward, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LFU; /// X=Forward, Y=Up, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FUL; /// X=Forward, Y=Left, Z=Up @@ -73,9 +81,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates ULB; /// X=Up, Y=Back, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UBL; /// X=Left, Y=Up, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LUB; /// X=Left, Y=Back, Z=Up @@ -85,15 +97,21 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BUL; /// X=Back, Y=Left, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BLU; /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates URF; /// X=Up, Y=Forward, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UFR; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RUF; /// X=Right, Y=Forward, Z=Up @@ -103,9 +121,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FUR; /// X=Forward, Y=Right, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FRU; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates URB; /// X=Up, Y=Back, Z=Right @@ -115,9 +137,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RUB; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RBU; /// X=Back, Y=Up, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BUR; /// X=Back, Y=Right, Z=Up @@ -127,9 +153,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DLF; /// X=Down, Y=Forward, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DFL; /// X=Left, Y=Down, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LDF; /// X=Left, Y=Forward, Z=Down @@ -139,9 +169,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FDL; /// X=Forward, Y=Left, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FLD; /// X=Down, Y=Left, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DLB; /// X=Down, Y=Back, Z=Left @@ -151,15 +185,21 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LDB; /// X=Left, Y=Back, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LBD; /// X=Back, Y=Down, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BDL; /// X=Back, Y=Left, Z=Down RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BLD; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DRF; /// X=Down, Y=Forward, Z=Right @@ -169,9 +209,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RDF; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RFD; /// X=Forward, Y=Down, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FDR; /// X=Forward, Y=Right, Z=Down @@ -181,9 +225,13 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DRB; /// X=Down, Y=Back, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DBR; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RDB; /// X=Right, Y=Back, Z=Down @@ -193,6 +241,8 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BDR; /// X=Back, Y=Right, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BRD; /// X=Up, Y=Right, Z=Forward @@ -214,21 +264,33 @@ namespace rerun::components { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RIGHT_HAND_Z_DOWN; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_X_UP; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_X_DOWN; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Y_UP; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Y_DOWN; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Z_UP; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Z_DOWN; // diff --git a/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp b/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp index c36d1f6f487d..c2d891c709a7 100644 --- a/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp +++ b/rerun_cpp/src/rerun/components/view_coordinates_ext.cpp @@ -38,6 +38,8 @@ namespace rerun { // // This section is generated by running `scripts/generate_view_coordinate_defs.py --cpp` /// X=Up, Y=Left, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates ULF; /// X=Up, Y=Forward, Z=Left @@ -47,9 +49,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LUF; /// X=Left, Y=Forward, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LFU; /// X=Forward, Y=Up, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FUL; /// X=Forward, Y=Left, Z=Up @@ -59,9 +65,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates ULB; /// X=Up, Y=Back, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UBL; /// X=Left, Y=Up, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LUB; /// X=Left, Y=Back, Z=Up @@ -71,15 +81,21 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BUL; /// X=Back, Y=Left, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BLU; /// X=Up, Y=Right, Z=Forward RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates URF; /// X=Up, Y=Forward, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates UFR; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RUF; /// X=Right, Y=Forward, Z=Up @@ -89,9 +105,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FUR; /// X=Forward, Y=Right, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FRU; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates URB; /// X=Up, Y=Back, Z=Right @@ -101,9 +121,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RUB; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RBU; /// X=Back, Y=Up, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BUR; /// X=Back, Y=Right, Z=Up @@ -113,9 +137,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DLF; /// X=Down, Y=Forward, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DFL; /// X=Left, Y=Down, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LDF; /// X=Left, Y=Forward, Z=Down @@ -125,9 +153,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FDL; /// X=Forward, Y=Left, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FLD; /// X=Down, Y=Left, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DLB; /// X=Down, Y=Back, Z=Left @@ -137,15 +169,21 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LDB; /// X=Left, Y=Back, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LBD; /// X=Back, Y=Down, Z=Left + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BDL; /// X=Back, Y=Left, Z=Down RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BLD; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DRF; /// X=Down, Y=Forward, Z=Right @@ -155,9 +193,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RDF; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RFD; /// X=Forward, Y=Down, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates FDR; /// X=Forward, Y=Right, Z=Down @@ -167,9 +209,13 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DRB; /// X=Down, Y=Back, Z=Right + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates DBR; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RDB; /// X=Right, Y=Back, Z=Down @@ -179,6 +225,8 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BDR; /// X=Back, Y=Right, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates BRD; /// X=Up, Y=Right, Z=Forward @@ -200,21 +248,33 @@ namespace rerun { RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates RIGHT_HAND_Z_DOWN; /// X=Up, Y=Right, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_X_UP; /// X=Down, Y=Right, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_X_DOWN; /// X=Right, Y=Up, Z=Forward + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Y_UP; /// X=Right, Y=Down, Z=Back + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Y_DOWN; /// X=Right, Y=Back, Z=Up + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Z_UP; /// X=Right, Y=Forward, Z=Down + /// + /// ⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032). RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates LEFT_HAND_Z_DOWN; // diff --git a/rerun_cpp/src/rerun/datatypes/view_coordinates.hpp b/rerun_cpp/src/rerun/datatypes/view_coordinates.hpp index 1ed6a59d77a8..a614773307ef 100644 --- a/rerun_cpp/src/rerun/datatypes/view_coordinates.hpp +++ b/rerun_cpp/src/rerun/datatypes/view_coordinates.hpp @@ -18,13 +18,15 @@ namespace arrow { namespace rerun::datatypes { /// **Datatype**: How we interpret the coordinate system of an entity/space. /// - /// For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? + /// For instance: What is "up"? What does the Z axis mean? /// /// The three coordinates are always ordered as [x, y, z]. /// /// For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points /// down, and the Z axis points forward. /// + /// ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + /// /// The following constants are used to represent the different directions: /// * Up = 1 /// * Down = 2 diff --git a/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py b/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py index 5f28f6ccc80c..ada329cf25a9 100644 --- a/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/archetypes/view_coordinates.py @@ -24,7 +24,7 @@ class ViewCoordinates(ViewCoordinatesExt, Archetype): """ **Archetype**: How we interpret the coordinate system of an entity/space. - For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? + For instance: What is "up"? What does the Z axis mean? The three coordinates are always ordered as [x, y, z]. @@ -33,6 +33,8 @@ class ViewCoordinates(ViewCoordinatesExt, Archetype): Make sure that this archetype is logged at or above the origin entity path of your 3D views. + ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + Example ------- ### View coordinates for adjusting the eye camera: diff --git a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py index 9824eb7506e6..ea0c1e89d2d7 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates.py @@ -19,13 +19,15 @@ class ViewCoordinates(ViewCoordinatesExt, datatypes.ViewCoordinates, ComponentMi """ **Component**: How we interpret the coordinate system of an entity/space. - For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? + For instance: What is "up"? What does the Z axis mean? The three coordinates are always ordered as [x, y, z]. For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points down, and the Z axis points forward. + ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + The following constants are used to represent the different directions: * Up = 1 * Down = 2 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 6a699de6611e..abc1559fde84 100644 --- a/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py +++ b/rerun_py/rerun_sdk/rerun/components/view_coordinates_ext.py @@ -44,7 +44,9 @@ def num_instances(self) -> int: # This section is generated by running `scripts/generate_view_coordinate_defs.py --python` # The following declarations are replaced in `deferred_patch_class`. ULF: ViewCoordinates = None # type: ignore[assignment] - """X=Up, Y=Left, Z=Forward""" + """X=Up, Y=Left, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" UFL: ViewCoordinates = None # type: ignore[assignment] """X=Up, Y=Forward, Z=Left""" @@ -53,10 +55,14 @@ def num_instances(self) -> int: """X=Left, Y=Up, Z=Forward""" LFU: ViewCoordinates = None # type: ignore[assignment] - """X=Left, Y=Forward, Z=Up""" + """X=Left, Y=Forward, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" FUL: ViewCoordinates = None # type: ignore[assignment] - """X=Forward, Y=Up, Z=Left""" + """X=Forward, Y=Up, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" FLU: ViewCoordinates = None # type: ignore[assignment] """X=Forward, Y=Left, Z=Up""" @@ -65,10 +71,14 @@ def num_instances(self) -> int: """X=Up, Y=Left, Z=Back""" UBL: ViewCoordinates = None # type: ignore[assignment] - """X=Up, Y=Back, Z=Left""" + """X=Up, Y=Back, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LUB: ViewCoordinates = None # type: ignore[assignment] - """X=Left, Y=Up, Z=Back""" + """X=Left, Y=Up, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LBU: ViewCoordinates = None # type: ignore[assignment] """X=Left, Y=Back, Z=Up""" @@ -77,16 +87,22 @@ def num_instances(self) -> int: """X=Back, Y=Up, Z=Left""" BLU: ViewCoordinates = None # type: ignore[assignment] - """X=Back, Y=Left, Z=Up""" + """X=Back, Y=Left, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" URF: ViewCoordinates = None # type: ignore[assignment] """X=Up, Y=Right, Z=Forward""" UFR: ViewCoordinates = None # type: ignore[assignment] - """X=Up, Y=Forward, Z=Right""" + """X=Up, Y=Forward, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" RUF: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Up, Z=Forward""" + """X=Right, Y=Up, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" RFU: ViewCoordinates = None # type: ignore[assignment] """X=Right, Y=Forward, Z=Up""" @@ -95,10 +111,14 @@ def num_instances(self) -> int: """X=Forward, Y=Up, Z=Right""" FRU: ViewCoordinates = None # type: ignore[assignment] - """X=Forward, Y=Right, Z=Up""" + """X=Forward, Y=Right, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" URB: ViewCoordinates = None # type: ignore[assignment] - """X=Up, Y=Right, Z=Back""" + """X=Up, Y=Right, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" UBR: ViewCoordinates = None # type: ignore[assignment] """X=Up, Y=Back, Z=Right""" @@ -107,10 +127,14 @@ def num_instances(self) -> int: """X=Right, Y=Up, Z=Back""" RBU: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Back, Z=Up""" + """X=Right, Y=Back, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" BUR: ViewCoordinates = None # type: ignore[assignment] - """X=Back, Y=Up, Z=Right""" + """X=Back, Y=Up, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" BRU: ViewCoordinates = None # type: ignore[assignment] """X=Back, Y=Right, Z=Up""" @@ -119,10 +143,14 @@ def num_instances(self) -> int: """X=Down, Y=Left, Z=Forward""" DFL: ViewCoordinates = None # type: ignore[assignment] - """X=Down, Y=Forward, Z=Left""" + """X=Down, Y=Forward, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LDF: ViewCoordinates = None # type: ignore[assignment] - """X=Left, Y=Down, Z=Forward""" + """X=Left, Y=Down, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LFD: ViewCoordinates = None # type: ignore[assignment] """X=Left, Y=Forward, Z=Down""" @@ -131,10 +159,14 @@ def num_instances(self) -> int: """X=Forward, Y=Down, Z=Left""" FLD: ViewCoordinates = None # type: ignore[assignment] - """X=Forward, Y=Left, Z=Down""" + """X=Forward, Y=Left, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" DLB: ViewCoordinates = None # type: ignore[assignment] - """X=Down, Y=Left, Z=Back""" + """X=Down, Y=Left, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" DBL: ViewCoordinates = None # type: ignore[assignment] """X=Down, Y=Back, Z=Left""" @@ -143,16 +175,22 @@ def num_instances(self) -> int: """X=Left, Y=Down, Z=Back""" LBD: ViewCoordinates = None # type: ignore[assignment] - """X=Left, Y=Back, Z=Down""" + """X=Left, Y=Back, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" BDL: ViewCoordinates = None # type: ignore[assignment] - """X=Back, Y=Down, Z=Left""" + """X=Back, Y=Down, Z=Left + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" BLD: ViewCoordinates = None # type: ignore[assignment] """X=Back, Y=Left, Z=Down""" DRF: ViewCoordinates = None # type: ignore[assignment] - """X=Down, Y=Right, Z=Forward""" + """X=Down, Y=Right, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" DFR: ViewCoordinates = None # type: ignore[assignment] """X=Down, Y=Forward, Z=Right""" @@ -161,10 +199,14 @@ def num_instances(self) -> int: """X=Right, Y=Down, Z=Forward""" RFD: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Forward, Z=Down""" + """X=Right, Y=Forward, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" FDR: ViewCoordinates = None # type: ignore[assignment] - """X=Forward, Y=Down, Z=Right""" + """X=Forward, Y=Down, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" FRD: ViewCoordinates = None # type: ignore[assignment] """X=Forward, Y=Right, Z=Down""" @@ -173,10 +215,14 @@ def num_instances(self) -> int: """X=Down, Y=Right, Z=Back""" DBR: ViewCoordinates = None # type: ignore[assignment] - """X=Down, Y=Back, Z=Right""" + """X=Down, Y=Back, Z=Right + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" RDB: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Down, Z=Back""" + """X=Right, Y=Down, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" RBD: ViewCoordinates = None # type: ignore[assignment] """X=Right, Y=Back, Z=Down""" @@ -185,7 +231,9 @@ def num_instances(self) -> int: """X=Back, Y=Down, Z=Right""" BRD: ViewCoordinates = None # type: ignore[assignment] - """X=Back, Y=Right, Z=Down""" + """X=Back, Y=Right, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" RIGHT_HAND_X_UP: ViewCoordinates = None # type: ignore[assignment] """X=Up, Y=Right, Z=Forward""" @@ -206,22 +254,34 @@ def num_instances(self) -> int: """X=Right, Y=Back, Z=Down""" LEFT_HAND_X_UP: ViewCoordinates = None # type: ignore[assignment] - """X=Up, Y=Right, Z=Back""" + """X=Up, Y=Right, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LEFT_HAND_X_DOWN: ViewCoordinates = None # type: ignore[assignment] - """X=Down, Y=Right, Z=Forward""" + """X=Down, Y=Right, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LEFT_HAND_Y_UP: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Up, Z=Forward""" + """X=Right, Y=Up, Z=Forward + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LEFT_HAND_Y_DOWN: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Down, Z=Back""" + """X=Right, Y=Down, Z=Back + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LEFT_HAND_Z_UP: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Back, Z=Up""" + """X=Right, Y=Back, Z=Up + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" LEFT_HAND_Z_DOWN: ViewCoordinates = None # type: ignore[assignment] - """X=Right, Y=Forward, Z=Down""" + """X=Right, Y=Forward, Z=Down + +⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032).""" # diff --git a/rerun_py/rerun_sdk/rerun/datatypes/view_coordinates.py b/rerun_py/rerun_sdk/rerun/datatypes/view_coordinates.py index f694e3bb5395..1c74dafbdbb7 100644 --- a/rerun_py/rerun_sdk/rerun/datatypes/view_coordinates.py +++ b/rerun_py/rerun_sdk/rerun/datatypes/view_coordinates.py @@ -35,13 +35,15 @@ class ViewCoordinates(ViewCoordinatesExt): """ **Datatype**: How we interpret the coordinate system of an entity/space. - For instance: What is "up"? What does the Z axis mean? Is this right-handed or left-handed? + For instance: What is "up"? What does the Z axis mean? The three coordinates are always ordered as [x, y, z]. For example [Right, Down, Forward] means that the X axis points to the right, the Y axis points down, and the Z axis points forward. + ⚠ [Rerun does not yet support left-handed coordinate systems](https://github.com/rerun-io/rerun/issues/5032). + The following constants are used to represent the different directions: * Up = 1 * Down = 2 diff --git a/scripts/generate_view_coordinate_defs.py b/scripts/generate_view_coordinate_defs.py index 1a8fd3d34b4e..078afa788bea 100755 --- a/scripts/generate_view_coordinate_defs.py +++ b/scripts/generate_view_coordinate_defs.py @@ -31,9 +31,47 @@ class ViewCoordinates: z: str -def docstring(coords: ViewCoordinates) -> str: - # TODO(emilk): warn about left-handed coordinate systems - return f"X={coords.x}, Y={coords.y}, Z={coords.z}" +def is_left_handed(coords: ViewCoordinates) -> bool: + def rfd(dir: str) -> tuple[int, int, int]: + if dir == "Right": + return (1, 0, 0) + elif dir == "Left": + return (-1, 0, 0) + elif dir == "Up": + return (0, -1, 0) + elif dir == "Down": + return (0, 1, 0) + elif dir == "Back": + return (0, 0, -1) + elif dir == "Forward": + return (0, 0, 1) + else: + raise RuntimeWarning(f"Unknown direction: {dir}") + + m00, m01, m02 = rfd(coords.x) + m10, m11, m12 = rfd(coords.y) + m20, m21, m22 = rfd(coords.z) + + deterimnant = ( + m00 * m11 * m22 + m01 * m12 * m20 + m02 * m10 * m21 - m02 * m11 * m20 - m01 * m10 * m22 - m00 * m12 * m21 + ) + + if deterimnant == 1: + return False + elif deterimnant == -1: + return True + else: + raise RuntimeWarning(f"Degenerate coordinate system: {coords} with ddeterimnant {deterimnant}") + + +def doclines(coords: ViewCoordinates) -> list[str]: + docs = [f"X={coords.x}, Y={coords.y}, Z={coords.z}"] + if is_left_handed(coords): + docs.append("") + docs.append( + "⚠️ This is a left-handed coordinate system, which is [not yet supported by Rerun](https://github.com/rerun-io/rerun/issues/5032)." + ) + return docs def generate_view_permutations() -> Iterable[ViewCoordinates]: @@ -71,7 +109,8 @@ def generate_up_handed_permutations() -> Iterable[ViewCoordinates]: def rust_arch_decl(coords: ViewCoordinates) -> str: - return f'define_coordinates!("{docstring(coords)}", {coords.name} => ({coords.x}, {coords.y}, {coords.z}));\n' + docstring = "\n".join(doclines(coords)) + return f'define_coordinates!("{docstring}", {coords.name} => ({coords.x}, {coords.y}, {coords.z}));\n' def gen_rust_arch_decl() -> list[str]: @@ -91,7 +130,8 @@ def gen_rust_arch_decl() -> list[str]: def rust_cmp_decl(coords: ViewCoordinates) -> str: - return f'define_coordinates!("{docstring(coords)}", {coords.name} => ({coords.x}, {coords.y}, {coords.z}));\n' + docstring = "\n".join(doclines(coords)) + return f'define_coordinates!("{docstring}", {coords.name} => ({coords.x}, {coords.y}, {coords.z}));\n' def gen_rust_cmp_decl() -> list[str]: @@ -151,7 +191,8 @@ def gen_py_arch_def() -> list[str]: def py_cmp_decl(coords: ViewCoordinates) -> str: - return f'{coords.name}: ViewCoordinates = None # type: ignore[assignment]\n """{docstring(coords)}"""\n\n' + docstring = "\n".join(doclines(coords)) + return f'{coords.name}: ViewCoordinates = None # type: ignore[assignment]\n """{docstring}"""\n\n' def gen_py_cmp_decl() -> list[str]: @@ -189,9 +230,8 @@ def gen_py_cmp_def() -> list[str]: def cpp_arch_decl(coords: ViewCoordinates) -> str: - return ( - f"/// {docstring(coords)}\nRERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates {coords.name};\n\n" - ) + docstring = "".join(f"/// {docline}\n" for docline in doclines(coords)) + return f"{docstring}RERUN_SDK_EXPORT static const rerun::archetypes::ViewCoordinates {coords.name};\n\n" def gen_cpp_arch_decl() -> list[str]: @@ -232,9 +272,8 @@ def gen_cpp_arch_def() -> list[str]: def cpp_cmp_decl(coords: ViewCoordinates) -> str: - return ( - f"/// {docstring(coords)}\nRERUN_SDK_EXPORT static const rerun::components::ViewCoordinates {coords.name};\n\n" - ) + docstring = "".join(f"/// {docline}\n" for docline in doclines(coords)) + return f"{docstring}RERUN_SDK_EXPORT static const rerun::components::ViewCoordinates {coords.name};\n\n" def gen_cpp_cmp_decl() -> list[str]: