pub struct RevolutionSurface { /* private fields */ }Expand description
A surface of revolution created by revolving a curve around an axis.
Parameterized as P(u, v) = origin + (curve(v) ⊗ rotation(u, axis))
where u ∈ [0, 2π) is the revolution angle and v parameterizes
the generatrix curve.
Implementations§
Source§impl RevolutionSurface
impl RevolutionSurface
Sourcepub fn new(
origin: Point3,
axis: Vec3,
radii: Vec<f64>,
heights: Vec<f64>,
) -> Result<Self, MathError>
pub fn new( origin: Point3, axis: Vec3, radii: Vec<f64>, heights: Vec<f64>, ) -> Result<Self, MathError>
Creates a surface of revolution from a set of meridian profile points.
Each point (radius, height) defines the generatrix in the rotation plane.
§Errors
Returns an error if the profile is empty or the axis is zero.
Trait Implementations§
Source§impl Clone for RevolutionSurface
impl Clone for RevolutionSurface
Source§fn clone(&self) -> RevolutionSurface
fn clone(&self) -> RevolutionSurface
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 moreAuto Trait Implementations§
impl Freeze for RevolutionSurface
impl RefUnwindSafe for RevolutionSurface
impl Send for RevolutionSurface
impl Sync for RevolutionSurface
impl Unpin for RevolutionSurface
impl UnsafeUnpin for RevolutionSurface
impl UnwindSafe for RevolutionSurface
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