Class AABB


  • public class AABB
    extends java.lang.Object
    Axis Aligned Bounding Box class
    • Constructor Detail

      • AABB

        public AABB​(long cPtr,
                    boolean cMemoryOwn)
      • AABB

        public AABB()
        constructor
      • AABB

        public AABB​(Vector3D corner1,
                    Vector3D corner2)
        Construct an AABB by defining the two oposit corners
        Parameters:
        corner1 - [in] the first corner
        corner2 - [in] the second corner
    • Method Detail

      • getCPtr

        public static long getCPtr​(AABB obj)
      • delete

        public void delete()
      • setHalfLengths

        public void setHalfLengths​(Vector3D pos)
        set half lengths
      • getHalfLengths

        public Vector3D getHalfLengths()
        get halflengths of this box
      • setPosition

        public void setPosition​(Vector3D pos)
        set position
      • getPosition

        public Vector3D getPosition()
        position of this AABB
      • calcVolume

        public double calcVolume()
        calculate the volume of this OBB
      • calcArea

        public double calcArea()
        calculates the total area of the box
      • diagonal

        public Vector3D diagonal()
        returns the diagonal of the box
        Returns:
        Vector3D<double>