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§
source§impl 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§
source§impl From<Geom<LineStripGeom>> for Primitive
impl From<Geom<LineStripGeom>> for Primitive
source§fn from(val: LineStrips) -> Self
fn from(val: LineStrips) -> Self
Converts to this type from the input type.