Struct nannou::geom::ellipse::Circumference[][src]

pub struct Circumference<S = Default> { /* fields omitted */ }

An iterator yielding the edges of an ellipse (or some section of an ellipse) as a series of points.

Implementations

impl<S> Circumference<S> where
    S: BaseNum + Neg<Output = S>, 
[src]

pub fn new(rect: Rect<S>, resolution: usize) -> Self[src]

An iterator yielding the ellipse’s edges as a circumference represented as a series of points.

resolution is clamped to a minimum of 1 as to avoid creating a Circumference that produces NaN values.

pub fn new_section(rect: Rect<S>, resolution: usize, radians: S) -> Self[src]

Produces a new iterator that yields only a section of the ellipse’s circumference, where the section is described via its angle in radians.

resolution is clamped to a minimum of 1 as to avoid creating a Circumference that produces NaN values.

pub fn section(self, radians: S) -> Self[src]

Produces a new iterator that yields only a section of the ellipse’s circumference, where the section is described via its angle in radians.

pub fn offset_radians(self, radians: S) -> Self[src]

Rotates the position at which the iterator starts yielding points by the given radians.

This is particularly useful for yielding a different section of the circumference when using circumference_section

impl<S> Circumference<S> where
    S: BaseFloat
[src]

pub fn triangles(self) -> Triangles<S>

Notable traits for Triangles<S>

impl<S> Iterator for Triangles<S> where
    S: BaseFloat
type Item = Tri<Point2<S>>;
[src]

Produces an Iterator yielding Triangles.

Triangles are created by joining each edge yielded by the inner Circumference to the middle of the ellipse.

pub fn triangle_indices(self) -> (TriangleVertices<S>, TriangleIndices)[src]

The same as Triangles, but produces the indices of each triangle into the returned TriangleVertices iterator rather than the vertices for each corner.

Trait Implementations

impl<S: Clone> Clone for Circumference<S>[src]

impl<S: Debug> Debug for Circumference<S>[src]

impl<S> ExactSizeIterator for Circumference<S> where
    S: BaseFloat
[src]

impl<S> Iterator for Circumference<S> where
    S: BaseFloat
[src]

type Item = Point2<S>

The type of the elements being iterated over.

Auto Trait Implementations

impl<S> RefUnwindSafe for Circumference<S> where
    S: RefUnwindSafe

impl<S> Send for Circumference<S> where
    S: Send

impl<S> Sync for Circumference<S> where
    S: Sync

impl<S> Unpin for Circumference<S> where
    S: Unpin

impl<S> UnwindSafe for Circumference<S> where
    S: UnwindSafe

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    T: Component + Float,
    D: AdaptFrom<S, Swp, Dwp, T>,
    Swp: WhitePoint,
    Dwp: WhitePoint
[src]

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

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

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

impl<T, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

impl<T> Downcast<T> for T

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

impl<T> Instrument for T[src]

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

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.

impl<T> Upcast<T> for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,