Fix issue and small changes in TriangleVertexArray

This commit is contained in:
Daniel Chappuis 2017-10-09 22:36:39 +02:00
parent d62aa41974
commit 38eff07d0d
2 changed files with 9 additions and 3 deletions

View File

@ -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<const void*>(triangleIndicesPointer);
// For each vertex of the triangle

View File

@ -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;
}