Frustum .java

net.minecraft.client.renderer.culling.Frustum (class): members: clippingHelper, isBoundingBoxInFrustum, isBoxInFrustum, zPosition, yPosition, xPosition.

net.minecraft.client.renderer.cullingclass45 linesclient1.5 KB

Implements

API Surface (3)

void setPosition(double p_78547_1_, double p_78547_3_, double p_78547_5_)
boolean isBoxInFrustum(double p_78548_1_, double p_78548_3_, double p_78548_5_, double p_78548_7_, double p_78548_9_, double p_78548_11_)
boolean isBoundingBoxInFrustum(AxisAlignedBB p_78546_1_)

Fields & Constants (4)

clippingHelper
xPosition
yPosition
zPosition

Code Graph: Dependencies (4)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

Frustum.java45 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.client.renderer.culling;
2
3
import net.minecraft.util.AxisAlignedBB;
4
5
public class Frustum implements ICamera
6
{
7
    private ClippingHelper clippingHelper;
8
    private double xPosition;
9
    private double yPosition;
10
    private double zPosition;
11
12
    public Frustum()
13
    {
14
        this(ClippingHelperImpl.getInstance());
15
    }
16
17
    public Frustum(ClippingHelper p_i46196_1_)
18
    {
19
        this.clippingHelper = p_i46196_1_;
20
    }
21
22
    public void setPosition(double p_78547_1_, double p_78547_3_, double p_78547_5_)
23
    {
24
        this.xPosition = p_78547_1_;
25
        this.yPosition = p_78547_3_;
26
        this.zPosition = p_78547_5_;
27
    }
28
29
    /**
30
     * Calls the clipping helper. Returns true if the box is inside all 6 clipping planes, otherwise returns false.
31
     */
32
    public boolean isBoxInFrustum(double p_78548_1_, double p_78548_3_, double p_78548_5_, double p_78548_7_, double p_78548_9_, double p_78548_11_)
33
    {
34
        return this.clippingHelper.isBoxInFrustum(p_78548_1_ - this.xPosition, p_78548_3_ - this.yPosition, p_78548_5_ - this.zPosition, p_78548_7_ - this.xPosition, p_78548_9_ - this.yPosition, p_78548_11_ - this.zPosition);
35
    }
36
37
    /**
38
     * Returns true if the bounding box is inside all 6 clipping planes, otherwise returns false.
39
     */
40
    public boolean isBoundingBoxInFrustum(AxisAlignedBB p_78546_1_)
41
    {
42
        return this.isBoxInFrustum(p_78546_1_.minX, p_78546_1_.minY, p_78546_1_.minZ, p_78546_1_.maxX, p_78546_1_.maxY, p_78546_1_.maxZ);
43
    }
44
}
45

Deobfuscated MCP 1.8.9 source of Frustum from Marcelektro/MavenMCP-1.8.9 (net/minecraft/client/renderer/culling/Frustum.java), stored verbatim.