Segment
Bounded line segment between its endpoints.
A Composite wrapping the Dipole of its endpoints and forwarding its algebra accessors; toDipole is the bridge back to pure CGA, symmetric with Dipole.toSegment. Geometric answers against a Segment respect its bounds — the chord itself, not the infinite carrier — while answers against the wrapped blade stay total.
The endpoint constructors keep the RoundPoint instances they are given: start/end return exactly those objects, so composites built on shared vertices (Polygon's edges) share them by reference. Identity is blade-based: equals/hashCode compare the wrapped dipoles, rounded at the SCALE quantum and orientation-sensitive (canonical for unoriented equivalence).
Constructors
Properties
The direction from start toward end — a round point at infinity; see Dipole.attitude.
The line through both endpoints; see Dipole.carrier.
The midpoint of the endpoints — degenerates at infinity; see Dipole.center.
The perpendicular bisector of the endpoints; see Dipole.cocarrier.
The smallest circle containing this segment — the endpoints as a diameter; see Dipole.container.
The second endpoint.
Whether this segment is imaginary — a negative squared radius, no real endpoints.
The first endpoint.
Functions
Segment intersects Polygon => Boolean
Returns whether the segment touches the polygon's boundary or lies within its solid region.
Segment intersects Segment => Boolean
Returns whether the segments touch, cross, or overlap, endpoints included.
Segment intersects Line => Boolean
Returns whether the line touches or crosses the segment.
Segment meet Segment => RoundPoint?
Returns the point where the two segments cross, or null when they don't.
Segment meet Line => RoundPoint?
Returns the point where the line crosses the segment, or null when it misses.
Returns the endpoints rounded at the SCALE quantum — the debug-output convention of every shape.