Class ReefscapeReefBranch
java.lang.Object
org.ironmaple.simulation.Goal
org.ironmaple.simulation.seasonspecific.reefscape2025.ReefscapeReefBranch
- All Implemented Interfaces:
SimulatedArena.Simulatable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ironmaple.simulation.Goal
Goal.PositionChecker, Goal.RotationChecker -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Translation2d[]static final Translation2d[]static final Rotation2d[]static final Rotation2d[]final intstatic final Rotation3dstatic final Translation3d[]final intstatic final Translation2dFields inherited from class org.ironmaple.simulation.Goal
allowGrounded, arena, elevation, gamePieceCount, gamePieceType, height, isBlue, max, position, positionChecker, rotationChecker, velocityValidator, xyBox -
Constructor Summary
ConstructorsConstructorDescriptionReefscapeReefBranch(Arena2025Reefscape arena, boolean isBlue, int level, int column) Creates a singular reef branch at the specified location -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdds Points When a Piece Has Been Successfully Scored in This GoalvoidDisplays Game Pieces to AdvantageScope if ApplicablegetPose()Gives the pose of the reef branch.static Translation3dgetPoseOfBranchAt(boolean isBlue, int level, int col) Returns the required pose of a reef branch at the designated position.static voidsetAngleTolerance(Angle tolerance) Sets the Angle Tolerance for All Reef BranchesMethods inherited from class org.ironmaple.simulation.Goal
absoluteAngle, anyRotation, box, checkCollision, checkGrounded, checkValidity, clear, flipRotation, getGamePieceCount, isFull, pitchOnly, setNeededAngle, setNeededAngle, simulationSubTick, withCustomCollisionPredicate, withCustomPositionChecker, withCustomRotationChecker, withCustomRotationValidator, withCustomVelocityValidator, withRotationTolerance
-
Field Details
-
level
public final int level -
column
public final int column -
origin
-
branchesCenterPositionBlue
-
heights
-
flip90
-
branchesCenterPositionRed
-
branchesFacingOutwardsBlue
-
branchesFacingOutwardsRed
-
-
Constructor Details
-
ReefscapeReefBranch
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
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
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
Gives the pose of the reef branch.
- Returns:
- This position of this branch as a pose3d.
-
addPoints
protected void addPoints()Description copied from class:GoalAdds 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.
-
draw
Description copied from class:GoalDisplays Game Pieces to AdvantageScope if Applicable
-