Enum dae_parser::Primitive
source · [−]pub enum Primitive {
Lines(Lines),
LineStrips(LineStrips),
Polygons(Polygons),
PolyList(PolyList),
Triangles(Triangles),
TriFans(TriFans),
TriStrips(TriStrips),
}
Expand description
A collection of primitive elements.
Variants
Lines(Lines)
Line primitives.
LineStrips(LineStrips)
Line-strip primitives.
Polygons(Polygons)
Polygon primitives which may contain holes.
PolyList(PolyList)
Polygon primitives that cannot contain holes.
Triangles(Triangles)
Triangle primitives.
TriFans(TriFans)
Triangle-fan primitives.
TriStrips(TriStrips)
Triangle-strip primitives.
Implementations
sourceimpl Primitive
impl Primitive
sourcepub fn parse(e: &Element) -> Result<Option<Self>, Error>
pub fn parse(e: &Element) -> Result<Option<Self>, Error>
Parse a Primitive
from an XML element.
sourcepub fn as_line_strips(&self) -> Option<&LineStrips>
pub fn as_line_strips(&self) -> Option<&LineStrips>
An accessor for the variant.
sourcepub fn as_polygons(&self) -> Option<&Polygons>
pub fn as_polygons(&self) -> Option<&Polygons>
An accessor for the variant.
sourcepub fn as_polylist(&self) -> Option<&PolyList>
pub fn as_polylist(&self) -> Option<&PolyList>
An accessor for the variant.
sourcepub fn as_triangles(&self) -> Option<&Triangles>
pub fn as_triangles(&self) -> Option<&Triangles>
An accessor for the variant.
sourcepub fn as_trifans(&self) -> Option<&TriFans>
pub fn as_trifans(&self) -> Option<&TriFans>
An accessor for the variant.
sourcepub fn as_tristrips(&self) -> Option<&TriStrips>
pub fn as_tristrips(&self) -> Option<&TriStrips>
An accessor for the variant.
Trait Implementations
sourceimpl From<Geom<LineStripGeom>> for Primitive
impl From<Geom<LineStripGeom>> for Primitive
sourcefn from(val: LineStrips) -> Self
fn from(val: LineStrips) -> Self
Converts to this type from the input type.
sourceimpl From<Geom<PolyListGeom>> for Primitive
impl From<Geom<PolyListGeom>> for Primitive
sourceimpl From<Geom<PolygonGeom>> for Primitive
impl From<Geom<PolygonGeom>> for Primitive
sourceimpl From<Geom<TriFanGeom>> for Primitive
impl From<Geom<TriFanGeom>> for Primitive
sourceimpl From<Geom<TriStripGeom>> for Primitive
impl From<Geom<TriStripGeom>> for Primitive
Auto Trait Implementations
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnwindSafe for Primitive
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more