pub struct SemanticObject<ObjectCategory> { /* private fields */ }Expand description
Represents a distinct semantically annotated object.
The source index is also the object’s semantic id.
Implementations§
Source§impl<ObjectCategory> SemanticObject<ObjectCategory>
impl<ObjectCategory> SemanticObject<ObjectCategory>
Sourcepub const fn new(index: i32, category: Option<ObjectCategory>, obb: Obb) -> Self
pub const fn new(index: i32, category: Option<ObjectCategory>, obb: Obb) -> Self
Creates a semantic object.
index is the original descriptor index for this object.
Sourcepub const fn semantic_id(&self) -> i32
pub const fn semantic_id(&self) -> i32
Returns the unique semantic id corresponding to this object.
Sourcepub const fn category(&self) -> Option<&ObjectCategory>
pub const fn category(&self) -> Option<&ObjectCategory>
Returns this object’s dataset-specific category.
Trait Implementations§
Source§impl<ObjectCategory: Clone> Clone for SemanticObject<ObjectCategory>
impl<ObjectCategory: Clone> Clone for SemanticObject<ObjectCategory>
Source§fn clone(&self) -> SemanticObject<ObjectCategory>
fn clone(&self) -> SemanticObject<ObjectCategory>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<ObjectCategory: Debug> Debug for SemanticObject<ObjectCategory>
impl<ObjectCategory: Debug> Debug for SemanticObject<ObjectCategory>
Source§impl<OC: Display> Display for SemanticObject<OC>
impl<OC: Display> Display for SemanticObject<OC>
Source§impl<ObjectCategory: PartialEq> PartialEq for SemanticObject<ObjectCategory>
impl<ObjectCategory: PartialEq> PartialEq for SemanticObject<ObjectCategory>
Source§fn eq(&self, other: &SemanticObject<ObjectCategory>) -> bool
fn eq(&self, other: &SemanticObject<ObjectCategory>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<ObjectCategory> StructuralPartialEq for SemanticObject<ObjectCategory>
Auto Trait Implementations§
impl<ObjectCategory> Freeze for SemanticObject<ObjectCategory>where
ObjectCategory: Freeze,
impl<ObjectCategory> RefUnwindSafe for SemanticObject<ObjectCategory>where
ObjectCategory: RefUnwindSafe,
impl<ObjectCategory> Send for SemanticObject<ObjectCategory>where
ObjectCategory: Send,
impl<ObjectCategory> Sync for SemanticObject<ObjectCategory>where
ObjectCategory: Sync,
impl<ObjectCategory> Unpin for SemanticObject<ObjectCategory>where
ObjectCategory: Unpin,
impl<ObjectCategory> UnsafeUnpin for SemanticObject<ObjectCategory>where
ObjectCategory: UnsafeUnpin,
impl<ObjectCategory> UnwindSafe for SemanticObject<ObjectCategory>where
ObjectCategory: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more