Package com.solibri.geometry.primitive3d
Interface Line3d
- All Known Subinterfaces:
MLine3d
public interface Line3d
Read-only interface for handling lines in 3-dimensional space.
- Since:
- 9.10.2
-
Method Summary
Modifier and Type Method Description static Line3dcreate(Vector3d firstPoint, Vector3d secondPoint)Creates a new instance.doubledistance(MVector3d point)Calculates the distance of a point from this line.doubledistanceSqr(MVector3d point)Calculates the squared distance of a point from this line.Vector3dgetDirection()Returns the normalized direction vector of this line.Vector3dgetFirstPoint()Returns the first bootstrapping point of this line.Optional<MVector3d>getIntersectionPoint(Plane plane)Returns the point of intersection between this line and the given plane.Vector3dgetSecondPoint()Returns the second bootstrapping point of this line.booleanintersects(AABB3d aabb)Returns true if the line intersects the axis-aligned bounding box, false otherwise.
-
Method Details
-
create
Creates a new instance.- Parameters:
firstPoint- the first pointsecondPoint- the second point- Returns:
- a Line3d instance
- Since:
- 9.10.2
-
getFirstPoint
Vector3d getFirstPoint()Returns the first bootstrapping point of this line.- Returns:
- the first bootstrapping point of this line
- Since:
- 9.10.2
-
getSecondPoint
Vector3d getSecondPoint()Returns the second bootstrapping point of this line.- Returns:
- the second bootstrapping point of this line
- Since:
- 9.10.2
-
getDirection
Vector3d getDirection()Returns the normalized direction vector of this line.- Returns:
- the normalized direction vector of this line
- Since:
- 9.10.2
-
getIntersectionPoint
Returns the point of intersection between this line and the given plane. If the line does not intersect the plane, then returns empty.- Parameters:
plane- the plane with which the intersection is returned- Returns:
- the point of intersection between this line and the given plane
- Since:
- 9.10.2
-
distanceSqr
Calculates the squared distance of a point from this line.- Parameters:
point- the point- Returns:
- the squared distance of a point from this line
- Since:
- 9.10.2
-
distance
Calculates the distance of a point from this line.- Parameters:
point- the point- Returns:
- the distance of a point from this line
- Since:
- 9.10.2
-
intersects
Returns true if the line intersects the axis-aligned bounding box, false otherwise.- Parameters:
aabb- the axis-aligned bounding box with which this is checked for intersection- Returns:
- if the line intersects the axis-aligned bounding box, false otherwise
- Since:
- 9.10.2
-