mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 22:50:45 +00:00
- removal of backface genration in Aasbuild for polygonmeshes.
This commit is contained in:
parent
73b70ce4ba
commit
3702fb1dec
1 changed files with 1 additions and 37 deletions
|
@ -452,14 +452,7 @@ idBrushList idAASBuild::AddBrushesForMapPolygonMesh( const MapPolygonMesh* mapMe
|
|||
const idList<idDrawVert>& verts = mapMesh->GetDrawVerts();
|
||||
const idList<int>& indices = face.GetIndexes();
|
||||
|
||||
idVec3 triNormal;
|
||||
int v1 = 0;
|
||||
int v2 = 1;
|
||||
int v3 = 2;
|
||||
|
||||
//create brush with 2 triangles
|
||||
// 1 frontface from the mappoly verts
|
||||
// 1 backface, offset in direction off frontface normal at unit distance
|
||||
//create brush from triangle
|
||||
|
||||
//Front face
|
||||
d1 = verts[indices[1]].xyz - verts[indices[0]].xyz;
|
||||
|
@ -490,35 +483,6 @@ idBrushList idAASBuild::AddBrushesForMapPolygonMesh( const MapPolygonMesh* mapMe
|
|||
delete brush;
|
||||
}
|
||||
}
|
||||
|
||||
//Back face
|
||||
triNormal = plane.Normal();
|
||||
plane.SetNormal( d2.Cross( d1 ) );
|
||||
if( plane.Normalize() != 0.0f )
|
||||
{
|
||||
plane.FitThroughPoint( verts[indices[0]].xyz );
|
||||
|
||||
w.Clear();
|
||||
w += verts[indices[2]].xyz + triNormal;
|
||||
w += verts[indices[1]].xyz + triNormal;
|
||||
w += verts[indices[0]].xyz + triNormal;
|
||||
|
||||
brush = new idBrush();
|
||||
brush->SetContents( contents );
|
||||
if( brush->FromWinding( w, plane ) )
|
||||
{
|
||||
brush->SetEntityNum( entityNum );
|
||||
brush->SetPrimitiveNum( primitiveNum );
|
||||
brush->SetFlag( BFL_PATCH );
|
||||
brush->Transform( origin, axis );
|
||||
brushList.AddToTail( brush );
|
||||
validBrushes++;
|
||||
}
|
||||
else
|
||||
{
|
||||
delete brush;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( !validBrushes )
|
||||
|
|
Loading…
Reference in a new issue