X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FUserRelativityTracker.java;h=8bd1d8d7ada0c2a2e5bd22a519376e0803ee42f2;hb=6b39de1e9e80433b78ae731845551e742718d613;hp=d18332533f2c8ce10b1e758daad663321f6b59c9;hpb=dcdff57f0bab42387b2e4e215778d9e8efc60221;p=sixth-3d.git 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 d183325..8bd1d8d 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-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu + * Sixth 3D engine. Copyright ©2012-2020, 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() {