X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fgui%2FUserRelativityTracker.java;h=48b1016d96a5a1e500498938126786cfdbac9796;hb=a38bc412f8c6ae6c8fdf9466ae9b2073c2a73614;hp=175c10a376db99223f74a5879482ea836d01bc9b;hpb=baab2e2c2ad89695293f3136311c585c9a5afed1;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 175c10a..48b1016 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java @@ -1,44 +1,38 @@ /* - * 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 - * 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.gui; -import eu.svjatoslav.sixth.e3d.math.GeometryCoordinate; import eu.svjatoslav.sixth.e3d.geometry.Point3D; -import eu.svjatoslav.sixth.e3d.math.TransformPipe; +import eu.svjatoslav.sixth.e3d.math.TransformsStack; +import eu.svjatoslav.sixth.e3d.math.Vertex; public class UserRelativityTracker { private final static int minimalSliceFactor = 5; - public GeometryCoordinate center = new GeometryCoordinate(); - public GeometryCoordinate right; - public GeometryCoordinate down; + public Vertex center = new Vertex(); + public Vertex right; + public Vertex down; public UserRelativityTracker() { } - public void analyze(final TransformPipe transformPipe, + public void analyze(final TransformsStack transformPipe, final RenderingContext renderingContext) { - center.transform(transformPipe, renderingContext); + center.calculateLocationRelativeToViewer(transformPipe, renderingContext); if (right != null) { - right.transform(transformPipe, renderingContext); - down.transform(transformPipe, renderingContext); + right.calculateLocationRelativeToViewer(transformPipe, renderingContext); + down.calculateLocationRelativeToViewer(transformPipe, renderingContext); } } public void enableOrientationTracking() { - right = new GeometryCoordinate(new Point3D(10, 0, 0)); - down = new GeometryCoordinate(new Point3D(0, 10, 0)); + right = new Vertex(new Point3D(10, 0, 0)); + down = new Vertex(new Point3D(0, 10, 0)); } public double getAngleXY() {