Class CoordinateSystemTranslator

java.lang.Object
blockly_robot.robot.gui.map.CoordinateSystemTranslator

public class CoordinateSystemTranslator extends Object
  • Field Details

    • rows

      public int rows
      Anzahl an Reihen (y-Richtung bzw. Höhe)
    • cols

      public int cols
      Anzahl an Spalten (x-Richtung bzw. Breite)
    • x

      public double x
      Die x-Koordinate des linken unteren Ecks, an dem das Gitter im Engine-Alpha-Koordinatensystem verankert ist.
    • y

      public double y
      Die y-Koordinate des linken unteren Ecks, an dem das Gitter im Engine-Alpha-Koordinatensystem verankert ist.
  • Constructor Details

    • CoordinateSystemTranslator

      public CoordinateSystemTranslator(int rows, int cols, double x, double y)
    • CoordinateSystemTranslator

      public CoordinateSystemTranslator(int rows, int cols)
  • Method Details

    • setPosition

      public void setPosition(double x, double y)
    • row0y

      public double row0y()
      y-Koordinate des Ursprungs des Gitters (links oben)
    • toRow

      public int toRow(double y)
    • toCol

      public int toCol(double x)
    • toX

      public double toX(int col)
    • toY

      public double toY(int row)
    • toPoint

      public Coords toPoint(Vector vector)
      Parameters:
      vector - Ein Punkt im Engine-Alpha-Koordinatensystem.
    • toPoint

      public Coords toPoint(double x, double y)
    • toVector

      public Vector toVector(Coords point)
    • toVector

      public Vector toVector(int row, int col)