Renamed ComputeVerticesAABB function to ComputeAABB
Former-commit-id: 5e8381f8d09f583f6ef9b2919b082f3418644bce
This commit is contained in:
parent
8f101812c3
commit
025fdf6846
|
|
@ -32,6 +32,7 @@ struct NzVertexPointers
|
|||
NzSparsePtr<NzVector2f> uvPtr;
|
||||
};
|
||||
|
||||
template<typename T> 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<typename T> 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);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <Nazara/Utility/Debug.hpp>
|
||||
|
||||
template<typename T>
|
||||
NzBoxf NzComputeVerticesAABB(const T* vertices, unsigned int vertexCount)
|
||||
NzBoxf NzComputeAABB(const T* vertices, unsigned int vertexCount)
|
||||
{
|
||||
NzBoxf aabb;
|
||||
if (vertexCount > 0)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ bool NzStaticMesh::GenerateAABB()
|
|||
{
|
||||
// On lock le buffer pour itérer sur toutes les positions et composer notre AABB
|
||||
NzBufferMapper<NzVertexBuffer> mapper(m_vertexBuffer, nzBufferAccess_ReadOnly);
|
||||
m_aabb = NzComputeVerticesAABB(static_cast<const NzMeshVertex*>(mapper.GetPointer()), m_vertexBuffer->GetVertexCount());
|
||||
m_aabb = NzComputeAABB(static_cast<const NzMeshVertex*>(mapper.GetPointer()), m_vertexBuffer->GetVertexCount());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue