public class GeometryUtil extends Object
Modifier and Type | Field and Description |
---|---|
static float |
EPSILON |
Constructor and Description |
---|
GeometryUtil() |
Modifier and Type | Method and Description |
---|---|
static float |
cubic(float t,
float x1,
float x2,
float x3,
float x4) |
static int |
intersectCubics(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
float cx1,
float cy1,
float cx2,
float cy2,
float cx3,
float cy3,
float cx4,
float cy4,
float[] params)
Checks whether two cubic curves (x1, y1) - (x2, y2) - (x3, y3) - (x4, y4) and (cx1, cy1) -
(cx2, cy2) - (cx3, cy3) - (cx4, cy4) intersect.
|
static int |
intersectLineAndCubic(float x1,
float y1,
float x2,
float y2,
float cx1,
float cy1,
float cx2,
float cy2,
float cx3,
float cy3,
float cx4,
float cy4,
float[] params)
Checks whether the line (x1, y1) - (x2, y2) and the cubic curve (cx1, cy1) - (cx2, cy2) -
(cx3, cy3) - (cx4, cy4) intersect.
|
static int |
intersectLineAndQuad(float x1,
float y1,
float x2,
float y2,
float qx1,
float qy1,
float qx2,
float qy2,
float qx3,
float qy3,
float[] params)
Checks whether there is intersection of the line (x1, y1) - (x2, y2) and the quad curve
(qx1, qy1) - (qx2, qy2) - (qx3, qy3).
|
static int |
intersectLines(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
float[] point)
Checks whether line (x1, y1) - (x2, y2) and line (x3, y3) - (x4, y4) intersect.
|
static int |
intersectLinesWithParams(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
float[] params) |
static int |
intersectQuadAndCubic(float qx1,
float qy1,
float qx2,
float qy2,
float qx3,
float qy3,
float cx1,
float cy1,
float cx2,
float cy2,
float cx3,
float cy3,
float cx4,
float cy4,
float[] params)
Checks whether the quad (x1, y1) - (x2, y2) - (x3, y3) and the cubic (cx1, cy1) - (cx2, cy2)
- (cx3, cy3) - (cx4, cy4) curves intersect.
|
static int |
intersectQuads(float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float qx1,
float qy1,
float qx2,
float qy2,
float qx3,
float qy3,
float[] params)
Checks whether two quads (x1, y1) - (x2, y2) - (x3, y3) and (qx1, qy1) - (qx2, qy2) - (qx3,
qy3) intersect.
|
static float |
line(float t,
float x1,
float x2) |
static float |
quad(float t,
float x1,
float x2,
float x3) |
static void |
subCubic(float[] coef,
float t0,
boolean left) |
static void |
subQuad(float[] coef,
float t0,
boolean left) |
public static int intersectLinesWithParams(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float[] params)
public static int intersectLines(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float[] point)
point
must be at least 2.public static int intersectLineAndQuad(float x1, float y1, float x2, float y2, float qx1, float qy1, float qx2, float qy2, float qx3, float qy3, float[] params)
params
. Therefore params
must be of length at least 4.public static int intersectLineAndCubic(float x1, float y1, float x2, float y2, float cx1, float cy1, float cx2, float cy2, float cx3, float cy3, float cx4, float cy4, float[] params)
points
.
Therefore points
must be of length at least 6.public static int intersectQuads(float x1, float y1, float x2, float y2, float x3, float y3, float qx1, float qy1, float qx2, float qy2, float qx3, float qy3, float[] params)
params
. Thus params
must be of length
at least 4.public static int intersectQuadAndCubic(float qx1, float qy1, float qx2, float qy2, float qx3, float qy3, float cx1, float cy1, float cx2, float cy2, float cx3, float cy3, float cx4, float cy4, float[] params)
params
. Thus params
must be of length at least 6.public static int intersectCubics(float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, float cx1, float cy1, float cx2, float cy2, float cx3, float cy3, float cx4, float cy4, float[] params)
params
. Thus
params
must be of length at least 6.public static float line(float t, float x1, float x2)
public static float quad(float t, float x1, float x2, float x3)
public static float cubic(float t, float x1, float x2, float x3, float x4)
public static void subQuad(float[] coef, float t0, boolean left)
public static void subCubic(float[] coef, float t0, boolean left)
Copyright © 2017. All rights reserved.