Interface Boundary2D

All Superinterfaces:
Boundary<Point2D>, Serializable
All Known Implementing Classes:
CompositeBoundary2D, ConvexPolygon2D, FuzzyBoundary2D

public interface Boundary2D extends Boundary<Point2D>
Interface for two-dimensional boundaries (regions in a plane).
Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getDimension

      default int getDimension()
      Description copied from interface: Boundary
      Returns the dimensionality of this boundary.
      Specified by:
      getDimension in interface Boundary<Point2D>
      Returns:
      0 for point, 1 for line, 2 for polygon, 3 for polyhedron
    • getVertices

      List<Point2D> getVertices()
      Returns the vertices of this boundary in order.
      Returns:
      list of vertices
    • getVertexCount

      int getVertexCount()
      Returns the number of vertices.
      Returns:
      vertex count
    • getVertex

      Point2D getVertex(int index)
      Returns a specific vertex.
      Parameters:
      index - the vertex index
      Returns:
      the vertex
    • getArea

      Real getArea()
      Returns the area of this 2D boundary.
      Returns:
      the area
    • getPerimeter

      Real getPerimeter()
      Returns the perimeter of this 2D boundary.
      Returns:
      the perimeter
    • getMeasure

      default Real getMeasure()
      Description copied from interface: Boundary
      Computes the measure (length/area/volume) of this boundary. For 2D: area, for 3D: volume, for 1D: length.
      Specified by:
      getMeasure in interface Boundary<Point2D>
      Returns:
      the measure as a Real value
    • getBoundaryMeasure

      default Real getBoundaryMeasure()
      Description copied from interface: Boundary
      Computes the boundary measure (perimeter/surface area). For 2D: perimeter, for 3D: surface area.
      Specified by:
      getBoundaryMeasure in interface Boundary<Point2D>
      Returns:
      the boundary measure
    • isConvex

      boolean isConvex()
      Checks if this boundary is convex.
      Returns:
      true if convex
    • rotate

      Boundary2D rotate(Real angleRadians)
      Rotates the boundary around the centroid.
      Parameters:
      angleRadians - rotation angle in radians
      Returns:
      rotated boundary
    • rotateAround

      Boundary2D rotateAround(Real angleRadians, Point2D pivot)
      Rotates around a specific pivot point.
      Parameters:
      angleRadians - rotation angle
      pivot - the pivot point
      Returns:
      rotated boundary
    • extrude

      Boundary3D extrude(Real height)
      Creates an extruded 3D boundary from this 2D boundary.
      Parameters:
      height - the extrusion height
      Returns:
      a 3D boundary