pub enum Canonical {
Plane(Plane),
Cylinder(Cylinder),
Cone(Cone),
Sphere(Sphere),
Torus(Torus),
}Expand description
A canonical surface a set of samples was recognized as.
Variants§
Plane(Plane)
A plane.
Cylinder(Cylinder)
A cylinder.
Cone(Cone)
A cone.
Sphere(Sphere)
A sphere.
Torus(Torus)
A torus.
Implementations§
Source§impl Canonical
impl Canonical
Sourcepub fn distance_to(&self, p: Point) -> f64
pub fn distance_to(&self, p: Point) -> f64
The distance from p to the surface.
Sourcepub fn signed_distance_to(&self, p: Point) -> f64
pub fn signed_distance_to(&self, p: Point) -> f64
The distance from p to the surface, positive on the side its
radius grows toward (outside a cylinder, sphere or torus, off the
axis of a cone) and along a plane’s normal. Near the surface it
grows as the distance does, which is what a solve onto the surface
asks of it; a cone’s is taken to its nearer nappe.
Trait Implementations§
impl Copy for Canonical
impl StructuralPartialEq for Canonical
Auto Trait Implementations§
impl Freeze for Canonical
impl RefUnwindSafe for Canonical
impl Send for Canonical
impl Sync for Canonical
impl Unpin for Canonical
impl UnsafeUnpin for Canonical
impl UnwindSafe for Canonical
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.