Struct gltf_json::mesh::Primitive []

pub struct Primitive {
    pub attributes: HashMap<Checked<Semantic>, Index<Accessor>>,
    pub extensions: Primitive,
    pub extras: Extras,
    pub indices: Option<Index<Accessor>>,
    pub material: Option<Index<Material>>,
    pub mode: Checked<Mode>,
    pub targets: Option<Vec<MorphTargets>>,
}

Geometry to be rendered with the given material.

Fields

Maps attribute semantic names to the Accessors containing the corresponding attribute data.

Extension specific data.

Optional application specific data.

The index of the accessor that contains the indices.

The index of the material to apply to this primitive when rendering

The type of primitives to render.

An array of Morph Targets, each Morph Target is a dictionary mapping attributes (only POSITION, NORMAL, and TANGENT supported) to their deviations in the Morph Target.

Trait Implementations

impl Clone for Primitive

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Primitive

Formats the value using the given formatter.

impl Validate for Primitive

Validates only the invariants required for the library to function safely.

Validates the data against the glTF 2.0 specification.