Class Circle

java.lang.Object
frc.spectrumLib.sim.Circle

public class Circle extends Object
Draws a circle in a Mechanism2d canvas as a ring of evenly spaced radial ligaments. RollerSim uses it to show the roller's spin state by color.
  • Constructor Details

  • Method Details

    • drawCircle

      public void drawCircle()
    • drawViz

      public void drawViz()
      Appends a white radius line, so the spin direction is visible in the canvas.
    • setBackgroundColor

      public void setBackgroundColor(Color8Bit color)
    • setHalfBackground

      public void setHalfBackground(Color8Bit color8Bit, Color8Bit color8Bit2)
      Alternates two colors across the radial lines, which reads as a two-tone circle.
      Parameters:
      color8Bit - color for even-indexed lines
      color8Bit2 - color for odd-indexed lines
    • getCircleBackground

      public MechanismLigament2d[] getCircleBackground()
    • getBackgroundLines

      public int getBackgroundLines()
    • setColor

      public void setColor(Color8Bit color)
      Color new background lines get when the circle is drawn.
    • setName

      public void setName(String name)