Class Contour

    • Field Detail

      • NO_ROTATION

        public static final Rotation2d NO_ROTATION
    • Constructor Detail

      • Contour

        public Contour()
        Create a Contour at 0,0
      • Contour

        public Contour​(double x,
                       double y)
        Create a contour with a position
        Parameters:
        x - X offset expressed as a percentage of the frame from the center (top left is -1,1)
        y - Y offset expressed as a percentage of the frame from the center (top left is -1,1)
      • Contour

        public Contour​(double x,
                       double y,
                       Rotation2d xRot,
                       Rotation2d yRot)
        Create a contour with a position and rotation from the camera
        Parameters:
        x - X offset expressed as a percentage of the frame from the center (top left is -1,1)
        y - Y offset expressed as a percentage of the frame from the center (top left is -1,1)
        xRot - X angle from camera
        yRot - Y angle from camera
    • Method Detail

      • getXRotation

        public Rotation2d getXRotation()
        Get the X angle from the camera
        Returns:
        X angle
      • getYRotation

        public Rotation2d getYRotation()
        Get the Y angle from the camera
        Returns:
        Y angle
      • contains

        public abstract boolean contains​(Translation2d point)
        Check if this contour contains a point
        Parameters:
        point - Point
        Returns:
        Is the point in this contour?
      • overlaps

        public abstract boolean overlaps​(AxisAlignedBoundingBox box)
        Check if this contour overlaps with an AxisAlignedBoundingBox
        Parameters:
        box - AxisAlignedBoundingBox
        Returns:
        Does it overlap?