pub struct Primitive {
pub topology: Topology,
pub streams: BTreeMap<Semantic, Stream>,
pub indices: Option<Vec<u32>>,
pub material: Option<Entity>,
}Expand description
One drawable part of a mesh: vertex streams, optional indices, a material. Primitives are kept in the game’s draw order (overlay stacking depends on it).
Fields§
§topology: Topology§streams: BTreeMap<Semantic, Stream>Every stream has the same length (the vertex count). Position is required.
indices: Option<Vec<u32>>Vertex indices; None means sequential.
material: Option<Entity>The material entity, if any.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Primitive
Auto Trait Implementations§
impl Forget for Primitive
impl Freeze for Primitive
impl RefUnwindSafe for Primitive
impl Send for Primitive
impl Sync for Primitive
impl Unpin for Primitive
impl UnsafeUnpin for Primitive
impl UnwindSafe for Primitive
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