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
/
renderer
/
octree
/
raytracer
/
LightSource.java
diff --git
a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/LightSource.java
b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/LightSource.java
index
0efe65b
..
c0939d7
100755
(executable)
--- a/
src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/LightSource.java
+++ b/
src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/LightSource.java
@@
-1,5
+1,5
@@
/*
/*
- * Sixth 3D engine. Author: Svjatoslav Agejenko.
+ * Sixth 3D engine. Author: Svjatoslav Agejenko.
* This project is released under Creative Commons Zero (CC0) license.
*/
package eu.svjatoslav.sixth.e3d.renderer.octree.raytracer;
* This project is released under Creative Commons Zero (CC0) license.
*/
package eu.svjatoslav.sixth.e3d.renderer.octree.raytracer;
@@
-7,20
+7,27
@@
package eu.svjatoslav.sixth.e3d.renderer.octree.raytracer;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.geometry.Point3D;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
+/**
+ * Represents light source.
+ */
public class LightSource {
public class LightSource {
- public int x, y, z;
-
+ /**
+ * Light source color.
+ */
public Color color;
public Color color;
-
+ /**
+ * Light source brightness.
+ */
public float brightness;
public float brightness;
+ /**
+ * Light source location.
+ */
+ Point3D location;
public LightSource(final Point3D location, final Color color,
final float Brightness) {
public LightSource(final Point3D location, final Color color,
final float Brightness) {
- x = (int) location.x;
- y = (int) location.y;
- z = (int) location.z;
-
+ this.location = location;
this.color = color;
brightness = Brightness;
}
this.color = color;
brightness = Brightness;
}