Package georegression.struct.shapes
Class RectangleLength2D_F32
java.lang.Object
georegression.struct.shapes.RectangleLength2D_F32
- All Implemented Interfaces:
Serializable
@Generated("georegression.struct.shapes.RectangleLength2D_F64")
public class RectangleLength2D_F32
extends Object
implements Serializable
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,y0), (x0,y0 + height), (x0 + width,y0 + height).
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetCorner
(int index, @Nullable Point2D_F32 corner) Provides access to corners in the order specified below.float
getX()
float
getY()
void
setLowerExtent
(float x, float y) Sets lower extentsetTo
(float x0, float y0, float width, float height) Sets this rectangle to be equal to the passed in rectangle.toString()
void
zero()
Sets the value of all fields to zero
-
Field Details
-
x0
public float x0Lower extent x-axis -
y0
public float y0Lower extent y-axis -
width
public float widthRectangle's width -
height
public float heightRectangle's height
-
-
Constructor Details
-
RectangleLength2D_F32
public RectangleLength2D_F32() -
RectangleLength2D_F32
public RectangleLength2D_F32(float x0, float y0, float width, float height)
-
-
Method Details
-
setTo
-
setTo
-
setLowerExtent
public void setLowerExtent(float x, float y) Sets lower extent- Parameters:
x
- x-coordinatey
- y-coordinate
-
getCorner
Provides access to corners in the order specified below.[0] = (x0, y0) [1] = (x0 + w, y0) [2] = (x0 + w, y0 + h) [3] = (x0, y0 + h)
where w = width, and h = height.- Parameters:
index
- Which cornercorner
- (Optional) storage for the corner- Returns:
- The corner
-
setTo
Sets this rectangle to be equal to the passed in rectangle.- Parameters:
r
- Rectangle which this is to be set equal to
-
zero
public void zero()Sets the value of all fields to zero -
getX
public float getX() -
getY
public float getY() -
toString
-