projects
/
sixth-3d.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved code readability
[sixth-3d.git]
/
src
/
main
/
java
/
eu
/
svjatoslav
/
sixth
/
e3d
/
gui
/
RenderingContext.java
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
a5f7fb7
..
63ff0d9
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
@@
-13,13
+13,32
@@
import java.awt.image.BufferedImage;
import java.awt.image.DataBufferByte;
import java.awt.image.WritableRaster;
import java.awt.image.DataBufferByte;
import java.awt.image.WritableRaster;
+/**
+ * Rendering context that contains all the information that is needed to render the scene.
+ */
+
public class RenderingContext {
public static final int bufferedImageType = BufferedImage.TYPE_4BYTE_ABGR;
public class RenderingContext {
public static final int bufferedImageType = BufferedImage.TYPE_4BYTE_ABGR;
+
public final Graphics2D graphics;
public final Graphics2D graphics;
+
+ /**
+ * Pixels of the rendering area.
+ * Each pixel is represented by 4 bytes: alpha, blue, green, red.
+ */
public final byte[] pixels;
public final byte[] pixels;
+
+ /**
+ * Width of the rendering area in pixels.
+ */
public final int width;
public final int width;
+
+ /**
+ * Height of the rendering area in pixels.
+ */
public final int height;
public final int height;
+
/**
* Center of the screen in screen space (pixels).
* This is the point where (0,0) coordinate of the world space is rendered.
/**
* Center of the screen in screen space (pixels).
* This is the point where (0,0) coordinate of the world space is rendered.