pub struct Primitive<'a> { /* private fields */ }
Expand description
Geometry to be rendered with the given material.
Implementations§
source§impl<'a> Primitive<'a>
impl<'a> Primitive<'a>
sourcepub fn bounding_box(&self) -> BoundingBox
pub fn bounding_box(&self) -> BoundingBox
Returns the bounds of the POSITION
vertex attribute.
sourcepub fn get(&self, semantic: &Semantic) -> Option<Accessor<'a>>
pub fn get(&self, semantic: &Semantic) -> Option<Accessor<'a>>
Return the accessor with the given semantic.
sourcepub fn indices(&self) -> Option<Accessor<'a>>
pub fn indices(&self) -> Option<Accessor<'a>>
Returns the accessor containing the primitive indices, if provided.
sourcepub fn attributes(&self) -> Attributes<'a> ⓘ
pub fn attributes(&self) -> Attributes<'a> ⓘ
Returns an Iterator
that visits the vertex attributes.
sourcepub fn material(&self) -> Material<'a>
pub fn material(&self) -> Material<'a>
Returns the material to apply to this primitive when rendering
sourcepub fn morph_targets(&self) -> MorphTargets<'a> ⓘ
pub fn morph_targets(&self) -> MorphTargets<'a> ⓘ
Returns an Iterator
that visits the morph targets of the primitive.