X-Git-Url: http://www2.svjatoslav.eu/gitweb/?p=sixth-3d.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FUserRelativityTracker.java;h=ae6d46418f27d35281746b303038a8d422de60dd;hp=00c8832ca8d5956ba6ce6c7812867cc8eb50744a;hb=59baa428fb2d9e7f0fe5423f4cea47f2d6245914;hpb=03447008b8ee26a6463d2cd03005dc26464863db diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java b/src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java index 00c8832..ae6d464 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java @@ -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,13 +10,13 @@ package eu.svjatoslav.sixth.e3d.gui; -import eu.svjatoslav.sixth.e3d.geometry.GeometryCoordinate; import eu.svjatoslav.sixth.e3d.geometry.Point3D; -import eu.svjatoslav.sixth.e3d.geometry.TransformPipe; +import eu.svjatoslav.sixth.e3d.math.GeometryCoordinate; +import eu.svjatoslav.sixth.e3d.math.TransformPipe; public class UserRelativityTracker { - public final static int minimalSliceFactor = 5; + private final static int minimalSliceFactor = 5; public GeometryCoordinate center = new GeometryCoordinate(); public GeometryCoordinate right; public GeometryCoordinate down; @@ -57,8 +57,7 @@ public class UserRelativityTracker { } public double getDistanceToUser() { - return center.transformedCoordinate - .getDistanceTo(Point3D.ZERO); + return center.transformedCoordinate.getVectorLength(); } public double proposeSliceFactor() {