X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Feu%2Fsvjatoslav%2Fsixth%2Fe3d%2Fmath%2FGeometryCoordinate.java;h=af3d3d39e714b6d37de26b9210b17cc83c6b7009;hb=a377e3094d304bbc815b36edc2eb303ec023ea48;hp=d95717cf384df9e2b446c2dd4af5a090a2547fd1;hpb=baab2e2c2ad89695293f3136311c585c9a5afed1;p=sixth-3d.git diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/math/GeometryCoordinate.java b/src/main/java/eu/svjatoslav/sixth/e3d/math/GeometryCoordinate.java index d95717c..af3d3d3 100644 --- a/src/main/java/eu/svjatoslav/sixth/e3d/math/GeometryCoordinate.java +++ b/src/main/java/eu/svjatoslav/sixth/e3d/math/GeometryCoordinate.java @@ -1,22 +1,31 @@ /* - * 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.math; import eu.svjatoslav.sixth.e3d.geometry.Point2D; import eu.svjatoslav.sixth.e3d.geometry.Point3D; import eu.svjatoslav.sixth.e3d.gui.RenderingContext; +/** + * A point in 3D space with a transformed and on-screen coordinates. + */ public class GeometryCoordinate { + /** + * The original coordinate. + */ public Point3D coordinate; + + /** + * The transformed coordinate. + */ public Point3D transformedCoordinate; + + /** + * The on-screen coordinate. + */ public Point2D onScreenCoordinate; private int lastTransformedFrame; @@ -33,7 +42,15 @@ public class GeometryCoordinate { onScreenCoordinate = new Point2D(); } - public void transform(final TransformPipe transforms, + /** + * Transforms the coordinate. + * + * @param transforms + * The transform pipe. + * @param renderContext + * The rendering context. + */ + public void transform(final TransformsPipeline transforms, final RenderingContext renderContext) { if (lastTransformedFrame == renderContext.frameNumber)