From 57e12a26259d6d4be0f5bd8795fce9bcff5c61e0 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 26 Jun 2013 18:55:09 +0200 Subject: [PATCH] Fixed box generation Former-commit-id: 99534bcd90ffb81ba362ea2c709d68b643a9bdbb --- src/Nazara/Utility/Algorithm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Nazara/Utility/Algorithm.cpp b/src/Nazara/Utility/Algorithm.cpp index 53f9c57f5..6dd166be9 100644 --- a/src/Nazara/Utility/Algorithm.cpp +++ b/src/Nazara/Utility/Algorithm.cpp @@ -723,7 +723,7 @@ void NzGenerateBox(const NzVector3f& lengths, const NzVector3ui& subdivision, co // Face +X transform.MakeTransform(NzVector3f::UnitX() * halfLengths.x, NzEulerAnglesf(-90.f, 0.f, -90.f)); - NzGeneratePlane(NzVector2ui(subdivision.y, subdivision.z), NzVector2f(lengths.y, lengths.z), transform, vertices, indices, nullptr, indexOffset); + NzGeneratePlane(NzVector2ui(subdivision.z, subdivision.y), NzVector2f(lengths.z, lengths.y), transform, vertices, indices, nullptr, indexOffset); indexOffset += xVertexCount; indices += xIndexCount; vertices += xVertexCount; @@ -744,7 +744,7 @@ void NzGenerateBox(const NzVector3f& lengths, const NzVector3ui& subdivision, co // Face -X transform.MakeTransform(-NzVector3f::UnitX() * halfLengths.x, NzEulerAnglesf(-90.f, 0.f, 90.f)); - NzGeneratePlane(NzVector2ui(subdivision.y, subdivision.z), NzVector2f(lengths.y, lengths.z), transform, vertices, indices, nullptr, indexOffset); + NzGeneratePlane(NzVector2ui(subdivision.z, subdivision.y), NzVector2f(lengths.z, lengths.y), transform, vertices, indices, nullptr, indexOffset); indexOffset += xVertexCount; indices += xIndexCount; vertices += xVertexCount;