Skip edges with equal L/R normals when calculating outlines.
This commit is contained in:
parent
5a2eb9fb50
commit
737ff51893
@ -1040,7 +1040,13 @@ void SKdNode::MakeOutlinesInto(SOutlineList *sol) const
|
|||||||
if(CheckAndAddTrianglePair(&edgeTris, tr, info.tr))
|
if(CheckAndAddTrianglePair(&edgeTris, tr, info.tr))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
sol->AddEdge(a, b, tr->Normal(), info.tr->Normal());
|
Vector nl = tr->Normal().WithMagnitude(1.0);
|
||||||
|
Vector nr = info.tr->Normal().WithMagnitude(1.0);
|
||||||
|
|
||||||
|
// We don't add edges with the same left and right
|
||||||
|
// normals because they can't produce outlines.
|
||||||
|
if(nl.Equals(nr)) continue;
|
||||||
|
sol->AddEdge(a, b, nl, nr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user