projects
/
sixth-3d.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
037f1a2
)
Improved code readability
author
Svjatoslav Agejenko
<svjatoslav@svjatoslav.eu>
Mon, 8 May 2023 23:24:14 +0000
(
02:24
+0300)
committer
Svjatoslav Agejenko
<svjatoslav@svjatoslav.eu>
Mon, 8 May 2023 23:24:14 +0000
(
02:24
+0300)
src/main/java/eu/svjatoslav/sixth/e3d/geometry/package-info.java
[new file with mode: 0644]
patch
|
blob
src/main/java/eu/svjatoslav/sixth/e3d/gui/Avatar.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/gui/RenderingContext.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/gui/ViewFrame.java
patch
|
blob
|
history
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/package-info.java
patch
|
blob
|
history
diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/geometry/package-info.java
b/src/main/java/eu/svjatoslav/sixth/e3d/geometry/package-info.java
new file mode 100644
(file)
index 0000000..
9423419
--- /dev/null
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/geometry/package-info.java
@@ -0,0
+1,5
@@
+package eu.svjatoslav.sixth.e3d.geometry;
+
+/**
+ * Goal is to provide basic geometry classes.
+ */
\ No newline at end of file
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/gui/Avatar.java
b/src/main/java/eu/svjatoslav/sixth/e3d/gui/Avatar.java
index
abbf0dd
..
f2d58c9
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/gui/Avatar.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/gui/Avatar.java
@@
-11,6
+11,9
@@
import static java.lang.Math.sin;
/**
* The avatar is a user-controlled object in the 3D world.
/**
* The avatar is a user-controlled object in the 3D world.
+ *
+ * It is a point in space that can be moved around by the user.
+ * It has orientation in space, and it can also be rotated around.
*/
public class Avatar implements ViewRenderListener {
*/
public class Avatar implements ViewRenderListener {
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.
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/gui/ViewFrame.java
b/src/main/java/eu/svjatoslav/sixth/e3d/gui/ViewFrame.java
index
6a824c8
..
a7b0445
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/gui/ViewFrame.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/gui/ViewFrame.java
@@
-12,7
+12,7
@@
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
/**
import java.awt.event.WindowListener;
/**
- * Java Swing GUI frame that contains canvas for 3D rendering.
+ * Java Swing GUI frame that contains
{@link ViewPanel} with
canvas for 3D rendering.
*/
public class ViewFrame extends JFrame implements WindowListener {
*/
public class ViewFrame extends JFrame implements WindowListener {
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/package-info.java
b/src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/package-info.java
index
3773a0a
..
ff8dff5
100644
(file)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/package-info.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/package-info.java
@@
-1,7
+1,5
@@
package eu.svjatoslav.sixth.e3d.gui.textEditorComponent;
/**
package eu.svjatoslav.sixth.e3d.gui.textEditorComponent;
/**
- * This package contains a text editor component.
- *
- * It is a simple text editor.
+ * This package contains a simple text editor component.
*/
\ No newline at end of file
*/
\ No newline at end of file