Package io.scanbot.sdk.util.view
Class PolygonViewHelper.Line
-
- All Implemented Interfaces:
public class PolygonViewHelper.LineRepresentation of line
Calculates line by two points and finds intersection points with other lines General line formula is a * x + b * y + c = 0
-
-
Constructor Summary
Constructors Constructor Description PolygonViewHelper.Line()
-
Method Summary
Modifier and Type Method Description PointFgetIntersectionPoint(PolygonViewHelper.Line line)voidcalculateLine(PointF start, PointF end)Calculate all 3 components of the line doublegetDistanceToPoint(PointF point)Calculates distance to point Should be used after line components are calculated -
-
Method Detail
-
getIntersectionPoint
PointF getIntersectionPoint(PolygonViewHelper.Line line)
-
calculateLine
void calculateLine(PointF start, PointF end)
Calculate all 3 components of the line
- Parameters:
start- starting point of segment laying on this lineend- ending point of segment laying on this line
-
getDistanceToPoint
double getDistanceToPoint(PointF point)
Calculates distance to point Should be used after line components are calculated
-
-
-
-