Class Segment3D
java.lang.Object
org.episteme.core.mathematics.geometry.Segment3D
- All Implemented Interfaces:
GeometricObject<Point3D>
Represents a line segment in 3D space.
Defined by two points: start and end.
- 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.Clips this segment against a box defined by min and max points.booleanChecks if a point lies on the segment.booleanReturns a human-readable description of this geometric object.intReturns the intrinsic dimension of this geometric object.getEnd()getStart()length()
-
Constructor Details
-
Segment3D
-
-
Method Details
-
getStart
-
getEnd
-
length
-
contains
Checks if a point lies on the segment.- Parameters:
p- the pointtolerance- the tolerance- Returns:
- true if p is on the segment
-
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<Point3D>- 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<Point3D>- Returns:
- the ambient space dimension
-
containsPoint
-
description
Description copied from interface:GeometricObjectReturns a human-readable description of this geometric object.- Specified by:
descriptionin interfaceGeometricObject<Point3D>- Returns:
- description string
-
clip
-