georegression.metric
Class Intersection2D_I32
- java.lang.Object
-
- georegression.metric.Intersection2D_I32
-
public class Intersection2D_I32 extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Intersection2D_I32()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleancontainConcave(Polygon2D_I32 polygon, Point2D_I32 pt)Checks to see if the point is contained inside the concave polygon.static booleancontainConvex(Polygon2D_I32 polygon, Point2D_I32 pt)Checks to see if the point is contained inside the convex polygon.static booleancontains(Rectangle2D_I32 a, int x, int y)True if the point is contained inside the rectanglestatic booleancontains(RectangleLength2D_I32 a, int x, int y)True if the point is contained inside the rectanglestatic booleanintersection(Rectangle2D_I32 a, Rectangle2D_I32 b, Rectangle2D_I32 result)Finds the intersection between two rectangles.static booleanintersects(Rectangle2D_I32 a, Rectangle2D_I32 b)Checks to see if the two rectangles intersect each other
-
-
-
Method Detail
-
intersects
public static boolean intersects(Rectangle2D_I32 a, Rectangle2D_I32 b)
Checks to see if the two rectangles intersect each other- Parameters:
a- Rectangleb- Rectangle- Returns:
- true if intersection
-
intersection
public static boolean intersection(Rectangle2D_I32 a, Rectangle2D_I32 b, Rectangle2D_I32 result)
Finds the intersection between two rectangles. If the rectangles don't intersect then false is returned.- Parameters:
a- Rectangleb- Rectangleresult- Storage for the found intersection- Returns:
- true if intersection
-
containConvex
public static boolean containConvex(Polygon2D_I32 polygon, Point2D_I32 pt)
Checks to see if the point is contained inside the convex polygon. If the point is an the polygon's perimeter it is considered to NOT be inside.- Parameters:
polygon- Convex polygon. Not modified.pt- Point. Not modified.- Returns:
- True if the point is contained inside the polygon.
-
containConcave
public static boolean containConcave(Polygon2D_I32 polygon, Point2D_I32 pt)
Checks to see if the point is contained inside the concave polygon. NOTE: Points which lie along the perimeter may or may not be considered as inside- Parameters:
polygon- Convex polygon. Not modified.pt- Point. Not modified.- Returns:
- True if the point is contained inside the polygon.
-
contains
public static boolean contains(RectangleLength2D_I32 a, int x, int y)
True if the point is contained inside the rectangle- Parameters:
a- Rectanglex- x-coordinate of pointy- y-coordinate of point- Returns:
- true if the point is inside and false it is not
-
contains
public static boolean contains(Rectangle2D_I32 a, int x, int y)
True if the point is contained inside the rectangle- Parameters:
a- Rectanglex- x-coordinate of pointy- y-coordinate of point- Returns:
- true if the point is inside and false it is not
-
-
DataMelt 3.0 © DataMelt by jWork.ORG