Updated ComputeAAB and TransformVertices functions

They now take sparse pointers instead of template type


Former-commit-id: 92a3de59b6a321136b8bad324048239f83381534
This commit is contained in:
Lynix
2015-01-26 17:44:32 +01:00
parent 025fdf6846
commit 35a37f8507
4 changed files with 40 additions and 49 deletions

View File

@@ -32,7 +32,7 @@ struct NzVertexPointers
NzSparsePtr<NzVector2f> uvPtr;
};
template<typename T> NzBoxf NzComputeAABB(const T* vertices, unsigned int vertexCount);
NAZARA_API NzBoxf NzComputeAABB(NzSparsePtr<const NzVector3f> positionPtr, 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);
@@ -41,7 +41,6 @@ NAZARA_API void NzComputeIcoSphereIndexVertexCount(unsigned int recursionLevel,
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);
///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);
NAZARA_API void NzGenerateCone(float length, float radius, unsigned int subdivision, const NzMatrix4f& matrix, const NzRectf& textureCoords, NzVertexPointers vertexPointers, NzIndexIterator indices, NzBoxf* aabb = nullptr, unsigned int indexOffset = 0);
NAZARA_API void NzGenerateCubicSphere(float size, unsigned int subdivision, const NzMatrix4f& matrix, const NzRectf& textureCoords, NzVertexPointers vertexPointers, NzIndexIterator indices, NzBoxf* aabb = nullptr, unsigned int indexOffset = 0);
@@ -55,8 +54,6 @@ NAZARA_API void NzSkinPosition(const NzSkinningData& data, unsigned int startVer
NAZARA_API void NzSkinPositionNormal(const NzSkinningData& data, unsigned int startVertex, unsigned int vertexCount);
NAZARA_API void NzSkinPositionNormalTangent(const NzSkinningData& data, unsigned int startVertex, unsigned int vertexCount);
template<typename T> void NzTransformVertices(T* vertices, unsigned int vertexCount, const NzMatrix4f& matrix);
#include <Nazara/Utility/Algorithm.inl>
NAZARA_API void NzTransformVertices(NzVertexPointers vertexPointers, unsigned int vertexCount, const NzMatrix4f& matrix);
#endif // NAZARA_ALGORITHM_UTILITY_HPP