#[non_exhaustive]pub enum SurfaceKind {
Plane,
Cylinder,
Cone,
Sphere,
Torus,
Bezier,
BSpline,
Revolution,
Extrusion,
Trimmed,
Offset,
}Expand description
What kind of surface this is, for analytic fast paths.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Plane
A plane.
Cylinder
A circular cylinder.
Cone
A circular cone.
Sphere
A sphere.
Torus
A torus.
Bezier
A polynomial or rational Bézier patch.
BSpline
A polynomial or rational B-spline patch.
Revolution
A surface of revolution.
Extrusion
A surface swept by translating a curve.
Trimmed
A restriction of another surface to a sub-rectangle.
Offset
A surface offset from another.
Implementations§
Source§impl SurfaceKind
impl SurfaceKind
Sourcepub const fn is_quadric(self) -> bool
pub const fn is_quadric(self) -> bool
Whether this surface is a quadric: a plane, cylinder, cone or sphere.
Quadric pairs have closed-form intersections, which is worth a great deal: it is the difference between an exact conic and a marched approximation of one.
Sourcepub const fn is_analytic(self) -> bool
pub const fn is_analytic(self) -> bool
Whether this surface has an exact analytic form, as opposed to being defined by control points.
Trait Implementations§
Source§impl Clone for SurfaceKind
impl Clone for SurfaceKind
Source§fn clone(&self) -> SurfaceKind
fn clone(&self) -> SurfaceKind
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 moreimpl Copy for SurfaceKind
Source§impl Debug for SurfaceKind
impl Debug for SurfaceKind
impl Eq for SurfaceKind
Source§impl PartialEq for SurfaceKind
impl PartialEq for SurfaceKind
Source§fn eq(&self, other: &SurfaceKind) -> bool
fn eq(&self, other: &SurfaceKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SurfaceKind
Auto Trait Implementations§
impl Freeze for SurfaceKind
impl RefUnwindSafe for SurfaceKind
impl Send for SurfaceKind
impl Sync for SurfaceKind
impl Unpin for SurfaceKind
impl UnsafeUnpin for SurfaceKind
impl UnwindSafe for SurfaceKind
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,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§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 more§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).§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.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.