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
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static Line3d
create(Vector3d firstPoint, Vector3d secondPoint)
Creates a new instance.double
distance(MVector3d point)
Calculates the distance of a point from this line.double
distanceSqr(MVector3d point)
Calculates the squared distance of a point from this line.Vector3d
getDirection()
Returns the normalized direction vector of this line.Vector3d
getFirstPoint()
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.Vector3d
getSecondPoint()
Returns the second bootstrapping point of this line.boolean
intersects(AABB3d aabb)
Returns true if the line intersects the axis-aligned bounding box, false otherwise.
-
-
-
Method Detail
-
create
static Line3d create(Vector3d firstPoint, Vector3d secondPoint)
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
Optional<MVector3d> getIntersectionPoint(Plane plane)
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
double distanceSqr(MVector3d point)
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
double distance(MVector3d point)
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
boolean intersects(AABB3d aabb)
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
-
-