pub struct SemanticScene { /* private fields */ }Expand description
Scene containing semantically annotated levels, regions, and objects.
This mirrors Habitat-Sim’s SemanticScene at the API-shape level while
using Rust ownership and indices instead of shared-pointer graphs.
Implementations§
Source§impl SemanticScene
impl SemanticScene
Sourcepub const fn aabb(&self) -> Option<&Aabb>
pub const fn aabb(&self) -> Option<&Aabb>
Returns the scene axis-aligned bounding box.
Habitat-Sim exposes this as aabb(). It is optional here because a
malformed or partially built scene may not have a parsed header.
Sourcepub fn count(&self, element: ElementKind) -> Option<usize>
pub fn count(&self, element: ElementKind) -> Option<usize>
Returns the total number of a given element type from the descriptor header.
Sourcepub fn categories(&self) -> &[Category]
pub fn categories(&self) -> &[Category]
Returns all semantic object categories in the scene.
Sourcepub fn levels(&self) -> &[SemanticLevel]
pub fn levels(&self) -> &[SemanticLevel]
Returns all levels in the scene.
Sourcepub fn regions(&self) -> &[SemanticRegion]
pub fn regions(&self) -> &[SemanticRegion]
Returns all regions in the scene.
Sourcepub fn objects(&self) -> &[SemanticObject]
pub fn objects(&self) -> &[SemanticObject]
Returns all semantic objects in the scene.
Sourcepub const fn semantic_index_map(&self) -> &HashMap<i32, usize>
pub const fn semantic_index_map(&self) -> &HashMap<i32, usize>
Returns the semantic mesh mask index to object index map.
Sourcepub fn semantic_index_to_object_index(&self, mask_index: i32) -> Option<usize>
pub fn semantic_index_to_object_index(&self, mask_index: i32) -> Option<usize>
Converts a semantic mesh mask index to an object index.
Habitat-Sim returns ID_UNDEFINED on miss. This Rust API returns
None instead.
Trait Implementations§
Source§impl Clone for SemanticScene
impl Clone for SemanticScene
Source§fn clone(&self) -> SemanticScene
fn clone(&self) -> SemanticScene
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more