1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

Use Ogre's matrix ops to transform normals

This commit is contained in:
Chris Robinson 2012-07-16 14:30:23 -07:00
parent bf26f029f9
commit fefbf86531

View file

@ -557,12 +557,9 @@ class NIFMeshLoader : Ogre::ManualResourceLoader
newVerts.at(index) += (mat*srcVerts[index]) * weight;
if(newNorms.size() > index)
{
for(size_t j = 0;j < 3;j++)
{
newNorms[index][j] += mat[j][0]*srcNorms[index][0] * weight;
newNorms[index][j] += mat[j][1]*srcNorms[index][1] * weight;
newNorms[index][j] += mat[j][2]*srcNorms[index][2] * weight;
}
Ogre::Vector4 vec4(srcNorms[index][0], srcNorms[index][1], srcNorms[index][2], 0.0f);
vec4 = mat*vec4 * weight;
newNorms[index] += Ogre::Vector3(&vec4[0]);
}
}
}