java.lang.Object
org.jhotdraw8.geom.intersect.IntersectRayRay
-
Method Summary
Modifier and TypeMethodDescriptionstatic IntersectionResultExintersectRayRayEx(double aox, double aoy, double adx, double ady, double box, double boy, double bdx, double bdy) Computes the intersection between two infinitely long rays 'a' and 'b'.static IntersectionResultExintersectRayRayEx(double aox, double aoy, double adx, double ady, double amax, double box, double boy, double bdx, double bdy, double bmax, double epsilon) Computes the intersection between two infinitely long rays 'a' and 'b'.static @NonNull IntersectionResultExintersectRayRayEx(@NonNull Point2D ao, @NonNull Point2D ad, @NonNull Point2D bo, @NonNull Point2D bd) Computes the intersection between two infinitely long rays 'a' and 'b'.
-
Method Details
-
intersectRayRayEx
public static @NonNull IntersectionResultEx intersectRayRayEx(@NonNull Point2D ao, @NonNull Point2D ad, @NonNull Point2D bo, @NonNull Point2D bd) Computes the intersection between two infinitely long rays 'a' and 'b'.The intersection will contain the parameters 't' of ray 'a' in range [0,MAX_VALUE].
The computed intersection will have one of the states
IntersectionStatus.INTERSECTION,IntersectionStatus.NO_INTERSECTION_COINCIDENT,IntersectionStatus.NO_INTERSECTION_PARALLEL,- Parameters:
ao- origin of ray 'a'ad- direction of ray 'a'bo- origin of ray 'b'bd- directoin of ray 'b'- Returns:
- computed intersection
-
intersectRayRayEx
public static IntersectionResultEx intersectRayRayEx(double aox, double aoy, double adx, double ady, double box, double boy, double bdx, double bdy) Computes the intersection between two infinitely long rays 'a' and 'b'.The intersection will contain the parameters 't' of ray 'a' and ray 'b' in range [0,MAX_VALUE].
- Parameters:
aox- x origin of ray 'a'aoy- y origin of ray 'a'adx- x direction of ray 'a'ady- y direction of ray 'a'box- x origin of ray 'b'boy- y origin of ray 'b'bdx- x direction of ray 'b'bdy- y direction of ray 'b'- Returns:
- computed intersection
-
intersectRayRayEx
public static IntersectionResultEx intersectRayRayEx(double aox, double aoy, double adx, double ady, double amax, double box, double boy, double bdx, double bdy, double bmax, double epsilon) Computes the intersection between two infinitely long rays 'a' and 'b'.The intersection will contain the parameters 't' of ray 'a' in range [0,maxT].
This method can produce the following
IntersectionStatuscodes:IntersectionStatus.INTERSECTION-
The line segments intersect at the
IntersectionPointExgiven in the result. IntersectionStatus.NO_INTERSECTION-
The line segments do not intersect, but lines of infinite length,
will intersect at the
IntersectionPointExgiven in the result. IntersectionStatus.NO_INTERSECTION_COINCIDENT-
The lines segments do not intersect because they are
coincident. Coincidence starts and ends at the two
IntersectionPointExs given in the result. IntersectionStatus.NO_INTERSECTION_PARALLEL- The lines segments do not intersect because they are parallel.
- Parameters:
aox- x origin of ray 'a'aoy- y origin of ray 'a'adx- x direction of ray 'a'ady- y direction of ray 'a'amax- maximal parameter value of ray 'a'box- x origin of ray 'b'boy- y origin of ray 'b'bdx- x direction of ray 'b'bdy- y direction of ray 'b'bmax- maximal parameter value of ray 'b'- Returns:
- computed intersection
-