X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Frenderer%2Foctree%2Fraytracer%2FCamera.java;h=dabc9db81b55c05bbf01f6e97f0cbd502dbec208;hb=197ac1b87328bb5b06ba52d3768af04b2007b087;hp=07a7909b5be087dee0a428839764a32ef65e457d;hpb=6213716671ccab6b7256de41838e1f5401ce173c;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/Camera.java b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/Camera.java index 07a7909..dabc9db 100755 --- a/src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/Camera.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/Camera.java @@ -1,17 +1,15 @@ /* - * Sixth - System for data storage, computation, exploration and interaction. - * Copyright ©2012-2016, 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 - * or later as published by the Free Software Foundation. + * Sixth 3D engine. Author: Svjatoslav Agejenko. + * This project is released under Creative Commons Zero (CC0) license. + * +* */ 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 +56,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 +73,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);