Added rotation functions for matrix
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user