Skip to main content

RecognizedSurface

Enum RecognizedSurface 

Source
pub enum RecognizedSurface {
    Plane {
        normal: Vec3,
        d: f64,
    },
    Cylinder {
        origin: Point3,
        axis: Vec3,
        radius: f64,
    },
    Sphere {
        center: Point3,
        radius: f64,
    },
    Cone {
        apex: Point3,
        axis: Vec3,
        half_angle: f64,
    },
    Torus {
        center: Point3,
        axis: Vec3,
        major_radius: f64,
        minor_radius: f64,
    },
    NotRecognized,
}
Expand description

The analytic surface form recognized from a NURBS surface.

Variants§

§

Plane

Recognized as a plane.

Fields

§normal: Vec3

Outward normal (unit vector).

§d: f64

Signed distance from origin: normal · (any point on plane).

§

Cylinder

Recognized as a cylinder.

Fields

§origin: Point3

A point on the cylinder axis.

§axis: Vec3

Axis direction (unit vector).

§radius: f64

Cylinder radius.

§

Sphere

Recognized as a sphere.

Fields

§center: Point3

Center of the sphere.

§radius: f64

Sphere radius.

§

Cone

Recognized as a cone.

Fields

§apex: Point3

The cone’s apex (point where radius = 0).

§axis: Vec3

Cone axis direction (from apex into the cone, unit vector).

§half_angle: f64

Half-angle from the radial plane to the cone generator (radians, in (0, π/2)).

§

Torus

Recognized as a torus.

Fields

§center: Point3

Torus center (the axis passes through this point).

§axis: Vec3

Torus axis direction (perpendicular to the major-circle plane, unit vector).

§major_radius: f64

Major radius (distance from torus center to tube center).

§minor_radius: f64

Minor radius (tube cross-section radius).

§

NotRecognized

The surface could not be matched to any elementary form.

Trait Implementations§

Source§

impl Clone for RecognizedSurface

Source§

fn clone(&self) -> RecognizedSurface

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RecognizedSurface

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RecognizedSurface

Source§

fn eq(&self, other: &RecognizedSurface) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for RecognizedSurface

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.