summaryrefslogtreecommitdiff
path: root/engine/src/transform.rs
diff options
context:
space:
mode:
Diffstat (limited to 'engine/src/transform.rs')
-rw-r--r--engine/src/transform.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/src/transform.rs b/engine/src/transform.rs
index 8e768a6..67fbe23 100644
--- a/engine/src/transform.rs
+++ b/engine/src/transform.rs
@@ -14,18 +14,21 @@ pub struct Transform
impl Transform
{
+ #[must_use]
pub fn position(mut self, position: Vec3<f32>) -> Self
{
self.position = position;
self
}
+ #[must_use]
pub fn scale(mut self, scale: Dimens3<f32>) -> Self
{
self.scale = scale;
self
}
+ #[must_use]
pub fn to_matrix(&self) -> Matrix<f32, 4, 4>
{
let mut matrix = Matrix::new_identity();