Package engine.util
Class Rect
java.lang.Object
engine.util.Point
engine.util.Rect
- All Implemented Interfaces:
Comparable<Object>
THIS CLASS IS JUST A CONTAINER WITH SOME HELPER FUNCTIONS
- Author:
- Nico L. (MrDuckyTesla)
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleandisplayRect(processing.core.PApplet app) booleandisplayRect(processing.core.PApplet app, float s) booleandisplayRect(processing.core.PApplet app, int[] color) booleanget()floatgetArea()getCorner(boolean topSide, boolean rightSide) Point[]floatgetH()floatgetPoint()floatgetW()float[]getXYWH()private voidinstantiate(float w, float h) voidinteract()booleanisBLInside(Rect other) booleanisBRInside(Rect other) booleanbooleanbooleanisTLInside(Rect other) booleanisTRInside(Rect other) toString()
-
Field Details
-
w
private float w -
h
private float h
-
-
Constructor Details
-
Rect
public Rect() -
Rect
-
Rect
public Rect(float x, float y) -
Rect
-
Rect
-
Rect
public Rect(float x, float y, float w, float h)
-
-
Method Details
-
isTLInside
-
isTRInside
-
isBRInside
-
isBLInside
-
isInside
-
instantiate
private void instantiate(float w, float h) -
interact
public void interact() -
isCollide
-
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
-
getCorner
-
getCorners
-
get
-
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classPoint
-