Skip to content

Commit

Permalink
Document that Rerun does not support left-handed coords (#7690)
Browse files Browse the repository at this point in the history
### What
* Closes #5033
* 
<img width="860" alt="Screenshot 2024-10-11 at 11 27 56"
src="https://github.com/user-attachments/assets/b76607f4-fa84-44b5-bb31-d33c9b2b4226">
<img width="748" alt="Screenshot 2024-10-11 at 11 25 48"
src="https://github.com/user-attachments/assets/d249395d-6707-4498-928b-135e35b635f2">

### 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`.
  • Loading branch information
emilk authored Oct 11, 2024
1 parent 62139df commit c06745f
Show file tree
Hide file tree
Showing 22 changed files with 607 additions and 118 deletions.
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

0 comments on commit c06745f

Please sign in to comment.