From 50b780e21ee71af09b3f817297d17d0ea36b0449 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Sat, 7 May 2011 16:57:58 +0000 Subject: [PATCH] # work on IFC face winding, but the extensive use of mirroring in IFC screws things up. Add a documentation node that one should better render them with bf culling turned off. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@985 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- code/IFCLoader.cpp | 12 ++++++------ doc/dox.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index 47569a035..a69eada31 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -649,9 +649,9 @@ void ProcessParametrizedProfile(const IFC::IfcParameterizedProfileDef& def, Temp meshout.verts.reserve(meshout.verts.size()+4); meshout.verts.push_back( aiVector3D( x, y, 0.f )); - meshout.verts.push_back( aiVector3D( x,-y, 0.f )); - meshout.verts.push_back( aiVector3D(-x,-y, 0.f )); meshout.verts.push_back( aiVector3D(-x, y, 0.f )); + meshout.verts.push_back( aiVector3D(-x,-y, 0.f )); + meshout.verts.push_back( aiVector3D( x,-y, 0.f )); meshout.vertcnt.push_back(4); } else { @@ -721,12 +721,12 @@ void ProcessExtrudedAreaSolid(const IFC::IfcExtrudedAreaSolid& solid, TempMesh& // leave the triangulation of the profile area to the ear cutting // implementation in aiProcess_Triangulate - for now we just // feed in a possibly huge polygon. - for(size_t i = 0; i < size; ++i) { - result.verts.push_back(in[i]); - } - for(size_t i = 0; i < size; ++i) { + for(size_t i = size; i--; ) { result.verts.push_back(in[i]+dir); } + for(size_t i = 0; i < size; ++i ) { + result.verts.push_back(in[i]); + } result.vertcnt.push_back(size); result.vertcnt.push_back(size); } diff --git a/doc/dox.h b/doc/dox.h index d7a4ec735..8fd336181 100644 --- a/doc/dox.h +++ b/doc/dox.h @@ -1626,7 +1626,7 @@ if there are multiple representations, only one of them will actually be a solid provided by IFC: only aggregation, containment and material assignment relationships are resolved by the library and mapped to the output node graph. - The implementation knows only about IFC2X3 and applies this rule set to all models it encounters, regardless of their actual version. - +- IFC models should be rendered with backface culling turned off.
@section ogre Ogre