Interface MutableConvexPolygon

  • 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.Shape , java.io.Serializable

    
    public interface MutableConvexPolygon
     implements ConvexPolygon
                        

    A mutable ConvexPolygon.

    • 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 addVertex(Integer index, Double x, Double y) Adds a vertex to the polygon.
      abstract Boolean removeVertex(Integer index) Removes a vertex from the polygon.
      abstract Boolean moveVertex(Integer index, Double newX, Double newY) Moves a vertex of the polygon to a new absolute position.
      abstract Boolean replaceEdge(Integer index, Segment2D<Euclidean2DPosition> newEdge) Replaces an edge of the polygon.
      • 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

      • addVertex

         abstract Boolean addVertex(Integer index, Double x, Double y)

        Adds a vertex to the polygon.

        Parameters:
        index - the index in the list of vertices where to put the new vertex
        x - x coordinate
        y - y coordinate
      • removeVertex

         abstract Boolean removeVertex(Integer index)

        Removes a vertex from the polygon.

        Parameters:
        index - the index of the vertex to be removed in the list of vertices
      • moveVertex

         abstract Boolean moveVertex(Integer index, Double newX, Double newY)

        Moves a vertex of the polygon to a new absolute position.

        Parameters:
        index - the index of the vertex to move
        newX - new absolute x coordinate
        newY - new absolute y coordinate