Class CoordinateHelper
This class serves as a util to align provided coordinates from unity with a JavaFX pane to draw on.
Inheritance
java.lang.Object
CoordinateHelper
Inherited Members
java.lang.Object.clone()
java.lang.Object.equals(java.lang.Object)
java.lang.Object.finalize()
java.lang.Object.getClass()
java.lang.Object.hashCode()
java.lang.Object.notify()
java.lang.Object.notifyAll()
java.lang.Object.toString()
java.lang.Object.wait()
java.lang.Object.wait(long)
java.lang.Object.wait(long,int)
Namespace:
Assembly: .dll
Syntax
public class CoordinateHelper
Constructors
CoordinateHelper(Rectangle mapRectangle, double drawPaneHeight, double drawPaneWidth, Vector2<Double> standardIconVector, Vector2<Double> offsetVector)
Constructs a CoordinateHelper with specific boundary information.
Declaration
public CoordinateHelper(Rectangle mapRectangle, double drawPaneHeight, double drawPaneWidth, Vector2<Double> standardIconVector, Vector2<Double> offsetVector)
Parameters
Type | Name | Description |
---|---|---|
Rectangle | mapRectangle | the rectangle model of the unity game. |
double | drawPaneHeight | the height of the draw pane elements shall be positioned on. |
double | drawPaneWidth | the width of the draw pane elements shall be positioned on. |
Vector2<java.lang.Double> | standardIconVector | the vector of the used icon size, that is necessary for centering the visuals in the view. |
Vector2<java.lang.Double> | offsetVector | the vector used to provide some offset for the calculation if a sent map image has empty space on X or Y axis. |
Methods
translateAccordingToMap(Vector2<Double> coordinatesUnity, boolean isIcon)
Declaration
public Vector2<Double> translateAccordingToMap(Vector2<Double> coordinatesUnity, boolean isIcon)
Parameters
Type | Name | Description |
---|---|---|
Vector2<java.lang.Double> | coordinatesUnity | the coordinates provided by unity. |
boolean | isIcon |
Returns
Type | Description |
---|---|
Vector2<java.lang.Double> | the vector that can be used for positioning in JavaFX |