Interface CullFrustum
- All Known Implementing Classes:
PipelineFrustumMixin
Frustum that exposes all JOML FrustumIntersection methods.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.joml.Matrix4fcorg.joml.Vector4fc[]org.joml.Vector3dcorg.joml.Vector3fcbooleantestAab(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler.booleantestAab(net.minecraft.world.phys.AABB aabb) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestAab(org.joml.Vector3dc min, org.joml.Vector3dc max) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestAab(org.joml.Vector3fc min, org.joml.Vector3fc max) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestBlock(net.minecraft.core.BlockPos pos) Test whether the given block is within the frustum defined bythisfrustum culler.booleantestLineSegment(double aX, double aY, double aZ, double bX, double bY, double bZ) Test whether the given line segment, defined by the end points(aX, aY, aZ)and(bX, bY, bZ), is partly or completely within the frustum defined bythisfrustum culler.default booleantestLineSegment(org.joml.Vector3dc a, org.joml.Vector3dc b) Test whether the given line segment, defined by the end pointsaandb, is partly or completely within the frustum defined bythisfrustum culler.default booleantestLineSegment(org.joml.Vector3fc a, org.joml.Vector3fc b) Test whether the given line segment, defined by the end pointsaandb, is partly or completely within the frustum defined bythisfrustum culler.booleantestPlaneXY(double minX, double minY, double maxX, double maxY) Test whether the given XY-plane (atZ = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestPlaneXY(org.joml.Vector2dc min, org.joml.Vector2dc max) Test whether the given XY-plane (atZ = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestPlaneXY(org.joml.Vector2fc min, org.joml.Vector2fc max) Test whether the given XY-plane (atZ = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler.booleantestPlaneXZ(double minX, double minZ, double maxX, double maxZ) Test whether the given XZ-plane (atY = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestPlaneXZ(org.joml.Vector2dc min, org.joml.Vector2dc max) Test whether the given XZ-plane (atY = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestPlaneXZ(org.joml.Vector2fc min, org.joml.Vector2fc max) Test whether the given XZ-plane (atY = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler.booleantestPoint(double x, double y, double z) Test whether the given point(x, y, z)is within the frustum defined bythisfrustum culler.default booleantestPoint(net.minecraft.core.Position point) Test whether the given point is within the frustum defined bythisfrustum culler.default booleantestPoint(org.joml.Vector3dc point) Test whether the given point is within the frustum defined bythisfrustum culler.default booleantestPoint(org.joml.Vector3fc point) Test whether the given point is within the frustum defined bythisfrustum culler.default booleantestPoint(org.joml.Vector3ic point) Test whether the given point is within the frustum defined bythisfrustum culler.default booleantestSection(net.minecraft.core.SectionPos pos) Test whether the given section is within the frustum defined bythisfrustum culler.booleantestSphere(double x, double y, double z, float r) Test whether the given sphere is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestSphere(org.joml.Vector3dc center, float radius) Test whether the given sphere is partly or completely within or outside of the frustum defined bythisfrustum culler.default booleantestSphere(org.joml.Vector3fc center, float radius) Test whether the given sphere is partly or completely within or outside of the frustum defined bythisfrustum culler.net.minecraft.client.renderer.culling.Frustum
-
Method Details
-
testBlock
default boolean testBlock(net.minecraft.core.BlockPos pos) Test whether the given block is within the frustum defined bythisfrustum culler.- Parameters:
pos- The position to check- Returns:
trueif the given block is inside the frustum;falseotherwise
-
testSection
default boolean testSection(net.minecraft.core.SectionPos pos) Test whether the given section is within the frustum defined bythisfrustum culler.- Parameters:
pos- The position to check- Returns:
trueif the given section is inside the frustum;falseotherwise
-
testPoint
default boolean testPoint(net.minecraft.core.Position point) Test whether the given point is within the frustum defined bythisfrustum culler.- Parameters:
point- the point to test- Returns:
trueif the given point is inside the frustum;falseotherwise
-
testPoint
default boolean testPoint(org.joml.Vector3ic point) Test whether the given point is within the frustum defined bythisfrustum culler.- Parameters:
point- the point to test- Returns:
trueif the given point is inside the frustum;falseotherwise
-
testPoint
default boolean testPoint(org.joml.Vector3fc point) Test whether the given point is within the frustum defined bythisfrustum culler.- Parameters:
point- the point to test- Returns:
trueif the given point is inside the frustum;falseotherwise
-
testPoint
default boolean testPoint(org.joml.Vector3dc point) Test whether the given point is within the frustum defined bythisfrustum culler.- Parameters:
point- the point to test- Returns:
trueif the given point is inside the frustum;falseotherwise
-
testPoint
boolean testPoint(double x, double y, double z) Test whether the given point(x, y, z)is within the frustum defined bythisfrustum culler.- Parameters:
x- the x-coordinate of the pointy- the y-coordinate of the pointz- the z-coordinate of the point- Returns:
trueif the given point is inside the frustum;falseotherwise
-
testSphere
default boolean testSphere(org.joml.Vector3dc center, float radius) Test whether the given sphere is partly or completely within or outside of the frustum defined bythisfrustum culler.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor spheres that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
center- the sphere's centerradius- the sphere's radius- Returns:
trueif the given sphere is partly or completely inside the frustum;falseotherwise
-
testSphere
default boolean testSphere(org.joml.Vector3fc center, float radius) Test whether the given sphere is partly or completely within or outside of the frustum defined bythisfrustum culler.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor spheres that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
center- the sphere's centerradius- the sphere's radius- Returns:
trueif the given sphere is partly or completely inside the frustum;falseotherwise
-
testSphere
boolean testSphere(double x, double y, double z, float r) Test whether the given sphere is partly or completely within or outside of the frustum defined bythisfrustum culler.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor spheres that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
x- the x-coordinate of the sphere's centery- the y-coordinate of the sphere's centerz- the z-coordinate of the sphere's centerr- the sphere's radius- Returns:
trueif the given sphere is partly or completely inside the frustum;falseotherwise
-
testAab
boolean testAab(net.minecraft.world.phys.AABB aabb) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler. The box is specified via itsminandmaxcorner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor boxes that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
aabb- the axis-aligned box- Returns:
trueif the axis-aligned box is completely or partly inside of the frustum;falseotherwise
-
testAab
default boolean testAab(org.joml.Vector3dc min, org.joml.Vector3dc max) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler. The box is specified via itsminandmaxcorner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor boxes that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
min- the minimum corner coordinates of the axis-aligned boxmax- the maximum corner coordinates of the axis-aligned box- Returns:
trueif the axis-aligned box is completely or partly inside of the frustum;falseotherwise
-
testAab
default boolean testAab(org.joml.Vector3fc min, org.joml.Vector3fc max) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler. The box is specified via itsminandmaxcorner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor boxes that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
min- the minimum corner coordinates of the axis-aligned boxmax- the maximum corner coordinates of the axis-aligned box- Returns:
trueif the axis-aligned box is completely or partly inside of the frustum;falseotherwise
-
testAab
boolean testAab(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) Test whether the given axis-aligned box is partly or completely within or outside of the frustum defined bythisfrustum culler. The box is specified via its min and max corner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor boxes that do not intersect the frustum. See iquilezles.org for an examination of this problem.Reference: Efficient View Frustum Culling
- Parameters:
minX- the x-coordinate of the minimum cornerminY- the y-coordinate of the minimum cornerminZ- the z-coordinate of the minimum cornermaxX- the x-coordinate of the maximum cornermaxY- the y-coordinate of the maximum cornermaxZ- the z-coordinate of the maximum corner- Returns:
trueif the axis-aligned box is completely or partly inside of the frustum;falseotherwise
-
testPlaneXY
default boolean testPlaneXY(org.joml.Vector2dc min, org.joml.Vector2dc max) Test whether the given XY-plane (atZ = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler. The plane is specified via itsminandmaxcorner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor planes that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
min- the minimum corner coordinates of the XY-planemax- the maximum corner coordinates of the XY-plane- Returns:
trueif the XY-plane is completely or partly inside of the frustum;falseotherwise
-
testPlaneXY
default boolean testPlaneXY(org.joml.Vector2fc min, org.joml.Vector2fc max) Test whether the given XY-plane (atZ = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler. The plane is specified via itsminandmaxcorner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor planes that do not intersect the frustum. See iquilezles.org for an examination of this problem.- Parameters:
min- the minimum corner coordinates of the XY-planemax- the maximum corner coordinates of the XY-plane- Returns:
trueif the XY-plane is completely or partly inside of the frustum;falseotherwise
-
testPlaneXY
boolean testPlaneXY(double minX, double minY, double maxX, double maxY) Test whether the given XY-plane (atZ = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler. The plane is specified via its min and max corner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor planes that do not intersect the frustum. See iquilezles.org for an examination of this problem.Reference: Efficient View Frustum Culling
- Parameters:
minX- the x-coordinate of the minimum cornerminY- the y-coordinate of the minimum cornermaxX- the x-coordinate of the maximum cornermaxY- the y-coordinate of the maximum corner- Returns:
trueif the XY-plane is completely or partly inside of the frustum;falseotherwise
-
testPlaneXZ
default boolean testPlaneXZ(org.joml.Vector2dc min, org.joml.Vector2dc max) Test whether the given XZ-plane (atY = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler. The plane is specified via its min and max corner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor planes that do not intersect the frustum. See iquilezles.org for an examination of this problem.Reference: Efficient View Frustum Culling
- Parameters:
min- the minimum corner coordinates of the XZ-planemax- the maximum corner coordinates of the XZ-plane- Returns:
trueif the XZ-plane is completely or partly inside of the frustum;falseotherwise
-
testPlaneXZ
default boolean testPlaneXZ(org.joml.Vector2fc min, org.joml.Vector2fc max) Test whether the given XZ-plane (atY = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler. The plane is specified via its min and max corner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor planes that do not intersect the frustum. See iquilezles.org for an examination of this problem.Reference: Efficient View Frustum Culling
- Parameters:
min- the minimum corner coordinates of the XZ-planemax- the maximum corner coordinates of the XZ-plane- Returns:
trueif the XZ-plane is completely or partly inside of the frustum;falseotherwise
-
testPlaneXZ
boolean testPlaneXZ(double minX, double minZ, double maxX, double maxZ) Test whether the given XZ-plane (atY = 0) is partly or completely within or outside of the frustum defined bythisfrustum culler. The plane is specified via its min and max corner coordinates.The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns
truefor planes that do not intersect the frustum. See iquilezles.org for an examination of this problem.Reference: Efficient View Frustum Culling
- Parameters:
minX- the x-coordinate of the minimum cornerminZ- the z-coordinate of the minimum cornermaxX- the x-coordinate of the maximum cornermaxZ- the z-coordinate of the maximum corner- Returns:
trueif the XZ-plane is completely or partly inside of the frustum;falseotherwise
-
testLineSegment
default boolean testLineSegment(org.joml.Vector3dc a, org.joml.Vector3dc b) Test whether the given line segment, defined by the end pointsaandb, is partly or completely within the frustum defined bythisfrustum culler.- Parameters:
a- the line segment's first end pointb- the line segment's second end point- Returns:
trueif the given line segment is partly or completely inside the frustum;falseotherwise
-
testLineSegment
default boolean testLineSegment(org.joml.Vector3fc a, org.joml.Vector3fc b) Test whether the given line segment, defined by the end pointsaandb, is partly or completely within the frustum defined bythisfrustum culler.- Parameters:
a- the line segment's first end pointb- the line segment's second end point- Returns:
trueif the given line segment is partly or completely inside the frustum;falseotherwise
-
testLineSegment
boolean testLineSegment(double aX, double aY, double aZ, double bX, double bY, double bZ) Test whether the given line segment, defined by the end points(aX, aY, aZ)and(bX, bY, bZ), is partly or completely within the frustum defined bythisfrustum culler.- Parameters:
aX- the x coordinate of the line segment's first end pointaY- the y coordinate of the line segment's first end pointaZ- the z coordinate of the line segment's first end pointbX- the x coordinate of the line segment's second end pointbY- the y coordinate of the line segment's second end pointbZ- the z coordinate of the line segment's second end point- Returns:
trueif the given line segment is partly or completely inside the frustum;falseotherwise
-
getPlanes
org.joml.Vector4fc[] getPlanes()- Returns:
- The data for each plane in the frustum
-
getModelViewProjectionMatrix
org.joml.Matrix4fc getModelViewProjectionMatrix()- Returns:
- The matrix used to create this frustum
-
getViewVector
org.joml.Vector3fc getViewVector()- Returns:
- The direction of the camera frustum
-
getPosition
org.joml.Vector3dc getPosition()- Returns:
- The position of the camera
-
toFrustum
net.minecraft.client.renderer.culling.Frustum toFrustum()- Returns:
- This cull frustum as a vanilla mc
Frustum
-