#[non_exhaustive]pub struct EdgeSelection {
pub crease_cosine: Option<f64>,
pub boundary: bool,
pub silhouette: bool,
pub group_boundary: bool,
pub hidden: bool,
}Expand description
Which edges to draw.
An edge with one incident triangle is a boundary edge. An edge with two
is a silhouette when the two triangles’ image orientations differ (a
triangle seen edge-on is its own orientation, so the test is symmetric
and independent of winding), and otherwise a crease when the cosine of
the angle between their normals is strictly below crease_cosine, and
otherwise, when group_boundary is set, a group boundary when the two
triangles are in different FaceGroups (ADR 0106). The kinds are
exclusive in that order: a silhouette is never a crease or a group
boundary, and an edge that is a crease at crease_cosine is never a group
boundary. With group_boundary unset the face groups are ignored.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.crease_cosine: Option<f64>Crease threshold in [-1, 1]; None draws no creases.
boundary: boolDraw boundary edges.
silhouette: boolDraw silhouette edges.
group_boundary: boolDraw edges between triangles of different face groups that are
neither silhouettes nor selected creases. The groups are resolved as
for MeshVisibleFaces (FaceGroups), and a PerTriangle slice of
the wrong length is refused.
Also report the hidden pieces.
Implementations§
Source§impl EdgeSelection
impl EdgeSelection
Sourcepub const fn new(crease_cosine: Option<f64>) -> EdgeSelection
pub const fn new(crease_cosine: Option<f64>) -> EdgeSelection
Every edge kind, hidden pieces included.
Sourcepub const fn with_boundary(self, boundary: bool) -> EdgeSelection
pub const fn with_boundary(self, boundary: bool) -> EdgeSelection
Select or deselect boundary edges.
Sourcepub const fn with_silhouette(self, silhouette: bool) -> EdgeSelection
pub const fn with_silhouette(self, silhouette: bool) -> EdgeSelection
Select or deselect silhouette edges.
Sourcepub const fn with_group_boundary(self, group_boundary: bool) -> EdgeSelection
pub const fn with_group_boundary(self, group_boundary: bool) -> EdgeSelection
Select or deselect group-boundary edges.
Report or omit hidden pieces.
Trait Implementations§
Source§impl Clone for EdgeSelection
impl Clone for EdgeSelection
Source§fn clone(&self) -> EdgeSelection
fn clone(&self) -> EdgeSelection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for EdgeSelection
Source§impl Debug for EdgeSelection
impl Debug for EdgeSelection
Source§impl PartialEq for EdgeSelection
impl PartialEq for EdgeSelection
impl StructuralPartialEq for EdgeSelection
Auto Trait Implementations§
impl Freeze for EdgeSelection
impl RefUnwindSafe for EdgeSelection
impl Send for EdgeSelection
impl Sync for EdgeSelection
impl Unpin for EdgeSelection
impl UnsafeUnpin for EdgeSelection
impl UnwindSafe for EdgeSelection
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,
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