Package engine.util

Class Rect

All Implemented Interfaces:
Comparable<Object>

public class Rect extends Point
THIS CLASS IS JUST A CONTAINER WITH SOME HELPER FUNCTIONS
Author:
Nico L. (MrDuckyTesla)
See Also:
  • Field Details

    • w

      private float w
    • h

      private float h
  • Constructor Details

    • Rect

      public Rect()
    • Rect

      public Rect(Point p)
    • Rect

      public Rect(float x, float y)
    • Rect

      public Rect(Point p, Point q)
    • Rect

      public Rect(Point p, float w, float h)
    • Rect

      public Rect(float x, float y, float w, float h)
  • Method Details

    • isTLInside

      public boolean isTLInside(Rect other)
    • isTRInside

      public boolean isTRInside(Rect other)
    • isBRInside

      public boolean isBRInside(Rect other)
    • isBLInside

      public boolean isBLInside(Rect other)
    • isInside

      public boolean isInside(Rect other)
    • instantiate

      private void instantiate(float w, float h)
    • interact

      public void interact()
    • isCollide

      public boolean isCollide(Rect o)
    • displayRect

      public boolean displayRect(processing.core.PApplet app, float s)
    • displayRect

      public boolean displayRect(processing.core.PApplet app)
    • displayRect

      public boolean displayRect(processing.core.PApplet app, int[] color)
    • getW

      public float getW()
    • getH

      public float getH()
    • getXYWH

      public float[] getXYWH()
    • getArea

      public float getArea()
    • getPerimeter

      public float getPerimeter()
    • getPoint

      public Point getPoint()
    • getCorner

      public Point getCorner(boolean topSide, boolean rightSide)
    • getCorners

      public Point[] getCorners()
    • get

      public Rect get()
      Overrides:
      get in class Point
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Point
    • toString

      public String toString()
      Overrides:
      toString in class Point
    • compareTo

      public int compareTo(Object o)
      Specified by:
      compareTo in interface Comparable<Object>
      Overrides:
      compareTo in class Point