diff --git a/include/Nazara/Utility/Algorithm.hpp b/include/Nazara/Utility/Algorithm.hpp index cc2c67a42..35ad30f91 100644 --- a/include/Nazara/Utility/Algorithm.hpp +++ b/include/Nazara/Utility/Algorithm.hpp @@ -32,6 +32,7 @@ struct NzVertexPointers NzSparsePtr uvPtr; }; +template NzBoxf NzComputeAABB(const T* vertices, unsigned int vertexCount); NAZARA_API void NzComputeBoxIndexVertexCount(const NzVector3ui& subdivision, unsigned int* indexCount, unsigned int* vertexCount); NAZARA_API unsigned int NzComputeCacheMissCount(NzIndexIterator indices, unsigned int indexCount); NAZARA_API void NzComputeConeIndexVertexCount(unsigned int subdivision, unsigned int* indexCount, unsigned int* vertexCount); @@ -39,7 +40,6 @@ NAZARA_API void NzComputeCubicSphereIndexVertexCount(unsigned int subdivision, u NAZARA_API void NzComputeIcoSphereIndexVertexCount(unsigned int recursionLevel, unsigned int* indexCount, unsigned int* vertexCount); NAZARA_API void NzComputePlaneIndexVertexCount(const NzVector2ui& subdivision, unsigned int* indexCount, unsigned int* vertexCount); NAZARA_API void NzComputeUvSphereIndexVertexCount(unsigned int sliceCount, unsigned int stackCount, unsigned int* indexCount, unsigned int* vertexCount); -template NzBoxf NzComputeVerticesAABB(const T* vertices, unsigned int vertexCount); ///TODO: Remplacer le pointeur vertices par une structure composée de plusieurs SparsePtr NAZARA_API void NzGenerateBox(const NzVector3f& lengths, const NzVector3ui& subdivision, const NzMatrix4f& matrix, const NzRectf& textureCoords, NzVertexPointers vertexPointers, NzIndexIterator indices, NzBoxf* aabb = nullptr, unsigned int indexOffset = 0); diff --git a/include/Nazara/Utility/Algorithm.inl b/include/Nazara/Utility/Algorithm.inl index 93664c35e..eb0d1ab6e 100644 --- a/include/Nazara/Utility/Algorithm.inl +++ b/include/Nazara/Utility/Algorithm.inl @@ -5,7 +5,7 @@ #include template -NzBoxf NzComputeVerticesAABB(const T* vertices, unsigned int vertexCount) +NzBoxf NzComputeAABB(const T* vertices, unsigned int vertexCount) { NzBoxf aabb; if (vertexCount > 0) diff --git a/src/Nazara/Utility/StaticMesh.cpp b/src/Nazara/Utility/StaticMesh.cpp index 493b61ebf..430feba03 100644 --- a/src/Nazara/Utility/StaticMesh.cpp +++ b/src/Nazara/Utility/StaticMesh.cpp @@ -68,7 +68,7 @@ bool NzStaticMesh::GenerateAABB() { // On lock le buffer pour itérer sur toutes les positions et composer notre AABB NzBufferMapper mapper(m_vertexBuffer, nzBufferAccess_ReadOnly); - m_aabb = NzComputeVerticesAABB(static_cast(mapper.GetPointer()), m_vertexBuffer->GetVertexCount()); + m_aabb = NzComputeAABB(static_cast(mapper.GetPointer()), m_vertexBuffer->GetVertexCount()); return true; }