Class InvertedAABBox2D

  • All Implemented Interfaces:
    IRender

    public class InvertedAABBox2D
    extends java.lang.Object
    implements IRender
    AABB stands for Axis-aligned Bounding Box. It is a fairly computationally- and memory-efficient way of representing a volume, typically used to see if two objects might be touching.
    Author:
    kong
    • Method Detail

      • valueOf

        public static InvertedAABBox2D valueOf​(float left,
                                               float top,
                                               float right,
                                               float bottom)
      • isOverlappedWith

        public boolean isOverlappedWith​(InvertedAABBox2D other)
        Parameters:
        other - the other BBox, see InvertedAABBox2D
        Returns:
        true if the BBox described by other intersects with this one
      • getTop

        public float getTop()
      • setTop

        public void setTop​(float top)
      • getLeft

        public float getLeft()
      • setLeft

        public void setLeft​(float left)
      • getBottom

        public float getBottom()
      • setBottom

        public void setBottom​(float bottom)
      • getRight

        public float getRight()
      • setRight

        public void setRight​(float right)
      • render

        public void render​(Paint paint)
        Description copied from interface: IRender
        To render objects to screen
        Specified by:
        render in interface IRender
        Parameters:
        paint - see Paint