public class Lines extends Object
Constructor and Description |
---|
Lines() |
Modifier and Type | Method and Description |
---|---|
static boolean |
lineIntersectsRect(float x1,
float y1,
float x2,
float y2,
float rx,
float ry,
float rw,
float rh)
Returns true if the specified line segment intersects the specified rectangle.
|
static boolean |
linesIntersect(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4)
Returns true if the specified two line segments intersect.
|
static float |
pointLineDist(float px,
float py,
float x1,
float y1,
float x2,
float y2)
Returns the distance from the specified point to the specified line.
|
static float |
pointLineDistSq(float px,
float py,
float x1,
float y1,
float x2,
float y2)
Returns the square of the distance from the specified point to the specified line.
|
static float |
pointSegDist(float px,
float py,
float x1,
float y1,
float x2,
float y2)
Returns the distance between the specified point and the specified line segment.
|
static float |
pointSegDistSq(float px,
float py,
float x1,
float y1,
float x2,
float y2)
Returns the square of the distance between the specified point and the specified line
segment.
|
static int |
relativeCCW(float px,
float py,
float x1,
float y1,
float x2,
float y2)
Returns an indicator of where the specified point (px,py) lies with respect to the line
segment from (x1,y1) to (x2,y2).
|
public static boolean linesIntersect(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4)
public static boolean lineIntersectsRect(float x1, float y1, float x2, float y2, float rx, float ry, float rw, float rh)
public static float pointLineDistSq(float px, float py, float x1, float y1, float x2, float y2)
public static float pointLineDist(float px, float py, float x1, float y1, float x2, float y2)
public static float pointSegDistSq(float px, float py, float x1, float y1, float x2, float y2)
public static float pointSegDist(float px, float py, float x1, float y1, float x2, float y2)
public static int relativeCCW(float px, float py, float x1, float y1, float x2, float y2)
Copyright © 2017. All rights reserved.