*/
package eu.svjatoslav.sixth.e3d.gui;
+import eu.svjatoslav.sixth.e3d.geometry.Point2D;
import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseEvent;
import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController;
public final byte[] pixels;
public final int width;
public final int height;
- public final int xCenter;
- public final int yCenter;
+ /**
+ * Center of the screen in screen space (pixels).
+ * This is the point where (0,0) coordinate of the world space is rendered.
+ */
+ public final Point2D centerCoordinate;
+
public final double zoom;
final BufferedImage bufferedImage;
public int frameNumber = 0;
public RenderingContext(final int width, final int height) {
this.width = width;
this.height = height;
-
- this.xCenter = width / 2;
- this.yCenter = height / 2;
-
+ this.centerCoordinate = new Point2D(width / 2d, height / 2d);
this.zoom = width / 3d;
bufferedImage = new BufferedImage(width, height, bufferedImageType);