pub struct Primitive {
pub material: Option<usize>,
pub indices: Vec<u32>,
pub positions: Vec<Vec3>,
pub normals: Vec<Vec3>,
pub uvs: Vec<[f32; 2]>,
pub joints: Vec<[u16; 4]>,
pub weights: Vec<[f32; 4]>,
pub additional_influence_sets: Vec<AdditionalInfluenceSet>,
}Expand description
One triangle-list primitive sharing a material. Attribute arrays may be
indexed already; Primitive::weld dedupes an unindexed primitive into
indexed form.
Additional glTF skin-influence attribute sets are intentionally metadata
only. The primary four influences remain in Self::joints and
Self::weights; consumers can use this metadata to apply their own
policy without the core assuming how additional influences are evaluated.
Fields§
§material: Option<usize>Index into SceneAssets::materials.
indices: Vec<u32>Triangle indices into the attribute arrays; empty = unindexed.
positions: Vec<Vec3>Vertex positions in scene units.
normals: Vec<Vec3>Same length as positions, or empty.
uvs: Vec<[f32; 2]>Same length as positions, or empty.
joints: Vec<[u16; 4]>Indices into an owning instance’s skin-joint list; empty if unskinned.
weights: Vec<[f32; 4]>Skinning weights parallel to Primitive::joints.
additional_influence_sets: Vec<AdditionalInfluenceSet>Declared non-primary skin-influence attribute sets.
Each entry records whether the glTF primitive had JOINTS_n and/or
WEIGHTS_n for n >= 1. Entries are sorted by
AdditionalInfluenceSet::set_index.