Package eu.svjatoslav.sixth.e3d.geometry
Class Rectangle
java.lang.Object
eu.svjatoslav.sixth.e3d.geometry.Rectangle
Rectangle class.
-
Field Summary
-
Constructor Summary
-
Method Summary
-
Field Details
-
p1
Rectangle points. -
p2
Rectangle points.
-
-
Constructor Details
-
Rectangle
public Rectangle(double size) Creates new rectangle with given size. The rectangle will be centered at the origin. The rectangle will be square.- Parameters:
size
- The size of the rectangle.
-
Rectangle
- Parameters:
p1
- The first point of the rectangle.p2
- The second point of the rectangle.
-
-
Method Details
-
getHeight
public double getHeight() -
getLowerX
public double getLowerX()- Returns:
- The leftmost x coordinate of the rectangle.
-
getLowerY
public double getLowerY() -
getWidth
public double getWidth()- Returns:
- rectangle width.
-