Struct gltf::mesh::Primitive
[−]
[src]
pub struct Primitive<'a> { /* fields omitted */ }
Geometry to be rendered with the given material.
Methods
impl<'a> Primitive<'a>
[src]
fn position_bounds(&self) -> Option<Bounds<[f32; 3]>>
[src]
Returns the bounds of the POSITION
vertex attribute when provided.
Panics
Panics for POSITION
accessors with missing bounds.
Since POSITION
accessors must include bounds information, one can
call Gltf::validate_minimally
to ensure this data exists.
fn extras(&self) -> &Extras
[src]
Optional application specific data.
fn get(&self, semantic: &Semantic) -> Option<Accessor>
[src]
Return the accessor with the given semantic.
fn indices(&self) -> Option<Accessor>
[src]
Returns the accessor containing the primitive indices, if provided.
fn attributes(&self) -> Attributes
[src]
Returns an Iterator
that visits the vertex attributes.
fn material(&self) -> Material
[src]
Returns the material to apply to this primitive when rendering
fn mode(&self) -> Mode
[src]
The type of primitives to render.
fn morph_targets(&self) -> MorphTargets
[src]
Returns an Iterator
that visits the morph targets of the primitive.
Trait Implementations
impl<'a> Clone for Primitive<'a>
[src]
fn clone(&self) -> Primitive<'a>
[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