2 * Sixth 3D engine. Author: Svjatoslav Agejenko.
3 * This project is released under Creative Commons Zero (CC0) license.
5 package eu.svjatoslav.sixth.e3d.gui.humaninput;
7 import eu.svjatoslav.sixth.e3d.geometry.Point2D;
10 * Represents mouse event.
12 public class MouseEvent {
15 * Mouse coordinate in screen space (pixels) relative to top left corner of the screen
16 * when mouse button was clicked.
18 public Point2D coordinate;
22 * 0 - mouse over (no button pressed)
23 * 1 - left mouse button
24 * 2 - middle mouse button
25 * 3 - right mouse button
30 MouseEvent(final int x, final int y, final int button) {
31 this(new Point2D(x, y), button);
34 MouseEvent(final Point2D coordinate, final int button) {
35 this.coordinate = coordinate;
40 public String toString() {
41 return "MouseEvent{" +
42 "coordinate=" + coordinate +
43 ", button=" + button +