From ec8614e3ba1fab638aefddef518325bb5a666d79 Mon Sep 17 00:00:00 2001 From: StratiX0 <jerome.hussenet@sfr.fr> Date: Mon, 8 Apr 2024 15:34:07 +0200 Subject: [PATCH] feat: scale du terrain --- enginecustom/applicationclass.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/enginecustom/applicationclass.cpp b/enginecustom/applicationclass.cpp index 8bb9d4d..bc6974c 100644 --- a/enginecustom/applicationclass.cpp +++ b/enginecustom/applicationclass.cpp @@ -1179,8 +1179,13 @@ void ApplicationClass::GenerateTerrain() char textureFilename3[128]; XMMATRIX scaleMatrix; + int scaleX, scaleY, scaleZ; - scaleMatrix = XMMatrixScaling(5.0f, 1.0f, 5.0f); + scaleX = 10.0f; + scaleY = 1.0f; + scaleZ = 10.0f; + + scaleMatrix = XMMatrixScaling(scaleX, scaleY, scaleZ); // Set the file name of the model. strcpy_s(modelFilename, "plane.txt"); @@ -1198,7 +1203,7 @@ void ApplicationClass::GenerateTerrain() newTerrain->SetScaleMatrix(scaleMatrix); - newTerrain->SetTranslateMatrix(XMMatrixTranslation(i / 2 * 10, -5.0f, j * 10)); + newTerrain->SetTranslateMatrix(XMMatrixTranslation(i / 2 * (scaleX * 2), -5.0f, j * (scaleZ * 2))); m_terrainChunk.push_back(newTerrain);