Class Crossing
java.lang.Object
com.graphbuilder.org.apache.harmony.awt.gl.Crossing
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCubicCurve class provides basic functionality to find curve crossing and calculating boundsstatic classQuadCurve class provides basic functionality to find curve crossing and calculating bounds -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcrossCubic(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2, double x, double y) Returns how many times ray from point (x,y) cross cubic curvestatic intcrossLine(double x1, double y1, double x2, double y2, double x, double y) Returns how many times ray from point (x,y) cross line.static intcrossPath(PathIterator p, double x, double y) Returns how many times ray from point (x,y) cross pathstatic intcrossQuad(double x1, double y1, double cx, double cy, double x2, double y2, double x, double y) Returns how many times ray from point (x,y) cross quard curvestatic intcrossShape(Shape s, double x, double y) Returns how many times ray from point (x,y) cross shapestatic intintersectCubic(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2, double rx1, double ry1, double rx2, double ry2) Returns how many times rectangle stripe cross cubic curve or the are intersectstatic intintersectLine(double x1, double y1, double x2, double y2, double rx1, double ry1, double rx2, double ry2) Returns how many times rectangle stripe cross line or the are intersectstatic intintersectPath(PathIterator p, double x, double y, double w, double h) Returns how many times rectangle stripe cross path or the are intersectstatic intintersectQuad(double x1, double y1, double cx, double cy, double x2, double y2, double rx1, double ry1, double rx2, double ry2) Returns how many times rectangle stripe cross quad curve or the are intersectstatic intintersectShape(Shape s, double x, double y, double w, double h) Returns how many times rectangle stripe cross shape or the are intersectstatic booleanisInsideEvenOdd(int cross) Returns true if cross count correspond inside location for even-odd path rulestatic booleanisInsideNonZero(int cross) Returns true if cross count correspond inside location for non zero path rulestatic booleanisZero(double val) Returns true if value enough smallstatic intsolveCubic(double[] eqn, double[] res) Solves cubic equationstatic intsolveQuad(double[] eqn, double[] res) Solves quadratic equation
-
Field Details
-
CROSSING
public static final int CROSSINGRectangle cross segment- See Also:
-
-
Constructor Details
-
Crossing
public Crossing()
-
-
Method Details
-
solveQuad
public static int solveQuad(double[] eqn, double[] res) Solves quadratic equation- Parameters:
eqn- - the coefficients of the equationres- - the roots of the equation- Returns:
- a number of roots
-
solveCubic
public static int solveCubic(double[] eqn, double[] res) Solves cubic equation- Parameters:
eqn- - the coefficients of the equationres- - the roots of the equation- Returns:
- a number of roots
-
crossLine
public static int crossLine(double x1, double y1, double x2, double y2, double x, double y) Returns how many times ray from point (x,y) cross line. -
crossQuad
public static int crossQuad(double x1, double y1, double cx, double cy, double x2, double y2, double x, double y) Returns how many times ray from point (x,y) cross quard curve -
crossCubic
public static int crossCubic(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2, double x, double y) Returns how many times ray from point (x,y) cross cubic curve -
crossPath
Returns how many times ray from point (x,y) cross path -
crossShape
Returns how many times ray from point (x,y) cross shape -
isZero
public static boolean isZero(double val) Returns true if value enough small -
intersectLine
public static int intersectLine(double x1, double y1, double x2, double y2, double rx1, double ry1, double rx2, double ry2) Returns how many times rectangle stripe cross line or the are intersect -
intersectQuad
public static int intersectQuad(double x1, double y1, double cx, double cy, double x2, double y2, double rx1, double ry1, double rx2, double ry2) Returns how many times rectangle stripe cross quad curve or the are intersect -
intersectCubic
public static int intersectCubic(double x1, double y1, double cx1, double cy1, double cx2, double cy2, double x2, double y2, double rx1, double ry1, double rx2, double ry2) Returns how many times rectangle stripe cross cubic curve or the are intersect -
intersectPath
Returns how many times rectangle stripe cross path or the are intersect -
intersectShape
Returns how many times rectangle stripe cross shape or the are intersect -
isInsideNonZero
public static boolean isInsideNonZero(int cross) Returns true if cross count correspond inside location for non zero path rule -
isInsideEvenOdd
public static boolean isInsideEvenOdd(int cross) Returns true if cross count correspond inside location for even-odd path rule
-