Package georegression.struct.shapes
Class RectangleLength2D_I32
java.lang.Object
georegression.struct.shapes.RectangleLength2D_I32
- All Implemented Interfaces:
Serializable,MapFormattable
An axis aligned rectangle in 2D that is specified by its lower extent (x0,y0), width, and height. The three
other corners are
(x0 + width-1,y0), (x0,y0 + height-1), (x0 + width-1,y0 + height-1).- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionformatMap(MapPrintFormat format) intgetX()intgetY()voidsetLowerExtent(int x, int y) Sets lower extentsetTo(int tl_x, int tl_y, int width, int height) Sets this rectangle to be equal to the passed in rectangle.toString()voidzero()Sets the value of all fields to zeroMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ejml.MapFormattable
formatMap
-
Field Details
-
x0
public int x0Lower extent x-axis -
y0
public int y0Lower extent y-axis -
width
public int widthRectangle's width -
height
public int heightRectangle's height
-
-
Constructor Details
-
RectangleLength2D_I32
public RectangleLength2D_I32() -
RectangleLength2D_I32
public RectangleLength2D_I32(int x0, int y0, int width, int height)
-
-
Method Details
-
setTo
-
zero
public void zero()Sets the value of all fields to zero -
setLowerExtent
public void setLowerExtent(int x, int y) Sets lower extent- Parameters:
x- x-coordinatey- y-coordinate
-
setTo
Sets this rectangle to be equal to the passed in rectangle.- Parameters:
r- Rectangle which this is to be set equal to
-
getX
public int getX() -
getY
public int getY() -
formatMap
- Specified by:
formatMapin interfaceMapFormattable
-
toString
-