Class AbstractShape2d<T extends AbstractShape2d<?>>
- java.lang.Object
-
- org.arakhne.afc.math.geometry.d2.d.AbstractShape2d<T>
-
- Type Parameters:
T- the type of the shape.
- All Implemented Interfaces:
Serializable,Cloneable,Shape2afp<Shape2d<?>,T,PathElement2d,Point2d,Vector2d,Rectangle2d>,Shape2d<T>,Shape2D<Shape2d<?>,T,PathIterator2afp<PathElement2d>,Point2d,Vector2d,Rectangle2d>,JsonableObject
- Direct Known Subclasses:
AbstractRectangularShape2d,Circle2d,MultiShape2d,OrientedRectangle2d,Parallelogram2d,Path2d,Rectangle2d,Segment2d,SegmentPoint2d,Triangle2d
public abstract class AbstractShape2d<T extends AbstractShape2d<?>> extends Object implements Shape2d<T>
Abstract 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 AbstractShape2d()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddShapeGeometryChangeListener(ShapeGeometryChangeListener listener)Add listener on geometry changes.Tclone()Clone this shape.booleanequals(Object obj)protected voidfireGeometryChange()Notify any listener of a geometry change.GeomFactory2dgetGeomFactory()Replies the geometry factory associated to this point.abstract inthashCode()protected voidremoveShapeGeometryChangeListener(ShapeGeometryChangeListener listener)Remove listener on geometry changes.voidtoJson(JsonBuffer buffer)Replies the Json representation of this node.StringtoString()-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.afp.Shape2afp
contains, contains, contains, contains, createTransformedShape, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getClosestPointTo, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, getDistanceSquared, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, intersects, toBoundingBox, translate, translate
-
Methods inherited from interface org.arakhne.afc.math.geometry.d2.Shape2D
clear, equalsToPathIterator, equalsToShape, getClosestPointTo, getDistance, getDistance, getDistanceL1, getDistanceLinf, getDistanceSquared, getFarthestPointTo, getPathIterator, getPathIterator, isEmpty, operator_add, operator_and, operator_and, operator_minus, operator_multiply, operator_plus, operator_remove, operator_upTo, set, toBoundingBox
-
-
-
-
Method Detail
-
addShapeGeometryChangeListener
protected void addShapeGeometryChangeListener(ShapeGeometryChangeListener listener)
Add listener on geometry changes.- Parameters:
listener- the listener.
-
removeShapeGeometryChangeListener
protected void removeShapeGeometryChangeListener(ShapeGeometryChangeListener listener)
Remove listener on geometry changes.- Parameters:
listener- the listener.
-
fireGeometryChange
protected void fireGeometryChange()
Notify any listener of a geometry change.
-
clone
public T clone()
Description copied from interface:Shape2DClone this shape.- Specified by:
clonein interfaceShape2D<Shape2d<?>,T extends AbstractShape2d<?>,PathIterator2afp<PathElement2d>,Point2d,Vector2d,Rectangle2d>- Overrides:
clonein classObject- Returns:
- the clone.
-
getGeomFactory
public final GeomFactory2d getGeomFactory()
Description copied from interface:Shape2DReplies the geometry factory associated to this point.- Specified by:
getGeomFactoryin interfaceShape2afp<Shape2d<?>,T extends AbstractShape2d<?>,PathElement2d,Point2d,Vector2d,Rectangle2d>- Specified by:
getGeomFactoryin interfaceShape2D<Shape2d<?>,T extends AbstractShape2d<?>,PathIterator2afp<PathElement2d>,Point2d,Vector2d,Rectangle2d>- Returns:
- the factory.
-
toJson
public void toJson(JsonBuffer buffer)
Description copied from interface:JsonableObjectReplies the Json representation of this node.- Specified by:
toJsonin interfaceJsonableObject- Parameters:
buffer- the Json buffer.
-
-