- templatize math library. All standard math classes (i.e. aiMatrix4x4) have been replaced by templates which are usually named like the old type with a 't' postfix. For compatibility, typedefs to replace the old types exist. For the C interface, these still map to raw structures.

While principally backwards-compatible, this is still a breaking change since I also changed some method signatures (i.e. aiVector3t<TReal>(TReal) is now explicit). Normal users should not be affected, though.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1129 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2012-02-02 02:06:08 +00:00
parent 418c1bfbe0
commit ea3f655c57
20 changed files with 1189 additions and 733 deletions

View File

@@ -120,7 +120,7 @@ bool GenFaceNormalsProcess::GenMeshFaceNormals (aiMesh* pMesh)
if (face.mNumIndices < 3) {
// either a point or a line -> no well-defined normal vector
for (unsigned int i = 0;i < face.mNumIndices;++i) {
pMesh->mNormals[face.mIndices[i]] = qnan;
pMesh->mNormals[face.mIndices[i]] = aiVector3D(qnan);
}
continue;
}
@@ -128,7 +128,7 @@ bool GenFaceNormalsProcess::GenMeshFaceNormals (aiMesh* pMesh)
const aiVector3D* pV1 = &pMesh->mVertices[face.mIndices[0]];
const aiVector3D* pV2 = &pMesh->mVertices[face.mIndices[1]];
const aiVector3D* pV3 = &pMesh->mVertices[face.mIndices[face.mNumIndices-1]];
aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).Normalize();
const aiVector3D vNor = ((*pV2 - *pV1) ^ (*pV3 - *pV1)).Normalize();
for (unsigned int i = 0;i < face.mNumIndices;++i) {
pMesh->mNormals[face.mIndices[i]] = vNor;