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
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 Summary
Modifier and TypeMethodDescriptionbooleanChecks if a point is contained within this boundary.Computes the convex hull of this boundary.Computes the boundary measure (perimeter/surface area).Returns the bounding box of this boundary.Returns the centroid of this boundary.intReturns the dimensionality of this boundary.Computes the measure (length/area/volume) of this boundary.intersection(Boundary<P> other) Computes the intersection of this boundary with another.booleanintersects(Boundary<P> other) Checks if this boundary intersects with another.booleanisEmpty()Checks if this boundary is empty.Creates a scaled copy of this boundary.Creates a copy of this boundary translated by a vector.Computes the union of this boundary with another.
-
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
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
-
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
-
union
-
intersection
-
convexHull
-
translate
-
scale
-