Package blockly_robot.robot.gui.map
Class CoordinateSystemTranslator
java.lang.Object
blockly_robot.robot.gui.map.CoordinateSystemTranslator
-
Field Summary
FieldsModifier and TypeFieldDescriptionintAnzahl an Spalten (x-Richtung bzw.intAnzahl an Reihen (y-Richtung bzw.doubleDie x-Koordinate des linken unteren Ecks, an dem das Gitter im Engine-Alpha-Koordinatensystem verankert ist.doubleDie y-Koordinate des linken unteren Ecks, an dem das Gitter im Engine-Alpha-Koordinatensystem verankert ist. -
Constructor Summary
ConstructorsConstructorDescriptionCoordinateSystemTranslator(int rows, int cols) CoordinateSystemTranslator(int rows, int cols, double x, double y) -
Method Summary
-
Field Details
-
rows
public int rowsAnzahl an Reihen (y-Richtung bzw. Höhe) -
cols
public int colsAnzahl an Spalten (x-Richtung bzw. Breite) -
x
public double xDie x-Koordinate des linken unteren Ecks, an dem das Gitter im Engine-Alpha-Koordinatensystem verankert ist. -
y
public double yDie 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
- Parameters:
vector- Ein Punkt im Engine-Alpha-Koordinatensystem.
-
toPoint
-
toVector
-