Interface CullFrustum

All Known Implementing Classes:
FrustumMixin

public interface CullFrustum
  • Method Summary

    Modifier and Type
    Method
    Description
    org.joml.Matrix4fc
     
    org.joml.Vector4fc[]
     
    org.joml.Vector3dc
     
    org.joml.Vector3fc
     
    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 by this frustum culler.
    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 by this frustum culler.
    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 by this frustum culler.
    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 by this frustum culler.
    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 by this frustum culler.
    default boolean
    testLineSegment(org.joml.Vector3dc a, org.joml.Vector3dc b)
    Test whether the given line segment, defined by the end points a and b, is partly or completely within the frustum defined by this frustum culler.
    default boolean
    testLineSegment(org.joml.Vector3fc a, org.joml.Vector3fc b)
    Test whether the given line segment, defined by the end points a and b, is partly or completely within the frustum defined by this frustum culler.
    boolean
    testPlaneXY(double minX, double minY, double maxX, double maxY)
    Test whether the given XY-plane (at Z = 0) is partly or completely within or outside of the frustum defined by this frustum culler.
    default boolean
    testPlaneXY(org.joml.Vector2dc min, org.joml.Vector2dc max)
    Test whether the given XY-plane (at Z = 0) is partly or completely within or outside of the frustum defined by this frustum culler.
    default boolean
    testPlaneXY(org.joml.Vector2fc min, org.joml.Vector2fc max)
    Test whether the given XY-plane (at Z = 0) is partly or completely within or outside of the frustum defined by this frustum culler.
    boolean
    testPlaneXZ(double minX, float minZ, float maxX, float maxZ)
    Test whether the given XZ-plane (at Y = 0) is partly or completely within or outside of the frustum defined by this frustum culler.
    boolean
    testPoint(double x, double y, double z)
    Test whether the given point (x, y, z) is within the frustum defined by this frustum culler.
    default boolean
    testPoint(net.minecraft.world.phys.Vec3 point)
    Test whether the given point is within the frustum defined by this frustum culler.
    default boolean
    testPoint(org.joml.Vector3dc point)
    Test whether the given point is within the frustum defined by this frustum culler.
    default boolean
    testPoint(org.joml.Vector3fc point)
    Test whether the given point is within the frustum defined by this frustum culler.
    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 by this frustum culler.
    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 by this frustum culler.
    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 by this frustum culler.
  • Method Details

    • testPoint

      default boolean testPoint(org.joml.Vector3fc point)
      Test whether the given point is within the frustum defined by this frustum culler.
      Parameters:
      point - the point to test
      Returns:
      true if the given point is inside the frustum; false otherwise
    • testPoint

      default boolean testPoint(org.joml.Vector3dc point)
      Test whether the given point is within the frustum defined by this frustum culler.
      Parameters:
      point - the point to test
      Returns:
      true if the given point is inside the frustum; false otherwise
    • testPoint

      default boolean testPoint(net.minecraft.world.phys.Vec3 point)
      Test whether the given point is within the frustum defined by this frustum culler.
      Parameters:
      point - the point to test
      Returns:
      true if the given point is inside the frustum; false otherwise
    • testPoint

      boolean testPoint(double x, double y, double z)
      Test whether the given point (x, y, z) is within the frustum defined by this frustum culler.
      Parameters:
      x - the x-coordinate of the point
      y - the y-coordinate of the point
      z - the z-coordinate of the point
      Returns:
      true if the given point is inside the frustum; false otherwise
    • 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 by this frustum culler.

      The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns true for spheres that do not intersect the frustum. See iquilezles.org for an examination of this problem.

      Parameters:
      center - the sphere's center
      radius - the sphere's radius
      Returns:
      true if the given sphere is partly or completely inside the frustum; false otherwise
    • 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 by this frustum culler.

      The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns true for spheres that do not intersect the frustum. See iquilezles.org for an examination of this problem.

      Parameters:
      center - the sphere's center
      radius - the sphere's radius
      Returns:
      true if the given sphere is partly or completely inside the frustum; false otherwise
    • 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 by this frustum culler.

      The algorithm implemented by this method is conservative. This means that in certain circumstances a false positive can occur, when the method returns true for 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 center
      y - the y-coordinate of the sphere's center
      z - the z-coordinate of the sphere's center
      r - the sphere's radius
      Returns:
      true if the given sphere is partly or completely inside the frustum; false otherwise
    • 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 by this frustum 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 true for boxes that do not intersect the frustum. See iquilezles.org for an examination of this problem.

      Parameters:
      aabb - the axis-aligned box
      Returns:
      true if the axis-aligned box is completely or partly inside of the frustum; false otherwise
    • 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 by this frustum 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 true for 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 box
      max - the maximum corner coordinates of the axis-aligned box
      Returns:
      true if the axis-aligned box is completely or partly inside of the frustum; false otherwise
    • 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 by this frustum 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 true for 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 box
      max - the maximum corner coordinates of the axis-aligned box
      Returns:
      true if the axis-aligned box is completely or partly inside of the frustum; false otherwise
    • 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 by this frustum 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 true for 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 corner
      minY - the y-coordinate of the minimum corner
      minZ - the z-coordinate of the minimum corner
      maxX - the x-coordinate of the maximum corner
      maxY - the y-coordinate of the maximum corner
      maxZ - the z-coordinate of the maximum corner
      Returns:
      true if the axis-aligned box is completely or partly inside of the frustum; false otherwise
    • testPlaneXY

      default boolean testPlaneXY(org.joml.Vector2dc min, org.joml.Vector2dc max)
      Test whether the given XY-plane (at Z = 0) is partly or completely within or outside of the frustum defined by this frustum 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 true for 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-plane
      max - the maximum corner coordinates of the XY-plane
      Returns:
      true if the XY-plane is completely or partly inside of the frustum; false otherwise
    • testPlaneXY

      default boolean testPlaneXY(org.joml.Vector2fc min, org.joml.Vector2fc max)
      Test whether the given XY-plane (at Z = 0) is partly or completely within or outside of the frustum defined by this frustum 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 true for 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-plane
      max - the maximum corner coordinates of the XY-plane
      Returns:
      true if the XY-plane is completely or partly inside of the frustum; false otherwise
    • testPlaneXY

      boolean testPlaneXY(double minX, double minY, double maxX, double maxY)
      Test whether the given XY-plane (at Z = 0) is partly or completely within or outside of the frustum defined by this frustum 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 true for 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 corner
      minY - the y-coordinate of the minimum corner
      maxX - the x-coordinate of the maximum corner
      maxY - the y-coordinate of the maximum corner
      Returns:
      true if the XY-plane is completely or partly inside of the frustum; false otherwise
    • testPlaneXZ

      boolean testPlaneXZ(double minX, float minZ, float maxX, float maxZ)
      Test whether the given XZ-plane (at Y = 0) is partly or completely within or outside of the frustum defined by this frustum 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 true for 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 corner
      minZ - the z-coordinate of the minimum corner
      maxX - the x-coordinate of the maximum corner
      maxZ - the z-coordinate of the maximum corner
      Returns:
      true if the XZ-plane is completely or partly inside of the frustum; false otherwise
    • testLineSegment

      default boolean testLineSegment(org.joml.Vector3dc a, org.joml.Vector3dc b)
      Test whether the given line segment, defined by the end points a and b, is partly or completely within the frustum defined by this frustum culler.
      Parameters:
      a - the line segment's first end point
      b - the line segment's second end point
      Returns:
      true if the given line segment is partly or completely inside the frustum; false otherwise
    • testLineSegment

      default boolean testLineSegment(org.joml.Vector3fc a, org.joml.Vector3fc b)
      Test whether the given line segment, defined by the end points a and b, is partly or completely within the frustum defined by this frustum culler.
      Parameters:
      a - the line segment's first end point
      b - the line segment's second end point
      Returns:
      true if the given line segment is partly or completely inside the frustum; false otherwise
    • 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 by this frustum culler.
      Parameters:
      aX - the x coordinate of the line segment's first end point
      aY - the y coordinate of the line segment's first end point
      aZ - the z coordinate of the line segment's first end point
      bX - the x coordinate of the line segment's second end point
      bY - the y coordinate of the line segment's second end point
      bZ - the z coordinate of the line segment's second end point
      Returns:
      true if the given line segment is partly or completely inside the frustum; false otherwise
    • 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