Improved outline detection condition.

Before this commit, circles parallel to the camera plane caused
some edges to be randomly marked as outlines.
pull/19/merge
EvilSpirit 2016-06-24 15:12:10 +06:00 committed by whitequark
parent 737ff51893
commit 0b999f4165
1 changed files with 1 additions and 1 deletions

View File

@ -1052,7 +1052,7 @@ void SKdNode::MakeOutlinesInto(SOutlineList *sol) const
} }
bool SOutline::IsVisible(Vector projDir) const { bool SOutline::IsVisible(Vector projDir) const {
return (nl.Dot(projDir) > 0.0) != (nr.Dot(projDir) > 0.0); return (nl.Dot(projDir) > LENGTH_EPS) == (nr.Dot(projDir) < LENGTH_EPS);
} }
void SOutlineList::Clear() { void SOutlineList::Clear() {