X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FRenderingContext.java;fp=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FRenderingContext.java;h=c5c42f602a578d16a7a910ae60e365cfc1189f7f;hp=ce8c4a00d4fa4493801098b5e63bf5ed938c1538;hb=a38bc412f8c6ae6c8fdf9466ae9b2073c2a73614;hpb=de8fb260a5e99922231b1d0f437916e796ec6ccb
diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java b/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
index ce8c4a0..c5c42f6 100644
--- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
+++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
@@ -26,8 +26,15 @@ public class RenderingContext {
*/
public final Point2D centerCoordinate;
+ /**
+ * Zoom factor. The bigger the value, the more zoomed in the view is.
+ */
public final double zoom;
final BufferedImage bufferedImage;
+ /**
+ * Number of frame that is currently being rendered.
+ * Every frame has its own number.
+ */
public int frameNumber = 0;
/**
@@ -42,8 +49,13 @@ public class RenderingContext {
/**
* Mouse click event that needs to be processed.
+ * This event is processed only once per frame.
+ * If there are multiple objects under mouse cursor, the top-most object will receive the event.
+ * If there are no objects under mouse cursor, the event will be ignored.
+ * If there is no event, this field will be null.
+ * This field is set to null after the event is processed.
*/
- private MouseEvent mouseEvent;
+ private MouseEvent mouseEvent;
public void setMouseEvent(MouseEvent mouseEvent) {
this.mouseEvent = mouseEvent;
@@ -54,7 +66,7 @@ public class RenderingContext {
}
/**
- * Item that user clicked on.
+ * UI component that mouse is currently hovering over.
*/
private MouseInteractionController currentObjectUnderMouseCursor;
@@ -85,7 +97,7 @@ public class RenderingContext {
}
/**
- * @return true
if view repaint is needed.
+ * @return true
if view update is needed as a consequence of this mouse event.
*/
public boolean handlePossibleComponentMouseEvent() {
if (mouseEvent == null) return false;