perspective: do not remove culled faces from clickbox calculation
It seems culled faces are intentionally added to some models for their clickboxes.
This commit is contained in:
@@ -494,16 +494,6 @@ public class Perspective
|
||||
return clickBox;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a triangle goes counter clockwise
|
||||
*
|
||||
* @return Returns true if the triangle goes counter clockwise and should be culled, otherwise false
|
||||
*/
|
||||
private static boolean cullFace(int x1, int y1, int x2, int y2, int x3, int y3)
|
||||
{
|
||||
return (y2 - y1) * (x3 - x2) - (x2 - x1) * (y3 - y2) < 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a given point is off-screen.
|
||||
*
|
||||
@@ -560,11 +550,6 @@ public class Perspective
|
||||
continue;
|
||||
}
|
||||
|
||||
if (cullFace(a.getX(), a.getY(), b.getX(), b.getY(), c.getX(), c.getY()))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isOffscreen(client, a) && isOffscreen(client, b) && isOffscreen(client, c))
|
||||
{
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user