Package de.tum.cit.ase.editor.utlis
Class Helper
java.lang.Object
de.tum.cit.ase.editor.utlis.Helper
The Helper class provides utility methods for converting between Vector2 and GridPoint2 objects.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TileTypes[][]
Clones a 2D grid of TileTypes.static com.badlogic.gdx.math.Vector2
convertGridPointToVector2
(com.badlogic.gdx.math.GridPoint2 gridPoint2) Converts a GridPoint2 object to a Vector2 object.static com.badlogic.gdx.math.GridPoint2
convertVector2ToGridPoint
(com.badlogic.gdx.math.Vector2 vector2) Converts a Vector2 object to a GridPoint2 object.
-
Constructor Details
-
Helper
public Helper()
-
-
Method Details
-
convertVector2ToGridPoint
public static com.badlogic.gdx.math.GridPoint2 convertVector2ToGridPoint(com.badlogic.gdx.math.Vector2 vector2) Converts a Vector2 object to a GridPoint2 object.- Parameters:
vector2
- the Vector2 object to convert- Returns:
- the converted GridPoint2 object
-
convertGridPointToVector2
public static com.badlogic.gdx.math.Vector2 convertGridPointToVector2(com.badlogic.gdx.math.GridPoint2 gridPoint2) Converts a GridPoint2 object to a Vector2 object.- Parameters:
gridPoint2
- the GridPoint2 object to convert- Returns:
- the converted Vector2 object
-
cloneGrid
Clones a 2D grid of TileTypes.- Parameters:
gridToCLone
- the grid to clone- Returns:
- the cloned grid
-