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:
@@ -13,6 +13,7 @@ void TriangulateProcessTest :: setUp (void)
|
||||
|
||||
pcMesh->mNumFaces = 1000;
|
||||
pcMesh->mFaces = new aiFace[1000];
|
||||
pcMesh->mVertices = new aiVector3D[10000];
|
||||
|
||||
pcMesh->mPrimitiveTypes = aiPrimitiveType_POINT | aiPrimitiveType_LINE |
|
||||
aiPrimitiveType_LINE | aiPrimitiveType_POLYGON;
|
||||
@@ -32,7 +33,13 @@ void TriangulateProcessTest :: setUp (void)
|
||||
face.mIndices = new unsigned int[face.mNumIndices];
|
||||
for (unsigned int p = 0; p < face.mNumIndices; ++p)
|
||||
{
|
||||
face.mIndices[p] = pcMesh->mNumVertices++;
|
||||
face.mIndices[p] = pcMesh->mNumVertices;
|
||||
|
||||
// construct fully convex input data in ccw winding, xy plane
|
||||
aiVector3D& v = pcMesh->mVertices[pcMesh->mNumVertices++];
|
||||
v.z = 0.f;
|
||||
v.x = cos (p * AI_MATH_TWO_PI/face.mNumIndices);
|
||||
v.y = sin (p * AI_MATH_TWO_PI/face.mNumIndices);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,4 +93,7 @@ void TriangulateProcessTest :: testTriangulation (void)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// we should have no valid normal vectors now necause we aren't a pure polygon mesh
|
||||
CPPUNIT_ASSERT(pcMesh->mNormals == NULL);
|
||||
}
|
||||
Reference in New Issue
Block a user