Class ReefscapeReefBranch

java.lang.Object
org.ironmaple.simulation.Goal
org.ironmaple.simulation.seasonspecific.reefscape2025.ReefscapeReefBranch
All Implemented Interfaces:
SimulatedArena.Simulatable

public class ReefscapeReefBranch extends Goal

Simulates a Reefscape branch on the field.

This class simulates a Reefscape branch where corals can be scored. This class should not be used directly and instead should be used via a ReefscapeReefSimulation which will handle an entire reef.

  • Field Details

    • level

      public final int level
    • column

      public final int column
    • origin

      public static final Translation2d origin
    • branchesCenterPositionBlue

      public static final Translation2d[] branchesCenterPositionBlue
    • heights

      public static final Translation3d[] heights
    • flip90

      public static final Rotation3d flip90
    • branchesCenterPositionRed

      public static final Translation2d[] branchesCenterPositionRed
    • branchesFacingOutwardsBlue

      public static final Rotation2d[] branchesFacingOutwardsBlue
    • branchesFacingOutwardsRed

      public static final Rotation2d[] branchesFacingOutwardsRed
  • Constructor Details

    • ReefscapeReefBranch

      public ReefscapeReefBranch(Arena2025Reefscape arena, boolean isBlue, int level, int column)

      Creates a singular reef branch at the specified location

      Parameters:
      arena - The host arena of this reef.
      isBlue - Wether the position is on the blue reef or the red reef.
      level - The level of the reef (0 indexed). Range of 0-3.
      column - The pole or Colum of the reef (0 indexed). Range of 0-11.
  • Method Details

    • setAngleTolerance

      public static void setAngleTolerance(Angle tolerance)

      Sets the Angle Tolerance for All Reef Branches

      This configures the tolerance used for rotation validation across all reef branch instances. Changes take effect immediately for all instances, including those already created.

      Parameters:
      tolerance - The angle tolerance to use for all branches
    • getPoseOfBranchAt

      public static Translation3d getPoseOfBranchAt(boolean isBlue, int level, int col)

      Returns the required pose of a reef branch at the designated position.

      Parameters:
      isBlue - Wether the position is on the blue reef or the red reef.
      level - The level of the reef (0 indexed). Range of 0-3.
      col - The pole or Colum of the reef (0 indexed). Range of 0-11.
      Returns:
      The pose of a reef branch with the specified stats.
    • getPose

      public Pose3d getPose()

      Gives the pose of the reef branch.

      Returns:
      This position of this branch as a pose3d.
    • addPoints

      protected void addPoints()
      Description copied from class: Goal

      Adds Points When a Piece Has Been Successfully Scored in This Goal

      Since this function is the only trigger called when a piece is scored it may handle other small things outside of adding points.

      Specified by:
      addPoints in class Goal
    • draw

      public void draw(List<Pose3d> drawList)
      Description copied from class: Goal

      Displays Game Pieces to AdvantageScope if Applicable

      Specified by:
      draw in class Goal
      Parameters:
      drawList - a list of Pose3d objects used to visualize the positions of the game pieces on AdvantageScope