Class PipelineFrustumMixin
- All Implemented Interfaces:
CullFrustum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancubeInFrustum(double d, double e, double f, double g, double h, double i) org.joml.Matrix4fcorg.joml.Vector4fc[]org.joml.Vector3dcorg.joml.Vector3fcabstract booleanisVisible(net.minecraft.world.phys.AABB aABB) booleantestAab(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.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.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.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.booleantestPoint(double x, double y, double z) Test whether the given point(x, y, z)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.net.minecraft.client.renderer.culling.FrustumMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface foundry.veil.api.client.render.CullFrustum
testAab, testAab, testBlock, testLineSegment, testLineSegment, testPlaneXY, testPlaneXY, testPlaneXZ, testPlaneXZ, testPoint, testPoint, testPoint, testPoint, testSection, testSphere, testSphere
-
Constructor Details
-
PipelineFrustumMixin
public PipelineFrustumMixin()
-
-
Method Details
-
isVisible
public abstract boolean isVisible(net.minecraft.world.phys.AABB aABB) -
cubeInFrustum
protected abstract boolean cubeInFrustum(double d, double e, double f, double g, double h, double i) -
testPoint
public boolean testPoint(double x, double y, double z) Description copied from interface:CullFrustumTest whether the given point(x, y, z)is within the frustum defined bythisfrustum culler.- Specified by:
testPointin interfaceCullFrustum- 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
public boolean testSphere(double x, double y, double z, float r) Description copied from interface:CullFrustumTest 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.- Specified by:
testSpherein interfaceCullFrustum- 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
public boolean testAab(net.minecraft.world.phys.AABB aabb) Description copied from interface:CullFrustumTest 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.- Specified by:
testAabin interfaceCullFrustum- Parameters:
aabb- the axis-aligned box- Returns:
trueif the axis-aligned box is completely or partly inside of the frustum;falseotherwise
-
testAab
public boolean testAab(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) Description copied from interface:CullFrustumTest 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
- Specified by:
testAabin interfaceCullFrustum- 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
public boolean testPlaneXY(double minX, double minY, double maxX, double maxY) Description copied from interface:CullFrustumTest 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
- Specified by:
testPlaneXYin interfaceCullFrustum- 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
public boolean testPlaneXZ(double minX, double minZ, double maxX, double maxZ) Description copied from interface:CullFrustumTest 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
- Specified by:
testPlaneXZin interfaceCullFrustum- 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
public boolean testLineSegment(double aX, double aY, double aZ, double bX, double bY, double bZ) Description copied from interface:CullFrustumTest 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.- Specified by:
testLineSegmentin interfaceCullFrustum- 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
public org.joml.Vector4fc[] getPlanes()- Specified by:
getPlanesin interfaceCullFrustum- Returns:
- The data for each plane in the frustum
-
getPosition
public org.joml.Vector3dc getPosition()- Specified by:
getPositionin interfaceCullFrustum- Returns:
- The position of the camera
-
getModelViewProjectionMatrix
public org.joml.Matrix4fc getModelViewProjectionMatrix()- Specified by:
getModelViewProjectionMatrixin interfaceCullFrustum- Returns:
- The matrix used to create this frustum
-
getViewVector
public org.joml.Vector3fc getViewVector()- Specified by:
getViewVectorin interfaceCullFrustum- Returns:
- The direction of the camera frustum
-
toFrustum
public net.minecraft.client.renderer.culling.Frustum toFrustum()- Specified by:
toFrustumin interfaceCullFrustum- Returns:
- This cull frustum as a vanilla mc
Frustum
-