-
Notifications
You must be signed in to change notification settings - Fork 385
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved 3D transform ingestion & affine transform support (#2102)
* Transform is now Transform3D and has an affine transform with various options * todo notes on sparse enums in transform3d * from instead of into glam impls * add more utilities, port rust examples * better ui display for transform3d * transform3d now also captures direction parent/child child/parent * Fix images with same render order not layering transparently * nicer draw order sample * every draw order given out is individual again to avoid z fighting * affine3 python interface wip * unified affine transform logging from python * hide zero translations * fix up log_rigid3 and deprecate it * example for log_affine3 * Rename RotationAxisAngle * py-lint fixes * re-enable data_table_sizes_basics test * more docs and doc tests for transform3d * implement pinhole via transform3d.py * spelling * better affine transform error messages on python, fix tensor logging again * linting, small improvements * update all uses of log_rigid3 in python examples * fix old python incompatibility issues * split up transform enum into three different components rust only so far * wire up python sdk again to new components * fix pinhole camera not being categorized as spatial * enable custom pinhole ui * Rename to TranslationAndMat3 * fixup some tests in re_log_types * mono component documentation * fixup test_clean_for_polars_modify * change python api to log_transform3d * explicit quaternion type for python * Translation3D is now its own enum to allow explicit non-logged translation * fix quaternion logging in examples * slightly better error messages on wrong type in python transform api * Rust fmt * rust test fix * Avoid using attr.dataclass * comment and cosmetic fixes, fixes for ros demo * translation/rotation/scale are now options * rename creation methods in rust api fro Transform3D * fixup SpaceInfoConnection to be more versatile * Rigid3D helper class on python * a bit nicer rust api, less word duplication * Quaternion is no longer a dataclass in order to enforce spelling out the ordering * fix documentation of datalayout for matrix on python transform api * test/lint fixes * doc fix * fixup ros demo --------- Co-authored-by: Jeremy Leibs <[email protected]>
- Loading branch information
Showing
63 changed files
with
2,191 additions
and
921 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
use re_log_types::component_types::Pinhole; | ||
use re_viewer_context::{UiVerbosity, ViewerContext}; | ||
|
||
use crate::DataUi; | ||
|
||
impl DataUi for Pinhole { | ||
fn data_ui( | ||
&self, | ||
ctx: &mut ViewerContext<'_>, | ||
ui: &mut egui::Ui, | ||
verbosity: UiVerbosity, | ||
query: &re_arrow_store::LatestAtQuery, | ||
) { | ||
match verbosity { | ||
UiVerbosity::Small => { | ||
ui.label("Pinhole transform").on_hover_ui(|ui| { | ||
self.data_ui(ctx, ui, UiVerbosity::All, query); | ||
}); | ||
} | ||
|
||
UiVerbosity::All | UiVerbosity::Reduced => { | ||
let Pinhole { | ||
image_from_cam: image_from_view, | ||
resolution, | ||
} = self; | ||
|
||
ui.vertical(|ui| { | ||
ui.label("Pinhole transform:"); | ||
ui.indent("pinole", |ui| { | ||
ui.horizontal(|ui| { | ||
ui.label("resolution:"); | ||
if let Some(re_log_types::component_types::Vec2D([x, y])) = resolution { | ||
ui.monospace(format!("{x}x{y}")); | ||
} else { | ||
ui.weak("(none)"); | ||
} | ||
}); | ||
|
||
ui.label("image from view:"); | ||
ui.indent("image_from_view", |ui| { | ||
image_from_view.data_ui(ctx, ui, verbosity, query); | ||
}); | ||
}); | ||
}); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.