[−][src]Struct wavefront::Polygon
A polygon defined in an OBJ.
Implementations
impl<'a> Polygon<'a>
[src]
pub fn vertex(&self, index: usize) -> Option<Vertex<'a>>
[src]
Returns a specific Vertex
by index.
pub fn vertices(&self) -> impl ExactSizeIterator<Item = Vertex<'a>> + Clone + 'a
[src]
pub fn triangles(
&self
) -> impl ExactSizeIterator<Item = [Vertex<'a>; 3]> + Clone + 'a
[src]
&self
) -> impl ExactSizeIterator<Item = [Vertex<'a>; 3]> + Clone + 'a
Returns an iterator over triangles in this Polygon
by splitting up the polygon into smaller pieces.
This function is useful when your application supports only triangles as input but the OBJ contains unusual polygons such as quads.
The triangles produced will be arranged in a fan and will follow the winding order of the original polygon.
This function assumes that:
- The polygon is concave
- The vertices of the polygon all lie in the same plane
Trait Implementations
impl<'a> Clone for Polygon<'a>
[src]
impl<'a> Copy for Polygon<'a>
[src]
impl<'a> Debug for Polygon<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Polygon<'a>
[src]
impl<'a> Send for Polygon<'a>
[src]
impl<'a> Sync for Polygon<'a>
[src]
impl<'a> Unpin for Polygon<'a>
[src]
impl<'a> UnwindSafe for Polygon<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
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]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,