Skip to content

Commit

Permalink
World|Map Renderer|Polyobj: Skip half-edges on the back of one-sided …
Browse files Browse the repository at this point in the history
…polyobj lines

When clipping lumobjs by sight and notifying geometry changes.
  • Loading branch information
danij-deng committed Aug 14, 2013
1 parent 230d63d commit 72c40f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doomsday/client/src/render/lumobj.cpp
Expand Up @@ -1168,6 +1168,10 @@ boolean LOIT_ClipLumObjBySight(void *data, void *context)
foreach(Polyobj *po, bspLeaf->polyobjs())
foreach(HEdge *hedge, po->mesh().hedges())
{
// Is this on the back of a one-sided line?
if(!hedge->mapElement())
continue;

// Ignore half-edges facing the wrong way.
if(hedge->mapElement()->as<Line::Side::Segment>()->isFrontFacing())
{
Expand Down
4 changes: 4 additions & 0 deletions doomsday/client/src/world/polyobj.cpp
Expand Up @@ -53,6 +53,10 @@ static void notifyGeometryChanged(Polyobj &po)
// Shadow bias must be informed when surfaces move/deform.
foreach(HEdge *hedge, po.mesh().hedges())
{
// Is this on the back of a one-sided line?
if(!hedge->mapElement())
continue;

hedge->mapElement()->as<Line::Side::Segment>()->
updateBiasAfterGeometryMove(Line::Side::Middle);
}
Expand Down

0 comments on commit 72c40f0

Please sign in to comment.