public class TwoD extends Object
Constructor and Description |
---|
TwoD() |
Modifier and Type | Method and Description |
---|---|
static double |
area2(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c)
Twice the signed area of the triangle determined by a,b,c; positive if counterclockwise, negative if clockwisew
|
static int |
areaSign(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c) |
void |
assigndi(TwoSpacePoint p,
TwoSpacePoint a) |
static boolean |
between(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c)
Determines whether a point is on a line segment define by its endpoints.
|
boolean |
between1(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c) |
static boolean |
collinear(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c)
Determines whether a point is on or collinear with a line segment define by its endpoints.
|
static boolean |
intersect(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c,
TwoSpacePoint d)
Determines whether two lines defined by their segments intersect.
|
static boolean |
intersectProp(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c,
TwoSpacePoint d)
Determines whether two line segments intersect.
|
static boolean |
left(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c)
Determines whether a point is to the left of a line segment define by its endpoints.
|
static boolean |
leftOn(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c)
Determines whether a point is to the left or on a line segment define by its endpoints.
|
char |
parallelInt(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c,
TwoSpacePoint d,
TwoSpacePoint p,
TwoSpacePoint q) |
char |
segSegInt(TwoSpacePoint a,
TwoSpacePoint b,
TwoSpacePoint c,
TwoSpacePoint d,
TwoSpacePoint p,
TwoSpacePoint q) |
static boolean |
xOr(boolean x,
boolean y) |
public static double area2(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
a
- First point on the triangle.b
- Second point on the triangle.c
- Third point on the triangle.public static int areaSign(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
public static boolean left(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
a
- The first point on the segment.b
- The second point on the segment.c
- The point to check.public static boolean leftOn(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
a
- The first point on the segment.b
- The second point on the segment.c
- The point to check.public static boolean collinear(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
a
- The first point on the segment.b
- The second point on the segment.c
- The point to check.public static boolean between(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
a
- The first point on the segment.b
- The second point on the segment.c
- The point to check.public static boolean intersect(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c, TwoSpacePoint d)
a
- The first point on the first line segment.b
- The second point on the first line segment.c
- The first point on the second line segment.d
- The second point on the second line segment.public static boolean intersectProp(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c, TwoSpacePoint d)
a
- The first point on the first line segment.b
- The second point on the first line segment.c
- The first point on the second line segment.d
- The second point on the second line segment.public static boolean xOr(boolean x, boolean y)
public char segSegInt(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c, TwoSpacePoint d, TwoSpacePoint p, TwoSpacePoint q)
public char parallelInt(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c, TwoSpacePoint d, TwoSpacePoint p, TwoSpacePoint q)
public void assigndi(TwoSpacePoint p, TwoSpacePoint a)
public boolean between1(TwoSpacePoint a, TwoSpacePoint b, TwoSpacePoint c)
Copyright © 2016 Linear Collider Detector (LCD). All rights reserved.