Struct nannou::geom::ellipse::Ellipse
[−]
[src]
pub struct Ellipse<S = DefaultScalar> { pub rect: Rect<S>, pub resolution: usize, }
A simple ellipse type with helper methods around the ellipse
module's functions.
Fields
rect: Rect<S>
The width and height off the Ellipse
.
resolution: usize
The resolution (number of sides) of the Ellipse
.
Methods
impl<S> Ellipse<S> where
S: BaseNum + Neg<Output = S>,
[src]
S: BaseNum + Neg<Output = S>,
pub fn new(rect: Rect<S>, resolution: usize) -> Self
[src]
Construct a new ellipse from its bounding rect and resolution (number of sides).
pub fn section(self, offset_radians: S, section_radians: S) -> Section<S>
[src]
A section of the Ellipse
.
offset_radians
describes the angle at which the offset begins.
section_radians
describes how large the section is as an angle.
ⓘImportant traits for Circumference<S>pub fn circumference(self) -> Circumference<S>
[src]
Produces an iterator yielding the points of the ellipse circumference.
impl<S> Ellipse<S> where
S: BaseFloat,
[src]
S: BaseFloat,
ⓘImportant traits for Triangles<S>pub fn triangles(self) -> Triangles<S>
[src]
Produces an iterator yielding the triangles that describe the ellipse.
TODO: Describe the order.
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: Copy> Copy for Ellipse<S>
[src]
impl<S: Clone> Clone for Ellipse<S>
[src]
fn clone(&self) -> Ellipse<S>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<S: Debug> Debug for Ellipse<S>
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl<S: PartialEq> PartialEq for Ellipse<S>
[src]
fn eq(&self, __arg_0: &Ellipse<S>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Ellipse<S>) -> bool
[src]
This method tests for !=
.
impl<S: PartialOrd> PartialOrd for Ellipse<S>
[src]
fn partial_cmp(&self, __arg_0: &Ellipse<S>) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Ellipse<S>) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Ellipse<S>) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Ellipse<S>) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Ellipse<S>) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more