001/**
002 * Copyright 2024 The Space Cookies : Girl Scout Troop #62868 and FRC Team #1868
003 * Open Source Software; you may modify and/or share it under the terms of
004 * the 3-Clause BSD License found in the root directory of this project.
005 */
006
007package tagalong.measurements;
008
009import edu.wpi.first.math.geometry.Pose2d;
010
011/**
012 * Alliance specific Pose2d wrapper class
013 */
014public class AlliancePose2d {
015  /**
016   * Blue and Red alliance specific 2-dimensional poses
017   */
018  public final Pose2d blue, red;
019
020  /**
021   *
022   * @param blue 2d coordinates for blue alliance side
023   * @param red  2d coordinates for red alliance side
024   */
025  public AlliancePose2d(Pose2d blue, Pose2d red) {
026    this.blue = blue;
027    this.red = red;
028  }
029
030  /**
031   *
032   * @param isRed True if on the red alliance
033   * @return Specified alliance's Pose2d
034   */
035  public Pose2d get(boolean isRed) {
036    return isRed ? red : blue;
037  }
038}