Updated copyright
[sixth-3d.git] / src / main / java / eu / svjatoslav / sixth / e3d / renderer / octree / raytracer / Camera.java
index b762352..a16eb96 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Sixth 3D engine. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine. Copyright ©2012-2019, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of version 3 of the GNU Lesser General Public License
@@ -10,8 +10,8 @@
 package eu.svjatoslav.sixth.e3d.renderer.octree.raytracer;
 
 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
-import eu.svjatoslav.sixth.e3d.geometry.Transform;
 import eu.svjatoslav.sixth.e3d.gui.Avatar;
+import eu.svjatoslav.sixth.e3d.math.Transform;
 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle;
@@ -58,7 +58,7 @@ public class Camera extends TexturedRectangle {
     private void computeCameraCoordinates(final Avatar avatar) {
         initialize(CAMERA_SIZE, CAMERA_SIZE, IMAGE_SIZE, IMAGE_SIZE, 3);
 
-        camCenter = Point3D.ZERO.clone();
+        camCenter = new Point3D();
 
         topLeft.setValues(camCenter.x, camCenter.y, camCenter.z + CAMERA_SIZE);
 
@@ -75,10 +75,8 @@ public class Camera extends TexturedRectangle {
 
         topLeft.rotate(camCenter, -avatar.getAngleXZ(), -avatar.getAngleYZ());
         topRight.rotate(camCenter, -avatar.getAngleXZ(), -avatar.getAngleYZ());
-        bottomLeft
-                .rotate(camCenter, -avatar.getAngleXZ(), -avatar.getAngleYZ());
-        bottomRight.rotate(camCenter, -avatar.getAngleXZ(),
-                -avatar.getAngleYZ());
+        bottomLeft.rotate(camCenter, -avatar.getAngleXZ(), -avatar.getAngleYZ());
+        bottomRight.rotate(camCenter, -avatar.getAngleXZ(), -avatar.getAngleYZ());
 
         final Color cameraColor = new Color(255, 255, 0, 255);
         final LineAppearance appearance = new LineAppearance(2, cameraColor);