Terrain + Fix ImGui

Premier test de Terrain.
Fix les attributs des objets dans ImGui
This commit is contained in:
2024-03-27 11:32:50 +01:00
parent 8d56c159c6
commit 20401c1df8
9 changed files with 132 additions and 29 deletions

View File

@@ -66,7 +66,7 @@ XMMATRIX Object::GetWorldMatrix()
XMVECTOR Object::GetPosition()
{
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_worldMatrix);
XMStoreFloat4x4(&matrix, m_translateMatrix);
return XMVectorSet(matrix._41, matrix._42, matrix._43, 0.0f);
}
@@ -94,11 +94,11 @@ XMVECTOR Object::GetScale()
void Object::SetPosition(XMVECTOR position)
{
XMFLOAT4X4 matrix;
XMStoreFloat4x4(&matrix, m_worldMatrix);
XMStoreFloat4x4(&matrix, m_translateMatrix);
matrix._41 = XMVectorGetX(position);
matrix._42 = XMVectorGetY(position);
matrix._43 = XMVectorGetZ(position);
m_worldMatrix = XMLoadFloat4x4(&matrix);
m_translateMatrix = XMLoadFloat4x4(&matrix);
}
void Object::SetRotation(XMVECTOR rotation)