Struct spiropath::Options[][src]

pub struct Options {
    pub location: Location,
    pub stationary_teeth: usize,
    pub rotating_teeth: usize,
    pub tolerance: f64,
    pub traced_point: Point,
    pub initial_rotating_angle: f64,
    pub mirror_rotating: bool,
    pub include_stationary: bool,
    pub initial_offsets: Vec<f64>,
    pub x_scale: Scale,
    pub y_scale: Scale,
    pub duration: f64,
}
Expand description

Options for controlling a spiropath.

Fields

location: Location

Location of the rotating shape relative to the stationary shape.

stationary_teeth: usize

The number of teeth on the stationary shape.

rotating_teeth: usize

The number of teeth on the rotation shape.

tolerance: f64

The tolerance as a fraction of a tooth size.

traced_point: Point

The point to trace (in the original coordinates of the rotated shape).

initial_rotating_angle: f64

The angle of the rotating shape at the start of the stationary shape (in degrees).

mirror_rotating: bool

Whether to mirror the rotating shape.

include_stationary: bool

Whether to include the stationary shape in the output.

initial_offsets: Vec<f64>

The initial offsets of the rotating shape.

x_scale: Scale

How to scale the X axis of the output.

y_scale: Scale

How to scale the Y axis of the output.

duration: f64

Duration of animation, or 0 for nonw.

Implementations

impl Options[src]

pub fn validate(&mut self)[src]

Ensure the options are valid.

Trait Implementations

impl Debug for Options[src]

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

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.