pub struct Primitive<'a> {
pub attributes: BTreeMap<Attribute<'a>, Idx<Accessor<'static>>>,
pub indices: Option<Idx<Accessor<'static>>>,
pub material: Option<Idx<Material<'static>>>,
pub mode: Mode,
pub targets: Option<Vec<BTreeMap<Cow<'a, str>, Idx<Accessor<'static>>>>>,
pub extensions: Option<Extensions<'a>>,
pub extras: Option<Extras<'a>>,
}Expand description
A set of primitives to be rendered.
Fields§
§attributes: BTreeMap<Attribute<'a>, Idx<Accessor<'static>>>A map where each key corresponds to a mesh attribute semantic and each value is the index of the accessor containing the attribute’s data.
indices: Option<Idx<Accessor<'static>>>The index of the accessor that contains the vertex indices.
material: Option<Idx<Material<'static>>>The index of the material to apply to this primitive when rendering.
mode: ModeThe topology type of primitives to render.
targets: Option<Vec<BTreeMap<Cow<'a, str>, Idx<Accessor<'static>>>>>An array of morph targets.
extensions: Option<Extensions<'a>>§extras: Option<Extras<'a>>Implementations§
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Primitive<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Primitive<'a>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<'a> Freeze for Primitive<'a>
impl<'a> RefUnwindSafe for Primitive<'a>
impl<'a> Send for Primitive<'a>
impl<'a> Sync for Primitive<'a>
impl<'a> Unpin for Primitive<'a>
impl<'a> UnsafeUnpin for Primitive<'a>
impl<'a> UnwindSafe for Primitive<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more