Class Box

java.lang.Object
ac.boar.anticheat.util.math.Box
All Implemented Interfaces:
Cloneable

public class Box extends Object implements Cloneable
  • Field Details

    • EMPTY

      public static final Box EMPTY
    • minX

      public final float minX
    • minY

      public final float minY
    • minZ

      public final float minZ
    • maxX

      public final float maxX
    • maxY

      public final float maxY
    • maxZ

      public final float maxZ
  • Constructor Details

    • Box

      public Box(float x1, float y1, float z1, float x2, float y2, float z2)
  • Method Details

    • toVec3f

      public Vec3 toVec3f(float width)
    • of

      public static Box of(Vec3 center, float dx, float dy, float dz)
    • equals

      public boolean equals(Box box)
    • chooseMin

      public float chooseMin(Axis axis)
    • chooseMax

      public float chooseMax(Axis axis)
    • isOverlapped

      public boolean isOverlapped(Axis axis, Box other)
    • calculateMaxDistance

      public float calculateMaxDistance(Axis axis, Box other, float maxDist)
    • clip

      public Optional<Vec3> clip(Vec3 from, Vec3 to)
    • clip

      public static Optional<Vec3> clip(float d, float e, float f, float g, float h, float i, Vec3 vec3, Vec3 vec32)
    • withMinX

      public Box withMinX(float minX)
    • withMinY

      public Box withMinY(float minY)
    • withMinZ

      public Box withMinZ(float minZ)
    • withMaxX

      public Box withMaxX(float maxX)
    • withMaxY

      public Box withMaxY(float maxY)
    • withMaxZ

      public Box withMaxZ(float maxZ)
    • shrink

      public Box shrink(float x, float y, float z)
    • stretch

      public Box stretch(Vec3 scale)
    • stretch

      public Box stretch(float x, float y, float z)
    • expand

      public Box expand(float x, float y, float z)
    • expand

      public Box expand(float value)
    • intersection

      public Box intersection(Box Box)
    • union

      public Box union(Box Box)
    • offset

      public Box offset(float x, float y, float z)
    • offset

      public Box offset(Vec3 vec)
    • intersects

      public boolean intersects(Box Box)
    • intersects

      public boolean intersects(float minX, float minY, float minZ, float maxX, float maxY, float maxZ)
    • intersects

      public boolean intersects(Vec3 pos1, Vec3 pos2)
    • contains

      public boolean contains(Vec3 pos)
    • contains

      public boolean contains(float x, float y, float z)
    • contract

      public Box contract(float x, float y, float z)
    • contract

      public Box contract(float value)
    • getMinPos

      public Vec3 getMinPos()
    • getMaxPos

      public Vec3 getMaxPos()
    • getAverageSideLength

      public float getAverageSideLength()
    • getLengthX

      public float getLengthX()
    • getLengthY

      public float getLengthY()
    • getLengthZ

      public float getLengthZ()
    • isNaN

      public boolean isNaN()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • clone

      public Box clone()
      Overrides:
      clone in class Object