Interface ExtendableConvexPolygon

  • All Implemented Interfaces:
    it.unibo.alchemist.model.geometry.AwtShapeCompatible , it.unibo.alchemist.model.geometry.ConvexPolygon , it.unibo.alchemist.model.geometry.ConvexShape , it.unibo.alchemist.model.geometry.MutableConvexPolygon , it.unibo.alchemist.model.geometry.Shape , java.io.Serializable

    
    public interface ExtendableConvexPolygon
     implements MutableConvexPolygon
                        

    A sophisticated MutableConvexPolygon.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Boolean advanceEdge(Integer index, Double step) Advances an edge in its normal direction.
      abstract Boolean extend(Double step) Extends the polygon in each direction: each edge is given a chance to advance.
      • Methods inherited from class it.unibo.alchemist.model.geometry.MutableConvexPolygon

        addVertex, moveVertex, removeVertex, replaceEdge
      • Methods inherited from class it.unibo.alchemist.model.geometry.ConvexPolygon

        closestEdgeTo, contains, contains, containsBoundaryExcluded, containsBoundaryIncluded, edges, getEdge, intersects, intersects, isAdjacentTo, liesOnBoundary, vertices
      • Methods inherited from class it.unibo.alchemist.model.geometry.Shape

        getCentroid, getDiameter, getRadius, intersects, transformed
      • Methods inherited from class it.unibo.alchemist.model.geometry.AwtShapeCompatible

        asAwtShape
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.