From ccfbcb490dd47cc814a64e8be00c148e2e2206a3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 17 Aug 2026 15:52:01 +0200 Subject: feat(engine): replace WorldPosition & Scale components with Transform --- engine/src/data_types/matrix.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'engine/src/data_types') diff --git a/engine/src/data_types/matrix.rs b/engine/src/data_types/matrix.rs index 48796bf..3c54bb1 100644 --- a/engine/src/data_types/matrix.rs +++ b/engine/src/data_types/matrix.rs @@ -1,5 +1,6 @@ use std::ops::{Index, IndexMut, Mul}; +use crate::data_types::dimens::Dimens3; use crate::vector::{Vec3, Vec4}; #[derive(Debug, Clone)] @@ -90,11 +91,11 @@ impl Matrix self[CellPos { row: 3, col: 3 }] = 1.0; } - pub fn scale(&mut self, scaling: &Vec3) + pub fn scale(&mut self, scaling: &Dimens3) { - self[CellPos { row: 0, col: 0 }] = scaling.x; - self[CellPos { row: 1, col: 1 }] = scaling.y; - self[CellPos { row: 2, col: 2 }] = scaling.z; + self[CellPos { row: 0, col: 0 }] = scaling.width; + self[CellPos { row: 1, col: 1 }] = scaling.height; + self[CellPos { row: 2, col: 2 }] = scaling.depth; self[CellPos { row: 3, col: 3 }] = 1.0; } -- cgit v1.2.3-18-g5258