pub struct EntityVisibility { /* private fields */ }Expand description
The hidden-entity sets of ONE solid (empty = all visible). Indices are into
the owning SolidDisplay’s faces / edges / vertices.
Implementations§
Source§impl EntityVisibility
impl EntityVisibility
Sourcepub fn is_visible(&self, kind: EntityKind, index: usize) -> bool
pub fn is_visible(&self, kind: EntityKind, index: usize) -> bool
Whether entity index of kind is currently shown.
Whether ANY entity of kind is hidden — the render pass’s fast-path
guard (nothing hidden ⇒ keep the single whole-buffer draw).
Sourcepub fn set_visible(&mut self, kind: EntityKind, index: usize, visible: bool)
pub fn set_visible(&mut self, kind: EntityKind, index: usize, visible: bool)
Show/hide a single entity of kind.
Sourcepub fn set_group_visible(
&mut self,
kind: EntityKind,
count: usize,
visible: bool,
)
pub fn set_group_visible( &mut self, kind: EntityKind, count: usize, visible: bool, )
Show/hide EVERY entity of kind. count is the number of entities of
that kind, so “hide all” enumerates them (and “show all” clears).
Sourcepub fn group_state(&self, kind: EntityKind, count: usize) -> GroupState
pub fn group_state(&self, kind: EntityKind, count: usize) -> GroupState
The group tristate for count entities of kind. O(1): the hidden set
satisfies hidden ⊆ 0..count (see all_hidden), so its
len() IS the hidden count — no per-entity scan. Called per solid per egui
frame by the Scene panel, so the O(1) matters on point/edge-heavy models.
pub fn is_face_visible(&self, index: usize) -> bool
pub fn is_edge_visible(&self, index: usize) -> bool
pub fn is_vertex_visible(&self, index: usize) -> bool
Whether EVERY entity of kind is hidden — O(1). A solid’s hidden set is
always paired with the entity counts it was built against: geometry changes
replace the whole SolidDisplay (fresh, empty visibility), and a reused
display keeps its counts AND its hidden set together — so hidden ⊆ 0..count
holds universally and len() == count ⇔ the whole group is off (individual
hides leave len() < count). >= rather than == is defensive only. The
render pass uses this to skip a fully-hidden group’s per-vertex draw loop.
Trait Implementations§
Source§impl Clone for EntityVisibility
impl Clone for EntityVisibility
Source§fn clone(&self) -> EntityVisibility
fn clone(&self) -> EntityVisibility
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EntityVisibility
impl Debug for EntityVisibility
Source§impl Default for EntityVisibility
impl Default for EntityVisibility
Source§fn default() -> EntityVisibility
fn default() -> EntityVisibility
Source§impl<'de> Deserialize<'de> for EntityVisibility
impl<'de> Deserialize<'de> for EntityVisibility
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for EntityVisibility
impl RefUnwindSafe for EntityVisibility
impl Send for EntityVisibility
impl Sync for EntityVisibility
impl Unpin for EntityVisibility
impl UnsafeUnpin for EntityVisibility
impl UnwindSafe for EntityVisibility
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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 more