mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-21 12:52:19 +00:00
Angelica 2.0
* GLStateManagerService & RenderSystemService * Wire up Celeritas * Iris working * Dynamic lights working * Goodbye Sodium 0.2 * Add Multi-Threading for check meshing again
This commit is contained in:
1 parent
e5e8250d44
commit
be90a01725
354 files changed
+5257
-15599
No files matched your search
@@ -3,7 +3,7 @@ package net.coderbot.iris.shadows.frustum;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class BoxCuller {
|
||||
private final double maxDistance;
|
||||
private double maxDistance;
|
||||
|
||||
private double minAllowedX;
|
||||
private double maxAllowedX;
|
||||
@@ -16,6 +16,10 @@ public class BoxCuller {
|
||||
this.maxDistance = maxDistance;
|
||||
}
|
||||
|
||||
public void setMaxDistance(double maxDistance) {
|
||||
this.maxDistance = maxDistance;
|
||||
}
|
||||
|
||||
public void setPosition(double cameraX, double cameraY, double cameraZ) {
|
||||
this.minAllowedX = cameraX - maxDistance;
|
||||
this.maxAllowedX = cameraX + maxDistance;
|
||||
@@ -39,10 +43,19 @@ public class BoxCuller {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (maxZ < this.minAllowedZ || minZ > this.maxAllowedZ) {
|
||||
return maxZ < this.minAllowedZ || minZ > this.maxAllowedZ;
|
||||
}
|
||||
|
||||
// View-relative coordinates version
|
||||
public boolean isCulledViewRelative(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) {
|
||||
if (maxX < -this.maxDistance || minX > this.maxDistance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (maxY < -this.maxDistance || minY > this.maxDistance) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return maxZ < -this.maxDistance || minZ > this.maxDistance;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user