-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Turn on depth cloud backprojection by default (#1710)
* Always backproject depth images by default * Refactor depth_props_ui * Calculate the closest pinhole transform on the fly * Fix: you can turn off depth back-projection * `backproject_depth` default on for 3D, default off for 2D * Refactor: return the error description
- Loading branch information
Showing
6 changed files
with
101 additions
and
72 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use re_arrow_store::LatestAtQuery; | ||
use re_data_store::{query_latest_single, EntityPath}; | ||
use re_log_types::Transform; | ||
|
||
use super::ViewerContext; | ||
|
||
/// Find closest entity with a pinhole transform. | ||
pub fn closest_pinhole_transform( | ||
ctx: &ViewerContext<'_>, | ||
entity_path: &EntityPath, | ||
query: &LatestAtQuery, | ||
) -> Option<EntityPath> { | ||
crate::profile_function!(); | ||
|
||
let mut pinhole_ent_path = None; | ||
let mut cur_path = Some(entity_path.clone()); | ||
while let Some(path) = cur_path { | ||
if let Some(Transform::Pinhole(_)) = | ||
query_latest_single::<Transform>(&ctx.log_db.entity_db, &path, query) | ||
{ | ||
pinhole_ent_path = Some(path); | ||
break; | ||
} | ||
cur_path = path.parent(); | ||
} | ||
pinhole_ent_path | ||
} |
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