From 085d4e7912e112e788ece2b65f0f5290966a41d0 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 7 Nov 2023 16:54:44 -0800 Subject: [PATCH] use cubes instead of teapots and monkeys --- src/primitives.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/primitives.rs b/src/primitives.rs index 336af7a..f9c2bb4 100644 --- a/src/primitives.rs +++ b/src/primitives.rs @@ -127,11 +127,7 @@ const CORNERWEDGE_DEFAULT_NORMALS:[Planar64Vec3;5]=[ Planar64Vec3::int( 0, 0,-1),//CornerWedge::Front ]; pub fn unit_sphere()->crate::model::IndexedModel{ - let mut indexed_model=crate::model::generate_indexed_model_list_from_obj(obj::ObjData::load_buf(&include_bytes!("../models/suzanne.obj")[..]).unwrap(),Color4::ONE).remove(0); - for pos in indexed_model.unique_pos.iter_mut(){ - *pos=*pos/2; - } - indexed_model + unit_cube() } #[derive(Default)] pub struct CubeFaceDescription([Option;6]); @@ -153,13 +149,8 @@ pub fn unit_cube()->crate::model::IndexedModel{ t.insert(CubeFace::Front,FaceDescription::default()); generate_partial_unit_cube(t) } -const TEAPOT_TRANSFORM:crate::integer::Planar64Mat3=crate::integer::Planar64Mat3::int_from_cols_array([0,1,0, -1,0,0, 0,0,1]); pub fn unit_cylinder()->crate::model::IndexedModel{ - let mut indexed_model=crate::model::generate_indexed_model_list_from_obj(obj::ObjData::load_buf(&include_bytes!("../models/teapot.obj")[..]).unwrap(),Color4::ONE).remove(0); - for pos in indexed_model.unique_pos.iter_mut(){ - *pos=TEAPOT_TRANSFORM*(*pos)/10; - } - indexed_model + unit_cube() } #[derive(Default)] pub struct WedgeFaceDescription([Option;5]);