Package com.solibri.geometry.primitive2d
Interface Line2d
- All Known Subinterfaces:
- MLine2d
public interface Line2d
Read-only interface for handling lines in 2-dimensional space.
- Since:
- 9.10.2
- 
Method SummaryModifier and TypeMethodDescriptionstatic Line2dCreates a new instance.doubleReturns the distance of a point from this line.doubledistanceSquared(Vector2d point) Returns the squared distance of a point from this line.Returns the normalized direction vector of this line.Returns the first bootstrapping point of this line.Returns the second bootstrapping point of this line.Calculates an Optional containing the intersection point of this line and another line.booleanisPointOnLeftSide(Vector2d point) Returns true if the given point is on the left side of this line when looking in the direction of the vector returned by thegetDirection()method.booleanisPointOnRightSide(Vector2d point) Returns true if the given point is on the right side of this line when looking in the direction of the vector returned by thegetDirection()method.Returns the projection of the given point onto this line.
- 
Method Details- 
distanceReturns 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
 
- 
distanceSquaredReturns 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
 
- 
getDirectionVector2d getDirection()Returns the normalized direction vector of this line.- Returns:
- the normalized direction vector of this line
- Since:
- 9.10.2
 
- 
getFirstPointVector2d getFirstPoint()Returns the first bootstrapping point of this line.- Returns:
- the first bootstrapping point of this line
- Since:
- 9.10.2
 
- 
intersectCalculates an Optional containing the intersection point of this line and another line. The Optional is empty if the lines don't intersect.- Parameters:
- otherLine- the other line
- Returns:
- an optional containing the intersection point
- Since:
- 9.10.2
 
- 
projectReturns the projection of the given point onto this line.- Parameters:
- point- the point that is projected onto this line
- Returns:
- the projection of the given point onto this line
- Since:
- 9.10.2
 
- 
getSecondPointVector2d getSecondPoint()Returns the second bootstrapping point of this line.- Returns:
- the second bootstrapping point of this line
- Since:
- 9.10.2
 
- 
isPointOnLeftSideReturns true if the given point is on the left side of this line when looking in the direction of the vector returned by thegetDirection()method.- Parameters:
- point- the point whose side is checked
- Returns:
- true if the given point is on the left side of this line
- Since:
- 9.10.2
 
- 
isPointOnRightSideReturns true if the given point is on the right side of this line when looking in the direction of the vector returned by thegetDirection()method.- Parameters:
- point- the point whose side is checked
- Returns:
- true if the given point is on the right side of this line
- Since:
- 9.10.2
 
- 
createCreates a new instance.- Parameters:
- firstPoint- the first point
- secondPoint- the second point
- Returns:
- a Line2d instance
- Since:
- 9.10.2
 
 
-