pub enum AnalyticSurface {
Plane(PlaneSurface),
Sphere(SphereSurface),
Cylinder(CylinderSurface),
Cone(ConeSurface),
Torus(TorusSurface),
}Expand description
Parameters for one supported analytic surface.
Variants§
Plane(PlaneSurface)
A planar surface.
Sphere(SphereSurface)
A spherical surface.
Cylinder(CylinderSurface)
A cylindrical surface.
Cone(ConeSurface)
A conical surface.
Torus(TorusSurface)
A toroidal surface.
Implementations§
Source§impl AnalyticSurface
impl AnalyticSurface
Sourcepub fn surface_type(self) -> SurfaceType
pub fn surface_type(self) -> SurfaceType
Returns this surface’s primitive family.
Sourcepub fn signed_distance(self, point: Vec3) -> f64
pub fn signed_distance(self, point: Vec3) -> f64
Evaluates the surface’s signed implicit distance-like residual at point.
For normalized valid parameters, its magnitude is the geometric distance for planes, spheres, cylinders, and tori; the cone expression is its signed meridian distance.
Sourcepub fn normal_at(self, point: Vec3) -> Option<Vec3>
pub fn normal_at(self, point: Vec3) -> Option<Vec3>
Returns the analytic unit normal at point, if it is defined there.
Sourcepub fn is_valid(self) -> bool
pub fn is_valid(self) -> bool
Returns whether all carrier parameters are finite and geometrically valid.
Sourcepub fn canonicalized(self, centroid: Vec3) -> Self
pub fn canonicalized(self, centroid: Vec3) -> Self
Choose deterministic orientation/gauge conventions without changing the represented infinite surface.
Trait Implementations§
Source§impl Clone for AnalyticSurface
impl Clone for AnalyticSurface
Source§fn clone(&self) -> AnalyticSurface
fn clone(&self) -> AnalyticSurface
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 AnalyticSurface
Source§impl Debug for AnalyticSurface
impl Debug for AnalyticSurface
Source§impl<'de> Deserialize<'de> for AnalyticSurface
impl<'de> Deserialize<'de> for AnalyticSurface
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for AnalyticSurface
impl PartialEq for AnalyticSurface
Source§impl Serialize for AnalyticSurface
impl Serialize for AnalyticSurface
impl StructuralPartialEq for AnalyticSurface
Auto Trait Implementations§
impl Freeze for AnalyticSurface
impl RefUnwindSafe for AnalyticSurface
impl Send for AnalyticSurface
impl Sync for AnalyticSurface
impl Unpin for AnalyticSurface
impl UnsafeUnpin for AnalyticSurface
impl UnwindSafe for AnalyticSurface
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