Class AbstractRectangularShape1d<IT extends AbstractRectangularShape1d<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d1.d.AbstractShape1d<IT>
-
- org.arakhne.afc.math.geometry.d1.d.AbstractRectangularShape1d<IT>
-
- Type Parameters:
IT- is the type of the implementation of this shape.
- All Implemented Interfaces:
Serializable,Cloneable,RectangularShape1afp<Shape1d<?>,IT,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>,Shape1afp<Shape1d<?>,IT,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>,Shape1d<IT>,Shape1D<Shape1d<?>,IT,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>,JsonableObject
public abstract class AbstractRectangularShape1d<IT extends AbstractRectangularShape1d<?>> extends AbstractShape1d<IT> implements RectangularShape1afp<Shape1d<?>,IT,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>
Abstract rectangular shape with 2 double precision floating-point numbers.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:43
- Author:
- Stéphane GALLAND
- See Also:
- Serialized Form
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathgeom
-
-
Constructor Summary
Constructors Constructor Description AbstractRectangularShape1d()Construct an empty shape.AbstractRectangularShape1d(RectangularShape1afp<?,?,?,?,?,?> rect)Constructor by copy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetMaxX()Replies the max x.doublegetMaxY()Replies the max y.doublegetMinX()Replies the min X.doublegetMinY()Replies the min y.inthashCode()voidsetFromCorners(double x1, double y1, double x2, double y2)Change the frame of the rectangle conserving previous min and max if needed.voidsetMaxX(double x)Set the max X conserving previous max if needed.voidsetMaxY(double y)Set the max Y conserving previous max if needed.voidsetMinX(double x)Set the min X conserving previous min if needed.voidsetMinY(double y)Set the min Y conserving previous min if needed.-
Methods inherited from class org.arakhne.afc.math.geometry.d1.d.AbstractShape1d
clone, equals, getGeomFactory, getSegment, setSegment, toJson, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.vmutil.json.JsonableObject
toJson
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.afp.RectangularShape1afp
clear, getCenter, getCenterX, getCenterY, getHeight, getWidth, inflate, isEmpty, set, set, set, setFromCenter, setFromCenter, setFromCorners, setHeight, setWidth, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.afp.Shape1afp
contains, contains, contains, contains, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getGeomFactory, intersects, intersects, toBoundingBox, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d1.Shape1D
clone, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getSegment, operator_add, operator_and, operator_and, operator_minus, operator_plus, operator_remove, operator_upTo, setSegment
-
-
-
-
Constructor Detail
-
AbstractRectangularShape1d
public AbstractRectangularShape1d()
Construct an empty shape.
-
AbstractRectangularShape1d
public AbstractRectangularShape1d(RectangularShape1afp<?,?,?,?,?,?> rect)
Constructor by copy.- Parameters:
rect- the rectangular shape to copy.
-
-
Method Detail
-
setFromCorners
public void setFromCorners(double x1, double y1, double x2, double y2)Description copied from interface:RectangularShape1afpChange the frame of the rectangle conserving previous min and max if needed.- Specified by:
setFromCornersin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
x1- is the coordinate of the first corner.y1- is the coordinate of the first corner.x2- is the coordinate of the second corner.y2- is the coordinate of the second corner.
-
getMinX
@Pure public double getMinX()
Description copied from interface:RectangularShape1afpReplies the min X.- Specified by:
getMinXin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Returns:
- the min x.
-
setMinX
public void setMinX(double x)
Description copied from interface:RectangularShape1afpSet the min X conserving previous min if needed.- Specified by:
setMinXin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
x- the min x.
-
getMaxX
@Pure public double getMaxX()
Description copied from interface:RectangularShape1afpReplies the max x.- Specified by:
getMaxXin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Returns:
- the max x.
-
setMaxX
public void setMaxX(double x)
Description copied from interface:RectangularShape1afpSet the max X conserving previous max if needed.- Specified by:
setMaxXin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
x- the max x.
-
getMinY
@Pure public double getMinY()
Description copied from interface:RectangularShape1afpReplies the min y.- Specified by:
getMinYin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Returns:
- the min y.
-
setMinY
public void setMinY(double y)
Description copied from interface:RectangularShape1afpSet the min Y conserving previous min if needed.- Specified by:
setMinYin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
y- the min y.
-
getMaxY
@Pure public double getMaxY()
Description copied from interface:RectangularShape1afpReplies the max y.- Specified by:
getMaxYin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Returns:
- the max y.
-
setMaxY
public void setMaxY(double y)
Description copied from interface:RectangularShape1afpSet the max Y conserving previous max if needed.- Specified by:
setMaxYin interfaceRectangularShape1afp<Shape1d<?>,IT extends AbstractRectangularShape1d<?>,Point1d,Vector1d,Segment1D<?,?>,Rectangle1d>- Parameters:
y- the max y.
-
hashCode
@Pure public int hashCode()
- Specified by:
hashCodein classAbstractShape1d<IT extends AbstractRectangularShape1d<?>>
-
-