Package jsim.field

Class FieldLayout

java.lang.Object
jsim.field.FieldLayout

public final class FieldLayout extends Object
Utility for populating a SimWorld with FRC field geometry: a carpet floor and four perimeter wall planes.

All bodies added by this class are static — they deflect game pieces and robots but cannot themselves be moved.

Coordinate frame: X points from the blue alliance wall toward the red alliance wall; Y points across the field; Z points up. This matches AdvantageScope's field rendering.

Wall implementation: Each wall is an infinite half-space PlaneCollider. Infinite planes are always in the broadphase and use signed-distance narrowphase, so they are completely immune to tunneling even when game pieces are launched at very high velocities.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final double
    FRC 2025/2026 field length (blue to red) in metres (54 ft).
    static final double
    FRC 2025/2026 field width in metres (27 ft).
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addField(SimWorld world, double lengthM, double widthM)
    Add a configurable rectangular field (carpet floor + four perimeter wall planes) to world.
    static void
    Add just the carpet floor (infinite plane at Z = 0) to world.
    static void
    Add a standard FRC field (carpet floor + four perimeter wall planes) to world.
    static void
    addWalls(SimWorld world, double lengthM, double widthM)
    Add four perimeter wall planes to world.

    Methods inherited from class java.lang.Object

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

    • FRC_LENGTH_M

      public static final double FRC_LENGTH_M
      FRC 2025/2026 field length (blue to red) in metres (54 ft).
      See Also:
    • FRC_WIDTH_M

      public static final double FRC_WIDTH_M
      FRC 2025/2026 field width in metres (27 ft).
      See Also:
  • Method Details

    • addFrcField

      public static void addFrcField(SimWorld world)
      Add a standard FRC field (carpet floor + four perimeter wall planes) to world.
      Parameters:
      world - the world to populate
    • addField

      public static void addField(SimWorld world, double lengthM, double widthM)
      Add a configurable rectangular field (carpet floor + four perimeter wall planes) to world.
      Parameters:
      world - the world to populate
      lengthM - field length along X (metres)
      widthM - field width along Y (metres)
    • addFloor

      public static void addFloor(SimWorld world)
      Add just the carpet floor (infinite plane at Z = 0) to world.
      Parameters:
      world - the world to populate
    • addWalls

      public static void addWalls(SimWorld world, double lengthM, double widthM)
      Add four perimeter wall planes to world.

      Each wall is a PlaneCollider (infinite half-space) anchored at the corresponding field boundary and oriented so its normal points into the field. Plane colliders have unbounded AABBs and use signed-distance collision tests, making them immune to tunneling at any projectile speed.

      Parameters:
      world - the world to populate
      lengthM - field length along X (metres)
      widthM - field width along Y (metres)