[go: up one dir, main page]

Struct gltf::v1::json::mesh::Primitive [] [src]

pub struct Primitive {
    pub attributes: HashMap<String, String>,
    pub indices: Option<String>,
    pub material: String,
    pub mode: Mode,
    pub extensions: PrimitiveExtensions,
    pub extras: Extras,
}

Geometry to be rendered with the given material.

Fields

A dictionary object of strings, where each string is the ID of the accessor containing an attribute.

The ID of the accessor that contains the indices.

When defined, the accessor must contain indices: the bufferView referenced by the accessor must have a target equal to 34963 (ELEMENT_ARRAY_BUFFER); a byteStride that is tightly packed, i.e., 0 or the byte size of componentType in bytes; componentType must be 5121 (UNSIGNED_BYTE) or 5123 (UNSIGNED_SHORT); and type must be "SCALAR".

The ID of the material to apply to this primitive when rendering.

The type of primitives to render.

Extension specific data.

Optional application specific data.

Trait Implementations

impl Debug for Primitive
[src]

Formats the value using the given formatter.