pub struct VoidIndex { /* private fields */ }Expand description
Index mapping host elements to their voids
Provides efficient lookup of void entity IDs for any host element, enabling void-aware geometry processing.
Implementations§
Source§impl VoidIndex
impl VoidIndex
Sourcepub fn from_content<T>(content: &T, decoder: &mut EntityDecoder<'_>) -> Self
pub fn from_content<T>(content: &T, decoder: &mut EntityDecoder<'_>) -> Self
Sourcepub fn add_relationship(&mut self, host_id: u32, void_id: u32)
pub fn add_relationship(&mut self, host_id: u32, void_id: u32)
Add a void relationship
Sourcepub fn void_count(&self, host_id: u32) -> usize
pub fn void_count(&self, host_id: u32) -> usize
Get number of voids for a host element
Sourcepub fn host_count(&self) -> usize
pub fn host_count(&self) -> usize
Get total number of host elements with voids
Sourcepub fn total_relationships(&self) -> usize
pub fn total_relationships(&self) -> usize
Get total number of void relationships
Sourcepub fn iter(&self) -> impl Iterator<Item = (u32, &[u32])>
pub fn iter(&self) -> impl Iterator<Item = (u32, &[u32])>
Iterate over all host elements and their voids
Sourcepub fn hosts_with_voids(&self) -> Vec<u32>
pub fn hosts_with_voids(&self) -> Vec<u32>
Get all host IDs that have voids
Sourcepub fn is_host_with_voids(&self, entity_id: u32) -> bool
pub fn is_host_with_voids(&self, entity_id: u32) -> bool
Check if an entity is a host with voids
Trait Implementations§
Auto Trait Implementations§
impl Freeze for VoidIndex
impl RefUnwindSafe for VoidIndex
impl Send for VoidIndex
impl Sync for VoidIndex
impl Unpin for VoidIndex
impl UnsafeUnpin for VoidIndex
impl UnwindSafe for VoidIndex
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.