Fix warnings
This commit is contained in:
parent
4ae8d446be
commit
34b330eb4f
|
@ -71,13 +71,16 @@ void ConcaveMeshShape::initBVHTree() {
|
|||
for (int k=0; k < 3; k++) {
|
||||
|
||||
// Get the index of the current vertex in the triangle
|
||||
int vertexIndex;
|
||||
int vertexIndex = 0;
|
||||
if (indexType == TriangleVertexArray::INDEX_INTEGER_TYPE) {
|
||||
vertexIndex = ((uint*)vertexIndexPointer)[k];
|
||||
}
|
||||
else if (indexType == TriangleVertexArray::INDEX_SHORT_TYPE) {
|
||||
vertexIndex = ((unsigned short*)vertexIndexPointer)[k];
|
||||
}
|
||||
else {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
// Get the vertices components of the triangle
|
||||
if (vertexType == TriangleVertexArray::VERTEX_FLOAT_TYPE) {
|
||||
|
@ -92,6 +95,9 @@ void ConcaveMeshShape::initBVHTree() {
|
|||
trianglePoints[k][1] = decimal(vertices[1]) * mScaling.y;
|
||||
trianglePoints[k][2] = decimal(vertices[2]) * mScaling.z;
|
||||
}
|
||||
else {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Create the AABB for the triangle
|
||||
|
@ -132,6 +138,9 @@ void ConcaveMeshShape::getTriangleVerticesWithIndexPointer(int32 subPart, int32
|
|||
else if (indexType == TriangleVertexArray::INDEX_SHORT_TYPE) {
|
||||
vertexIndex = ((unsigned short*)vertexIndexPointer)[k];
|
||||
}
|
||||
else {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
// Get the vertices components of the triangle
|
||||
if (vertexType == TriangleVertexArray::VERTEX_FLOAT_TYPE) {
|
||||
|
|
|
@ -103,7 +103,7 @@ ConvexMeshShape::ConvexMeshShape(TriangleVertexArray* triangleVertexArray, bool
|
|||
|
||||
void* vertexIndexPointer = (indicesStart + triangleIndex * 3 * indexStride);
|
||||
|
||||
uint vertexIndex[3];
|
||||
uint vertexIndex[3] = {0, 0, 0};
|
||||
|
||||
// For each vertex of the triangle
|
||||
for (int k=0; k < 3; k++) {
|
||||
|
@ -115,6 +115,9 @@ ConvexMeshShape::ConvexMeshShape(TriangleVertexArray* triangleVertexArray, bool
|
|||
else if (indexType == TriangleVertexArray::INDEX_SHORT_TYPE) {
|
||||
vertexIndex[k] = ((unsigned short*)vertexIndexPointer)[k];
|
||||
}
|
||||
else {
|
||||
assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
// Add information about the edges
|
||||
|
|
Loading…
Reference in New Issue
Block a user