more compiler compliant cleanups plus a full set of tsMesh::foo to tsmesh::mFoo class var conversions for consistency

This commit is contained in:
Azaezel 2018-03-13 14:53:23 -05:00
parent b55db9a143
commit 4615bd6db8
13 changed files with 293 additions and 293 deletions

View file

@ -938,7 +938,7 @@ TSMesh* TSShape::copyMesh( const TSMesh* srcMesh ) const
// Copy mesh elements
mesh->mIndices = srcMesh->mIndices;
mesh->primitives = srcMesh->primitives;
mesh->mPrimitives = srcMesh->mPrimitives;
mesh->numFrames = srcMesh->numFrames;
mesh->numMatFrames = srcMesh->numMatFrames;
mesh->vertsPerFrame = srcMesh->vertsPerFrame;
@ -948,8 +948,8 @@ TSMesh* TSShape::copyMesh( const TSMesh* srcMesh ) const
// Copy vertex data in an *unpacked* form
mesh->copySourceVertexDataFrom(srcMesh);
mesh->createTangents(mesh->verts, mesh->norms);
mesh->encodedNorms.set(NULL, 0);
mesh->createTangents(mesh->mVerts, mesh->mNorms);
mesh->mEncodedNorms.set(NULL, 0);
mesh->computeBounds();
@ -1108,12 +1108,12 @@ bool TSShape::addMesh(TSShape* srcShape, const String& srcMeshName, const String
// Copy materials used by the source mesh (only if from a different shape)
if (srcShape != this)
{
for (S32 i = 0; i < mesh->primitives.size(); i++)
for (S32 i = 0; i < mesh->mPrimitives.size(); i++)
{
if (!(mesh->primitives[i].matIndex & TSDrawPrimitive::NoMaterial))
if (!(mesh->mPrimitives[i].matIndex & TSDrawPrimitive::NoMaterial))
{
S32 drawType = (mesh->primitives[i].matIndex & (~TSDrawPrimitive::MaterialMask));
S32 srcMatIndex = mesh->primitives[i].matIndex & TSDrawPrimitive::MaterialMask;
S32 drawType = (mesh->mPrimitives[i].matIndex & (~TSDrawPrimitive::MaterialMask));
S32 srcMatIndex = mesh->mPrimitives[i].matIndex & TSDrawPrimitive::MaterialMask;
const String& matName = srcShape->materialList->getMaterialName(srcMatIndex);
// Add the material if it does not already exist
@ -1124,7 +1124,7 @@ bool TSShape::addMesh(TSShape* srcShape, const String& srcMeshName, const String
materialList->push_back(matName, srcShape->materialList->getFlags(srcMatIndex));
}
mesh->primitives[i].matIndex = drawType | destMatIndex;
mesh->mPrimitives[i].matIndex = drawType | destMatIndex;
}
}
}