diff --git a/src/collision/TriangleVertexArray.cpp b/src/collision/TriangleVertexArray.cpp index 56f3b422..7cfb2076 100644 --- a/src/collision/TriangleVertexArray.cpp +++ b/src/collision/TriangleVertexArray.cpp @@ -194,7 +194,7 @@ void TriangleVertexArray::getTriangleVerticesIndices(uint triangleIndex, uint* o assert(triangleIndex >= 0 && triangleIndex < mNbTriangles); - const uchar* triangleIndicesPointer = mIndicesStart + triangleIndex * 3 * mIndicesStride; + const uchar* triangleIndicesPointer = mIndicesStart + triangleIndex * mIndicesStride; const void* startTriangleIndices = static_cast(triangleIndicesPointer); // For each vertex of the triangle diff --git a/src/collision/TriangleVertexArray.h b/src/collision/TriangleVertexArray.h index 3db79c7e..3a48c2e3 100644 --- a/src/collision/TriangleVertexArray.h +++ b/src/collision/TriangleVertexArray.h @@ -122,6 +122,12 @@ class TriangleVertexArray { /// Destructor ~TriangleVertexArray(); + /// Deleted assignment operator + TriangleVertexArray& operator=(const TriangleVertexArray& triangleVertexArray) = delete; + + /// Deleted copy-constructor + TriangleVertexArray(const TriangleVertexArray& triangleVertexArray) = delete; + /// Return the vertex data type VertexDataType getVertexDataType() const; @@ -141,7 +147,7 @@ class TriangleVertexArray { uint getVerticesStride() const; /// Return the vertex normals stride (number of bytes) - uint getVerticesNormlasStride() const; + uint getVerticesNormalsStride() const; /// Return the indices stride (number of bytes) uint getIndicesStride() const; @@ -196,7 +202,7 @@ inline uint TriangleVertexArray::getVerticesStride() const { } // Return the vertex normals stride (number of bytes) -inline uint TriangleVertexArray::getVerticesNormlasStride() const { +inline uint TriangleVertexArray::getVerticesNormalsStride() const { return mVerticesNormalsStride; }