georegression.struct.shapes
Class Rectangle2D_F32
- java.lang.Object
-
- georegression.struct.shapes.Rectangle2D_F32
-
- All Implemented Interfaces:
- java.io.Serializable
public class Rectangle2D_F32 extends java.lang.Object implements java.io.SerializableAn axis aligned rectangle in 2D that is specified by its lower-extent p0, and upper-extent p1.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description Point2D_F32p0Lower extentPoint2D_F32p1Upper extent
-
Constructor Summary
Constructors Constructor and Description Rectangle2D_F32()Rectangle2D_F32(float x0, float y0, float x1, float y1)Rectangle2D_F32(Rectangle2D_F32 orig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description floatarea()voidenforceExtents()Makes sure x0,y0 is the lower extent and x1,y1 is the upper extentfloatgetHeight()Point2D_F32getP0()Point2D_F32getP1()floatgetWidth()voidset(float x0, float y0, float x1, float y1)voidset(Rectangle2D_F32 orig)voidsetP0(Point2D_F32 p0)voidsetP1(Point2D_F32 p1)java.lang.StringtoString()
-
-
-
Field Detail
-
p0
public Point2D_F32 p0
Lower extent
-
p1
public Point2D_F32 p1
Upper extent
-
-
Constructor Detail
-
Rectangle2D_F32
public Rectangle2D_F32(float x0, float y0, float x1, float y1)
-
Rectangle2D_F32
public Rectangle2D_F32(Rectangle2D_F32 orig)
-
Rectangle2D_F32
public Rectangle2D_F32()
-
-
Method Detail
-
set
public void set(Rectangle2D_F32 orig)
-
set
public void set(float x0, float y0, float x1, float y1)
-
enforceExtents
public void enforceExtents()
Makes sure x0,y0 is the lower extent and x1,y1 is the upper extent
-
getWidth
public float getWidth()
-
getHeight
public float getHeight()
-
area
public float area()
-
getP0
public Point2D_F32 getP0()
-
setP0
public void setP0(Point2D_F32 p0)
-
getP1
public Point2D_F32 getP1()
-
setP1
public void setP1(Point2D_F32 p1)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG