From 076dab23cf4d0eccebcb384654611b52e0ceca72 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 27 Oct 2023 00:24:11 -0700 Subject: [PATCH] delete some dead code --- src/graphics.rs | 6 ------ src/primitives.rs | 12 ------------ 2 files changed, 18 deletions(-) diff --git a/src/graphics.rs b/src/graphics.rs index 343105f..5000036 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -57,12 +57,6 @@ fn perspective_rh(fov_x_slope: f32, fov_y_slope: f32, z_near: f32, z_far: f32) - ) } impl GraphicsCamera{ - pub fn new(screen_size:glam::UVec2,fov:glam::Vec2)->Self{ - Self{ - screen_size, - fov, - } - } pub fn proj(&self)->glam::Mat4{ perspective_rh(self.fov.x, self.fov.y, 0.5, 2000.0) } diff --git a/src/primitives.rs b/src/primitives.rs index 53b6d0d..40f2bdf 100644 --- a/src/primitives.rs +++ b/src/primitives.rs @@ -189,18 +189,6 @@ impl std::default::Default for FaceDescription{ } } } -impl FaceDescription{ - pub fn new(texture:u32,transform:glam::Affine2,color:Color4)->Self{ - Self{texture:Some(texture),transform,color} - } - pub fn from_texture(texture:u32)->Self{ - Self{ - texture:Some(texture), - transform:glam::Affine2::IDENTITY, - color:Color4::ONE, - } - } -} //TODO: it's probably better to use a shared vertex buffer between all primitives and use indexed rendering instead of generating a unique vertex buffer for each primitive. //implementation: put all roblox primitives into one model.groups <- this won't work but I forget why pub fn generate_partial_unit_cube(face_descriptions:CubeFaceDescription)->crate::model::IndexedModel{