Interface Boundary<P>

Type Parameters:
P - the point type used for this boundary
All Superinterfaces:
Serializable
All Known Subinterfaces:
Boundary2D, Boundary3D
All Known Implementing Classes:
CompositeBoundary, CompositeBoundary2D, CompositeBoundary3D, ConvexPolygon2D, ConvexPolyhedron3D, FuzzyBoundary2D, GeoPath, GeoPath.SimpleGeoPath, GeoPolygon, GeoPolygon.SimpleGeoPolygon, PointBoundary, Road

public interface Boundary<P> extends Serializable
Base interface for all geometric boundaries.

A boundary represents a closed region in N-dimensional space. This interface defines common operations for containment testing, area/volume calculation, and boundary manipulation.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Method Details

    • getDimension

      int getDimension()
      Returns the dimensionality of this boundary.
      Returns:
      0 for point, 1 for line, 2 for polygon, 3 for polyhedron
    • contains

      boolean contains(P point)
      Checks if a point is contained within this boundary.
      Parameters:
      point - the point to test
      Returns:
      true if point is inside or on the boundary
    • isEmpty

      boolean isEmpty()
      Checks if this boundary is empty.
      Returns:
      true if the boundary has no extent
    • getCentroid

      P getCentroid()
      Returns the centroid of this boundary.
      Returns:
      the geometric center
    • getBoundingBox

      BoundingBox<P> getBoundingBox()
      Returns the bounding box of this boundary.
      Returns:
      an axis-aligned bounding box
    • getMeasure

      Real getMeasure()
      Computes the measure (length/area/volume) of this boundary. For 2D: area, for 3D: volume, for 1D: length.
      Returns:
      the measure as a Real value
    • getBoundaryMeasure

      Real getBoundaryMeasure()
      Computes the boundary measure (perimeter/surface area). For 2D: perimeter, for 3D: surface area.
      Returns:
      the boundary measure
    • intersects

      boolean intersects(Boundary<P> other)
      Checks if this boundary intersects with another.
      Parameters:
      other - the other boundary
      Returns:
      true if boundaries intersect
    • union

      Boundary<P> union(Boundary<P> other)
      Computes the union of this boundary with another.
      Parameters:
      other - the other boundary
      Returns:
      the union boundary
    • intersection

      Boundary<P> intersection(Boundary<P> other)
      Computes the intersection of this boundary with another.
      Parameters:
      other - the other boundary
      Returns:
      the intersection boundary
    • convexHull

      Boundary<P> convexHull()
      Computes the convex hull of this boundary.
      Returns:
      the convex hull
    • translate

      Boundary<P> translate(P offset)
      Creates a copy of this boundary translated by a vector.
      Parameters:
      offset - the translation vector (as point)
      Returns:
      translated boundary
    • scale

      Boundary<P> scale(Real factor)
      Creates a scaled copy of this boundary.
      Parameters:
      factor - the scaling factor
      Returns:
      scaled boundary