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
attributes: HashMap<String, String>
A dictionary object of strings, where each string is the ID of the accessor containing an attribute.
indices: Option<String>
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".
material: String
The ID of the material to apply to this primitive when rendering.
mode: Mode
The type of primitives to render.
extensions: PrimitiveExtensions
Extension specific data.
extras: Extras
Optional application specific data.