/*
- * Sixth 3D engine. Copyright ©2012-2016, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
+ * Sixth 3D engine. Copyright ©2012-2018, 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
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.math.Transform;
import eu.svjatoslav.sixth.e3d.gui.Avatar;
import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
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);
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);