Class HyperbolicAxisAlignedBoundingBox

    • Constructor Detail

      • HyperbolicAxisAlignedBoundingBox

        public HyperbolicAxisAlignedBoundingBox​(Translation2d topLeft,
                                                Translation2d bottomRight,
                                                Rotation2d hRot,
                                                Rotation2d vRot)
        Create a HyperbolicAxisAlignedBoundingBox from a horizontal and vertical theta
        Parameters:
        topLeft - Left corner expressed as a percentage of the frame from the center (top left is -1,1)
        bottomRight - Bottom right corner expressed as a percentage of the frame from the center (top left is -1,1)
        hRot - Positive theta between the left and right bounds
        vRot - Positive theta between the top and bottom bounds
      • HyperbolicAxisAlignedBoundingBox

        public HyperbolicAxisAlignedBoundingBox​(Translation2d topLeft,
                                                Translation2d bottomRight,
                                                Rotation2d xRot,
                                                Rotation2d yRot,
                                                Rotation2d hRot,
                                                Rotation2d vRot)
        Create a HyperbolicAxisAlignedBoundingBox from a horizontal and vertical theta
        Parameters:
        topLeft - left corner expressed as a percentage of the frame from the center (top left is -1,1)
        bottomRight - Bottom right corner 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
        hRot - Positive theta between the left and right bounds
        vRot - Positive theta between the top and bottom bounds
      • HyperbolicAxisAlignedBoundingBox

        public HyperbolicAxisAlignedBoundingBox​(Translation2d topLeft,
                                                Translation2d bottomRight,
                                                Rotation2d xRot,
                                                Rotation2d yRot,
                                                Rotation2d leftRot,
                                                Rotation2d rightRot,
                                                Rotation2d topRot,
                                                Rotation2d bottomRot)
        Create a HyperbolicAxisAlignedBoundingBox using rotations for each side
        Parameters:
        topLeft - Top left corner expressed as a percentage of the frame from the center (top left is -1,1)
        bottomRight - Bottom right corner 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
        leftRot - Rotation of the left bound from the center point
        rightRot - Rotation of the right bound from the center point
        topRot - Rotation of the top bound from the center point
        bottomRot - Rotation of bottom left bound from the center point
    • Method Detail

      • getHorizontalTheta

        public Rotation2d getHorizontalTheta()
        Get the theta between the left and right bounds
        Returns:
        Theta between the left and right bounds
      • getVerticalTheta

        public Rotation2d getVerticalTheta()
        Get the theta between the top and bottom bounds
        Returns:
        Theta between the top and bottom bounds
      • isHorizontalBalanced

        public boolean isHorizontalBalanced()
        Get if the left and right rotations are of equal proportion
        Returns:
        Is left and right balanced
      • isVerticalBalanced

        public boolean isVerticalBalanced()
        Get if the top and bottom rotations are of equal proportion
        Returns:
        Is top and bottom balanced
      • isBalanced

        public boolean isBalanced()
        Get if isHorizontalBalanced and isVerticalBalanced are both true
        Returns:
        Is fully balanced
      • getLeftBoundRotation

        public Rotation2d getLeftBoundRotation()
        Get the rotation from the center to the left bound
        Returns:
        Rotation
      • getRightBoundRotation

        public Rotation2d getRightBoundRotation()
        Get the rotation from the center to the right bound
        Returns:
        Rotation
      • getTopBoundRotation

        public Rotation2d getTopBoundRotation()
        Get the rotation from the center to the top bound
        Returns:
        Rotation
      • getBottomBoundRotation

        public Rotation2d getBottomBoundRotation()
        Get the rotation from the center to the bottom bound
        Returns:
        Rotation