Fix incorrect classification of front/back
This commit is contained in:
parent
74228a2851
commit
c5cbeddcd5
|
@ -271,8 +271,8 @@ public class PotentiallyVisibleSet
|
||||||
var distance = MathUtils.DistanceFromPlane(plane, poly.Vertices[i]);
|
var distance = MathUtils.DistanceFromPlane(plane, poly.Vertices[i]);
|
||||||
distances[i] = distance;
|
distances[i] = distance;
|
||||||
sides[i] = distance switch {
|
sides[i] = distance switch {
|
||||||
> MathUtils.Epsilon => Side.Front,
|
> MathUtils.Epsilon => Side.Back,
|
||||||
<-MathUtils.Epsilon => Side.Back,
|
<-MathUtils.Epsilon => Side.Front,
|
||||||
_ => Side.On,
|
_ => Side.On,
|
||||||
};
|
};
|
||||||
counts[(int)sides[i]]++;
|
counts[(int)sides[i]]++;
|
||||||
|
|
Loading…
Reference in New Issue