Added rotation functions for matrix

This commit is contained in:
2026-02-22 11:24:59 -05:00
parent a7947bfa17
commit 431015f009
2 changed files with 54 additions and 10 deletions

View File

@@ -120,7 +120,10 @@ void JulietApplication::Init()
MeshID cube = AddCube();
float x = static_cast<float>(col) * kSpacing - kOffset;
float y = static_cast<float>(row) * kSpacing - kOffset;
SetMeshTransform(cube, MatrixTranslation(x, y, 0.0f));
float seed = static_cast<float>(row * kGridSize + col);
Matrix rotation = MatrixRotation(seed * 0.73f, seed * 1.17f, seed * 0.53f);
SetMeshTransform(cube, MatrixTranslation(x, y, 0.0f) * rotation);
}
}