-
- All Implemented Interfaces:
-
it.unibo.alchemist.model.implementations.geometry.AwtShapeCompatible,it.unibo.alchemist.model.interfaces.geometry.ConvexGeometricShape,it.unibo.alchemist.model.interfaces.geometry.GeometricShape,it.unibo.alchemist.model.interfaces.geometry.euclidean2d.ConvexPolygon,it.unibo.alchemist.model.interfaces.geometry.euclidean2d.MutableConvexPolygon,java.io.Serializable
public interface ExtendableConvexPolygon implements MutableConvexPolygon
A sophisticated MutableConvexPolygon.
-
-
Method Summary
Modifier and Type Method Description abstract BooleanadvanceEdge(Integer index, Double step)Advances an edge in its normal direction. abstract Booleanextend(Double step)Extends the polygon in each direction: each edge is given a chance to advance. abstract Euclidean2DPositiongetCentroid()abstract DoublegetDiameter()DoublegetRadius()-
Methods inherited from class it.unibo.alchemist.model.interfaces.geometry.euclidean2d.navigator.ExtendableConvexPolygon
addVertex, moveVertex, removeVertex, replaceEdge -
Methods inherited from class it.unibo.alchemist.model.interfaces.geometry.euclidean2d.MutableConvexPolygon
closestEdgeTo, contains, contains, containsBoundaryExcluded, containsBoundaryIncluded, edges, getEdge, intersects, intersects, isAdjacentTo, liesOnBoundary, vertices -
Methods inherited from class it.unibo.alchemist.model.interfaces.geometry.ConvexGeometricShape
intersects, transformed -
Methods inherited from class it.unibo.alchemist.model.interfaces.geometry.euclidean2d.ConvexPolygon
asAwtShape -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
advanceEdge
abstract Boolean advanceEdge(Integer index, Double step)
Advances an edge in its normal direction.
- Parameters:
index- the index of the edge to advance (edge i connects vertices i and i+1)step- the length of the vector that will be used to advance the edge, negative values are supported and will shrink the polygon instead of extending it.
-
extend
abstract Boolean extend(Double step)
Extends the polygon in each direction: each edge is given a chance to advance.
- Parameters:
step- the length of the vector that will be used to advance each edge, negative values are supported and will shrink the polygon instead of extending it.
-
getCentroid
abstract Euclidean2DPosition getCentroid()
-
getDiameter
abstract Double getDiameter()
-
-
-
-