Reimplement commit 0b999f4 correctly.

pull/33/head
EvilSpirit 2016-07-04 13:57:46 +06:00 committed by whitequark
parent 6e17780e01
commit a4a121694c
1 changed files with 4 additions and 1 deletions

View File

@ -1042,7 +1042,10 @@ void SKdNode::MakeOutlinesInto(SOutlineList *sol) const
}
bool SOutline::IsVisible(Vector projDir) const {
return (nl.Dot(projDir) > LENGTH_EPS) == (nr.Dot(projDir) < LENGTH_EPS);
double ldot = nl.Dot(projDir);
double rdot = nr.Dot(projDir);
return (ldot > -LENGTH_EPS) == (rdot < LENGTH_EPS) ||
(rdot > -LENGTH_EPS) == (ldot < LENGTH_EPS);
}
void SOutlineList::Clear() {