Class FieldFlip

java.lang.Object
org.team1126.lib.math.FieldFlip

public final class FieldFlip extends Object
Utility class for flipping field locations across lines of symmetry. FieldInfo is utilized to retrieve field dimensions.
  • Method Summary

    Modifier and Type
    Method
    Description
    static edu.wpi.first.math.geometry.Pose2d
    overDiagonal(edu.wpi.first.math.geometry.Pose2d pose)
    Flips the provided Pose2d over the field's diagonal (i.e.
    static edu.wpi.first.math.geometry.Rotation2d
    overDiagonal(edu.wpi.first.math.geometry.Rotation2d rotation)
    Flips the provided Rotation2d over the field's diagonal (i.e.
    static edu.wpi.first.math.geometry.Translation2d
    overDiagonal(edu.wpi.first.math.geometry.Translation2d translation)
    Flips the provided Translation2d over the field's diagonal (i.e.
    static edu.wpi.first.math.geometry.Pose2d
    overLength(edu.wpi.first.math.geometry.Pose2d pose)
    Flips the provided Pose2d over the length of the field (i.e.
    static edu.wpi.first.math.geometry.Rotation2d
    overLength(edu.wpi.first.math.geometry.Rotation2d rotation)
    Flips the provided Rotation2d over the length of the field (i.e.
    static edu.wpi.first.math.geometry.Translation2d
    overLength(edu.wpi.first.math.geometry.Translation2d translation)
    Flips the provided Translation2d over the length of the field (i.e.
    static edu.wpi.first.math.geometry.Pose2d
    overWidth(edu.wpi.first.math.geometry.Pose2d pose)
    Flips the provided Pose2d over the width of the field (i.e.
    static edu.wpi.first.math.geometry.Rotation2d
    overWidth(edu.wpi.first.math.geometry.Rotation2d rotation)
    Flips the provided Rotation2d over the width of the field (i.e.
    static edu.wpi.first.math.geometry.Translation2d
    overWidth(edu.wpi.first.math.geometry.Translation2d translation)
    Flips the provided Translation2d over the width of the field (i.e.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • overLength

      public static edu.wpi.first.math.geometry.Translation2d overLength(edu.wpi.first.math.geometry.Translation2d translation)
      Flips the provided Translation2d over the length of the field (i.e. hamburger style).
      Parameters:
      translation - The translation to flip.
    • overLength

      public static edu.wpi.first.math.geometry.Rotation2d overLength(edu.wpi.first.math.geometry.Rotation2d rotation)
      Flips the provided Rotation2d over the length of the field (i.e. hamburger style).
      Parameters:
      rotation - The rotation to flip.
    • overLength

      public static edu.wpi.first.math.geometry.Pose2d overLength(edu.wpi.first.math.geometry.Pose2d pose)
      Flips the provided Pose2d over the length of the field (i.e. hamburger style).
      Parameters:
      pose - The pose to flip.
    • overWidth

      public static edu.wpi.first.math.geometry.Translation2d overWidth(edu.wpi.first.math.geometry.Translation2d translation)
      Flips the provided Translation2d over the width of the field (i.e. hotdog style).
      Parameters:
      translation - The translation to flip.
    • overWidth

      public static edu.wpi.first.math.geometry.Rotation2d overWidth(edu.wpi.first.math.geometry.Rotation2d rotation)
      Flips the provided Rotation2d over the width of the field (i.e. hotdog style).
      Parameters:
      rotation - The rotation to flip.
    • overWidth

      public static edu.wpi.first.math.geometry.Pose2d overWidth(edu.wpi.first.math.geometry.Pose2d pose)
      Flips the provided Pose2d over the width of the field (i.e. hotdog style).
      Parameters:
      pose - The pose to flip.
    • overDiagonal

      public static edu.wpi.first.math.geometry.Translation2d overDiagonal(edu.wpi.first.math.geometry.Translation2d translation)
      Flips the provided Translation2d over the field's diagonal (i.e. rotated 180deg around the field's center).
      Parameters:
      translation - The translation to flip.
    • overDiagonal

      public static edu.wpi.first.math.geometry.Rotation2d overDiagonal(edu.wpi.first.math.geometry.Rotation2d rotation)
      Flips the provided Rotation2d over the field's diagonal (i.e. rotated 180deg around the field's center).
      Parameters:
      rotation - The rotation to flip.
    • overDiagonal

      public static edu.wpi.first.math.geometry.Pose2d overDiagonal(edu.wpi.first.math.geometry.Pose2d pose)
      Flips the provided Pose2d over the field's diagonal (i.e. rotated 180deg around the field's center).
      Parameters:
      pose - The pose to flip.