Class Segment2D
java.lang.Object
org.episteme.core.mathematics.geometry.Segment2D
- All Implemented Interfaces:
GeometricObject<Point2D>
Represents a line segment in 2D space.
A 2D segment is defined by two endpoints in 2D Euclidean space.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the dimension of the ambient space containing this object.Interpolates along the segment.booleanReturns a human-readable description of this geometric object.intReturns the intrinsic dimension of this geometric object.booleangetEnd()getStart()inthashCode()length()Returns the length of this segment.midpoint()Returns the midpoint of this segment.Converts to SegmentND.toString()
-
Constructor Details
-
Segment2D
-
-
Method Details
-
dimension
public int dimension()Description copied from interface:GeometricObjectReturns the intrinsic dimension of this geometric object.Examples:
- Point: 0
- Line/Segment: 1
- Plane/Surface: 2
- Volume: 3
- Specified by:
dimensionin interfaceGeometricObject<Point2D>- Returns:
- the dimension
-
ambientDimension
public int ambientDimension()Description copied from interface:GeometricObjectReturns the dimension of the ambient space containing this object.For example, a 2D plane in 3D space has dimension=2 but ambientDimension=3.
- Specified by:
ambientDimensionin interfaceGeometricObject<Point2D>- Returns:
- the ambient space dimension
-
getStart
-
getEnd
-
midpoint
-
length
-
at
-
containsPoint
-
toSegmentND
-
description
Description copied from interface:GeometricObjectReturns a human-readable description of this geometric object.- Specified by:
descriptionin interfaceGeometricObject<Point2D>- Returns:
- description string
-
toString
-
equals
-
hashCode
-