public class Line
extends java.lang.Object
| Constructor and Description |
|---|
Line() |
| Modifier and Type | Method and Description |
|---|---|
static PointF |
getLinesIntersection(PointF p1,
PointF p2,
PointF p3,
PointF p4) |
static void |
getLinesIntersection(PointF p1,
PointF p2,
PointF p3,
PointF p4,
PointF result) |
static boolean |
linesIntersect(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
Detect if 2 line segments intersect.
|
static PointF |
shiftLine(PointF p1,
PointF p2,
float delta)
Find the parallel line that is shifted "delta" units from the given line
|
static PointF |
shiftLine(PointF p1,
PointF p2,
float delta,
float angle)
Find the parallel line that is shifted "delta" units from the given line and angle
|
public static PointF getLinesIntersection(PointF p1,
PointF p2,
PointF p3,
PointF p4)
p1 - p2 - p3 - p4 - public static void getLinesIntersection(PointF p1,
PointF p2,
PointF p3,
PointF p4,
PointF result)
p1 - p2 - p3 - p4 - result - is the intersection between 2 lines. This is more optimized because it doesn't allocate new PointF.public static boolean linesIntersect(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
x1 - y1 - x2 - y2 - x3 - y3 - x4 - y4 - public static PointF shiftLine(PointF p1,
PointF p2,
float delta)
p1 - p2 - delta - public static PointF shiftLine(PointF p1,
PointF p2,
float delta,
float angle)
p1 - p2 - angle - delta -