Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Document that Rerun does not support left-handed coords #7690

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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].
///
Expand All @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion crates/store/re_types/src/archetypes/view_coordinates.rs

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

120 changes: 90 additions & 30 deletions crates/store/re_types/src/archetypes/view_coordinates_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,65 +14,125 @@ macro_rules! define_coordinates {
impl ViewCoordinates {
// <BEGIN_GENERATED:declarations>
// 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));
// <END_GENERATED:declarations>
}
4 changes: 3 additions & 1 deletion crates/store/re_types/src/components/view_coordinates.rs

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

Loading
Loading