mod3d_base/
mesh.rs

1//a Imports
2use crate::Primitive;
3
4//a Mesh
5//tp Mesh
6/// A [Mesh] provides an array of primitives, that is notionally drawn
7/// from first to last
8///
9/// The [Mesh] depends on being in an 3D model object, as it is the
10/// object that contains the actual materials and vertices to use
11#[derive(Debug, Default)]
12pub struct Mesh {
13    /// The primitive
14    pub primitives: Vec<Primitive>,
15}
16
17//ip Mesh
18impl Mesh {
19    //mp add_primitive
20    /// Add a primitive to the [Mesh]
21    pub fn add_primitive(&mut self, primitive: Primitive) {
22        self.primitives.push(primitive);
23    }
24
25    //zz All done
26}