Documentation of 'georegression.metric.Intersection2D_I32' Java class
Intersection2D_I32
georegression.metric

Class Intersection2D_I32



  • public class Intersection2D_I32
    extends java.lang.Object
    • Constructor Detail

      • Intersection2D_I32

        public Intersection2D_I32()
    • 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 - Rectangle
        b - 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 - Rectangle
        b - Rectangle
        result - 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 - Rectangle
        x - x-coordinate of point
        y - 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 - Rectangle
        x - x-coordinate of point
        y - y-coordinate of point
        Returns:
        true if the point is inside and false it is not

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.