pub fn draw_model(&mut self, model: &Model, mat: Mat4) {
        let mut proj_vert = model.verts.clone();

        for mut v in &mut proj_vert {
            v.p = (mat * v.p.vec4f(1.0)).vec3f();
        }

        for f in &model.faces {
            self.draw_tri(proj_vert[f.0], proj_vert[f.1], proj_vert[f.2]);
        }
    }
/// Draw a model including model-view-projection matrices
Draw a model including model-view-projection matrices
Draw a model including model - view - projection matrices
pub fn draw_model(&mut self, model: &Model, mat: Mat4) {
        let mut proj_vert = model.verts.clone();
        for mut v in &mut proj_vert {
            v.p = (mat * v.p.vec4f(1.0)).vec3f();
        }
        for f in &model.faces {
            self.draw_tri(proj_vert[f.0], proj_vert[f.1], proj_vert[f.2]);
        }
    }
pub fn draw_model ( & mut self , model : & Model , mat : Mat4 ) { let mut proj_vert = model . verts . clone ( ) ; for mut v in & mut proj_vert { v . p = ( mat * v . p . vec4f ( 1.0 ) ) . vec3f ( ) ; } for f in & model . faces { self . draw_tri ( proj_vert [ f . 0 ] , proj_vert [ f . 1 ] , proj_vert [ f . 2 ] ) ; } }
Draw a model including model-view-projection matrices
Draw a model including model - view - projection matrices
&mut self
model
&Model
mat
Mat4
&mut self
model
&Model
mat
Mat4