Triangulation:

- FEATURE: Concave polygons are now triangulated correctly.
 - internal face order is ccw now, flipwinding part of converttolh flag
 - added test files for the various formats supporting such polygons

FindDegenerates: 
 - improved behaviour when processing polygons, more tolerant.

Obj: 
 - material files are now properly read using the given IOSystem 
 - redirecting some std::cerr calls to our logger 
 - spaces and tabs are now allowed at the beginning of a line 

Viewer: 
 - max smoothing angle for normals is set to 90 deg now

vc9-workspace 
 - added assimp_cmd, renamed some virtual folders to be sexier.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@374 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2009-04-02 15:16:01 +00:00
parent c89944b2af
commit 29c33760e4
33 changed files with 2343 additions and 275 deletions
+10 -3
View File
@@ -100,7 +100,7 @@ void FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh)
if (configRemoveDegenerates)
remove_me.resize(mesh->mNumFaces,false);
unsigned int deg = 0;
unsigned int deg = 0, limit;
for (unsigned int a = 0; a < mesh->mNumFaces; ++a)
{
aiFace& face = mesh->mFaces[a];
@@ -109,13 +109,20 @@ void FindDegeneratesProcess::ExecuteOnMesh( aiMesh* mesh)
// check whether the face contains degenerated entries
for (register unsigned int i = 0; i < face.mNumIndices; ++i)
{
for (register unsigned int t = i+1; t < face.mNumIndices; ++t)
// Polygons with more than 4 points are allowed to have double points, that is
// simulating polygons with holes just with concave polygons. However,
// double points may not come directly after another.
limit = face.mNumIndices;
if (face.mNumIndices > 4)
limit = std::min(limit,i+2);
for (register unsigned int t = i+1; t < limit; ++t)
{
if (mesh->mVertices[face.mIndices[i]] == mesh->mVertices[face.mIndices[t]])
{
// we have found a matching vertex position
// remove the corresponding index from the array
--face.mNumIndices;
--face.mNumIndices;--limit;
for (unsigned int m = t; m < face.mNumIndices; ++m)
{
face.mIndices[m] = face.mIndices[m+1];