Improved code readability
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Wed, 22 Feb 2023 22:12:04 +0000 (00:12 +0200)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Wed, 22 Feb 2023 22:12:04 +0000 (00:12 +0200)
21 files changed:
src/main/java/eu/svjatoslav/sixth/e3d/gui/Avatar.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/TextPointer.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/UserRelativityTracker.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/Character.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/LookAndFeel.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/Page.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextEditComponent.java
src/main/java/eu/svjatoslav/sixth/e3d/gui/textEditorComponent/TextLine.java
src/main/java/eu/svjatoslav/sixth/e3d/math/GeometryCoordinate.java
src/main/java/eu/svjatoslav/sixth/e3d/math/Orientation.java
src/main/java/eu/svjatoslav/sixth/e3d/math/Transform.java
src/main/java/eu/svjatoslav/sixth/e3d/math/TransformPipe.java [deleted file]
src/main/java/eu/svjatoslav/sixth/e3d/math/TransformsPipeline.java [new file with mode: 0644]
src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/OctreeVolume.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/octree/raytracer/Ray.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/package-info.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/ShapeCollection.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/AbstractCoordinateShape.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/AbstractShape.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/base/AbstractCompositeShape.java
src/main/java/eu/svjatoslav/sixth/e3d/renderer/raster/shapes/composite/textcanvas/TextCanvas.java

index 9876589..abbf0dd 100755 (executable)
@@ -9,8 +9,16 @@ import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 import static java.lang.Math.cos;
 import static java.lang.Math.sin;
 
+/**
+ * The avatar is a user-controlled object in the 3D world.
+ */
 public class Avatar implements ViewRenderListener {
 
+    /**
+     * Avatar movement speed, relative to the world. When avatar coordinates are
+     * updated within the world, avatar orientation relative to the world is
+     * taken into account.
+     */
     public static final double SPEED_LIMIT = 30;
     /**
      * Just in case we want to adjust global speed for some reason.
@@ -61,6 +69,7 @@ public class Avatar implements ViewRenderListener {
         setAngleYZ(angleYZ);
     }
 
+
     @Override
     public boolean beforeRender(final ViewPanel viewPanel, final int millisecondsSinceLastFrame) {
 
@@ -116,11 +125,21 @@ public class Avatar implements ViewRenderListener {
         return movementVector.getVectorLength();
     }
 
+    /**
+     * Apply friction to avatar movement vector.
+     *
+     * @param millisecondsPassedSinceLastFrame We want avatar movement to be independent of framerate.
+     *                                         Therefore, we take frame rendering time into account when translating
+     *                                         avatar between consecutive frames.
+     */
     private void applyFrictionToUserMovement(int millisecondsPassedSinceLastFrame) {
         for (int i = 0; i < millisecondsPassedSinceLastFrame; i++)
             applyMillisecondFrictionToUserMovementVector();
     }
 
+    /**
+     * Apply friction to avatar movement vector.
+     */
     private void applyMillisecondFrictionToUserMovementVector() {
         getMovementVector().x /= MILLISECOND_FRICTION;
         getMovementVector().y /= MILLISECOND_FRICTION;
@@ -131,7 +150,7 @@ public class Avatar implements ViewRenderListener {
      * Translate coordinates based on avatar movement vector and avatar orientation in the world.
      *
      * @param millisecondsPassedSinceLastFrame We want avatar movement to be independent of framerate.
-     *                                         Therefore we take frame rendering time into account when translating
+     *                                         Therefore, we take frame rendering time into account when translating
      *                                         avatar between consecutive frames.
      */
     private void translateAvatarLocationBasedOnMovementVector(int millisecondsPassedSinceLastFrame) {
index 8ba9f9f..7e2bf74 100755 (executable)
@@ -4,6 +4,9 @@
  */
 package eu.svjatoslav.sixth.e3d.gui;
 
+/**
+ * A pointer to a character in a text.
+ */
 public class TextPointer implements Comparable<TextPointer> {
 
     public int row;
@@ -48,6 +51,15 @@ public class TextPointer implements Comparable<TextPointer> {
 
     }
 
+    /**
+     * Checks if this pointer is between the specified pointers.
+     *
+     * @param start
+     *            The start pointer.
+     * @param end
+     *            The end pointer.
+     * @return True if this pointer is between the specified pointers.
+     */
     public boolean isBetween(final TextPointer start, final TextPointer end) {
 
         if (start == null)
@@ -56,6 +68,7 @@ public class TextPointer implements Comparable<TextPointer> {
         if (end == null)
             return false;
 
+        // Make sure that start is smaller than end.
         TextPointer smaller;
         TextPointer bigger;
 
@@ -67,8 +80,8 @@ public class TextPointer implements Comparable<TextPointer> {
             bigger = start;
         }
 
+        // Check if this pointer is between the specified pointers.
         return (compareTo(smaller) >= 0) && (bigger.compareTo(this) > 0);
-
     }
 
 }
index 69a2947..4ebca1a 100644 (file)
@@ -6,7 +6,7 @@ package eu.svjatoslav.sixth.e3d.gui;
 
 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 import eu.svjatoslav.sixth.e3d.math.GeometryCoordinate;
-import eu.svjatoslav.sixth.e3d.math.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
 
 public class UserRelativityTracker {
 
@@ -19,7 +19,7 @@ public class UserRelativityTracker {
 
     }
 
-    public void analyze(final TransformPipe transformPipe,
+    public void analyze(final TransformsPipeline transformPipe,
                         final RenderingContext renderingContext) {
 
         center.transform(transformPipe, renderingContext);
index 74632b5..3c20ff2 100644 (file)
@@ -4,12 +4,16 @@
  */
 package eu.svjatoslav.sixth.e3d.gui.textEditorComponent;
 
+/**
+ * A character in a text editor.
+ */
 public class Character {
 
+    /**
+     * The character value.
+     */
     char value;
 
-    // TODO: background and foreground colors
-
     public Character(final char value) {
         this.value = value;
     }
index a7bff24..784cdc0 100644 (file)
@@ -6,6 +6,9 @@ package eu.svjatoslav.sixth.e3d.gui.textEditorComponent;
 
 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
 
+/**
+ * A look and feel of a text editor.
+ */
 public class LookAndFeel {
 
     public Color foreground = new Color(255, 255, 255);
index c52fbd7..0f60618 100644 (file)
@@ -7,8 +7,14 @@ package eu.svjatoslav.sixth.e3d.gui.textEditorComponent;
 import java.util.ArrayList;
 import java.util.List;
 
+/**
+ * A page in a text editor.
+ */
 public class Page {
 
+    /**
+     * The text lines.
+     */
     public List<TextLine> rows = new ArrayList<>();
 
     public void ensureMaxTextLine(final int row) {
@@ -16,28 +22,58 @@ public class Page {
             rows.add(new TextLine());
     }
 
+    /**
+     * Returns the character at the specified location.
+     * If the location is out of bounds, returns a space.
+     *
+     * @return The character at the specified location.
+     */
     public char getChar(final int row, final int column) {
         if (rows.size() <= row)
             return ' ';
         return rows.get(row).getCharForLocation(column);
     }
 
+    /**
+     * Returns the specified line.
+     *
+     * @param row
+     *            The line number.
+     * @return The line.
+     */
     public TextLine getLine(final int row) {
         ensureMaxTextLine(row);
         return rows.get(row);
     }
 
+    /**
+     * Returns the length of the specified line.
+     *
+     * @param row
+     *            The line number.
+     * @return The length of the line.
+     */
     public int getLineLength(final int row) {
         if (rows.size() <= row)
             return 0;
         return rows.get(row).getLength();
     }
 
+    /**
+     * Returns the number of lines in the page.
+     *
+     * @return The number of lines in the page.
+     */
     public int getLinesCount() {
         pack();
         return rows.size();
     }
 
+    /**
+     * Returns the text of the page.
+     *
+     * @return The text of the page.
+     */
     public String getText() {
         pack();
 
@@ -58,6 +94,9 @@ public class Page {
         rows.add(row, textLine);
     }
 
+    /**
+     * Removes empty lines from the end of the page.
+     */
     private void pack() {
         int newLength = 0;
 
@@ -73,12 +112,26 @@ public class Page {
         rows = rows.subList(0, newLength);
     }
 
+    /**
+     * Removes the specified character from the page.
+     *
+     * @param row
+     *            The line number.
+     * @param col
+     *            The character number.
+     */
     public void removeCharacter(final int row, final int col) {
         if (rows.size() <= row)
             return;
         getLine(row).removeCharacter(col);
     }
 
+    /**
+     * Removes the specified line from the page.
+     *
+     * @param row
+     *            The line number.
+     */
     public void removeLine(final int row) {
         if (rows.size() <= row)
             return;
index 93c0535..44b19aa 100755 (executable)
@@ -28,14 +28,25 @@ public class TextEditComponent extends GuiComponent implements ClipboardOwner {
      */
     private final Set<Integer> dirtyRows = new HashSet<>();
 
+
     private final TextCanvas textCanvas;
     public int scrolledCharacters = 0, scrolledLines = 0;
     public boolean selecting = false;
+
+    /**
+     * Selection start and end pointers.
+     */
     public TextPointer selectionStart = new TextPointer(0, 0);
     public TextPointer selectionEnd = new TextPointer(0, 0);
+
+
     public TextPointer cursorLocation = new TextPointer(0, 0);
     Page page = new Page();
     LookAndFeel lookAndFeel;
+
+    /**
+     * If true, the page will be repainted on the next update.
+     */
     boolean repaintPage = false;
 
     public TextEditComponent(final Transform transform,
@@ -589,13 +600,6 @@ public class TextEditComponent extends GuiComponent implements ClipboardOwner {
         dirtyRows.clear();
     }
 
-    // public void setCaret(final int x, final int y) {
-    // selecting = false;
-    // cursorLocation.column = (x / characterWidth) + scrolledCharacters;
-    // cursorLocation.row = (y / characterHeight) + scrolledLines;
-    // repaintPage();
-    // }
-
     /**
      * Scroll full page to given amount of lines or charancters.
      */
index aa7d4e2..240ac29 100755 (executable)
@@ -43,6 +43,7 @@ public class TextLine {
         return result.toString();
     }
 
+
     public void cutFromBeginning(int charactersToCut) {
 
         if (charactersToCut > chars.size())
index e159295..af3d3d3 100644 (file)
@@ -8,10 +8,24 @@ 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;
@@ -28,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)
index 714b781..86db200 100644 (file)
@@ -8,9 +8,17 @@ import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 
 public class Orientation implements Cloneable {
 
+
     private double s1, c1, s2, c2;
 
+    /**
+     * The angle of rotation around the XZ axis.
+     */
     private double angleXZ = 0;
+
+    /**
+     * The angle of rotation around the YZ axis.
+     */
     private double angleYZ = 0;
 
     public Orientation() {
@@ -28,6 +36,9 @@ public class Orientation implements Cloneable {
         return new Orientation(angleXZ, angleYZ);
     }
 
+    /**
+     * Computes the sine and cosine of the angles.
+     */
     private void computeMultipliers() {
         s1 = Math.sin(angleXZ);
         c1 = Math.cos(angleXZ);
index 48bf284..94c359c 100755 (executable)
@@ -16,11 +16,27 @@ public class Transform implements Cloneable {
         orientation = new Orientation();
     }
 
+    /**
+     * Creates a new transform with the specified translation.
+     *
+     * @param translation
+     *            the translation
+     */
     public Transform(final Point3D translation) {
         this.translation = translation;
         orientation = new Orientation();
     }
 
+    /**
+     * Creates a new transform with the specified translation and orientation.
+     *
+     * @param translation
+     *            the translation
+     * @param angleXZ
+     *            the angle around the XZ axis
+     * @param angleYZ
+     *            the angle around the YZ axis
+     */
     public Transform(final Point3D translation, final double angleXZ,
                      final double angleYZ) {
 
@@ -28,6 +44,14 @@ public class Transform implements Cloneable {
         orientation = new Orientation(angleXZ, angleYZ);
     }
 
+    /**
+     * Creates a new transform with the specified translation and orientation.
+     *
+     * @param translation
+     *            the translation
+     * @param orientation
+     *            the orientation
+     */
     public Transform(final Point3D translation, final Orientation orientation) {
         this.translation = translation;
         this.orientation = orientation;
diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/math/TransformPipe.java b/src/main/java/eu/svjatoslav/sixth/e3d/math/TransformPipe.java
deleted file mode 100644 (file)
index 5b766a2..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * 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.Point3D;
-
-public class TransformPipe {
-
-    private Transform[] transforms = new Transform[100];
-
-    private int transformsCount = 0;
-
-    public void addTransform(final Transform transform) {
-        transforms[transformsCount] = transform;
-        transformsCount++;
-    }
-
-    public void clear() {
-        transformsCount = 0;
-    }
-
-    public void dropTransform() {
-        transformsCount--;
-    }
-
-    public void transform(final Point3D source, final Point3D destination) {
-
-        destination.clone(source);
-
-        for (int i = transformsCount - 1; i >= 0; i--)
-            transforms[i].transform(destination);
-    }
-}
diff --git a/src/main/java/eu/svjatoslav/sixth/e3d/math/TransformsPipeline.java b/src/main/java/eu/svjatoslav/sixth/e3d/math/TransformsPipeline.java
new file mode 100644 (file)
index 0000000..4e9985f
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * 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.Point3D;
+
+public class TransformsPipeline {
+
+
+    private Transform[] transforms = new Transform[100];
+
+    /**
+     * The number of transforms in the pipeline.
+     */
+    private int transformsCount = 0;
+
+    /**
+     * Adds a transform to the pipeline.
+     *
+     * @param transform
+     *            The transform to add.
+     */
+    public void addTransform(final Transform transform) {
+        transforms[transformsCount] = transform;
+        transformsCount++;
+    }
+
+    /**
+     * Clears the pipeline.
+     */
+    public void clear() {
+        transformsCount = 0;
+    }
+
+    /**
+     * Drops the last transform from the pipeline.
+     */
+    public void dropTransform() {
+        transformsCount--;
+    }
+
+    /**
+     * Transforms a point.
+     *
+     * @param orinigalPoint
+     *            Original point to transform. Original point is not modified.
+     * @param transformedPoint
+     *            Transformed point.
+     */
+    public void transform(final Point3D orinigalPoint, final Point3D transformedPoint) {
+
+        transformedPoint.clone(orinigalPoint);
+
+        // apply transforms in reverse order
+        for (int i = transformsCount - 1; i >= 0; i--)
+            transforms[i].transform(transformedPoint);
+    }
+}
index 87c42c7..27b9488 100755 (executable)
@@ -26,13 +26,17 @@ import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.basic.line.LineAppearance;
 
 public class OctreeVolume {
 
+    // cell is not hit by the ray
     public static final int TRACE_NO_HIT = -1;
-    /**
-     * Single solid color.
-     */
+
+    // solid cell (contains color and illumination)
     private static final int CELL_STATE_SOLID = -2;
+
+    // unused cell
     private static final int CELL_STATE_UNUSED = -1;
     final LineAppearance factory = new LineAppearance();
+
+
     public int ce1[];
     public int ce2[];
     public int ce3[];
@@ -406,8 +410,9 @@ public class OctreeVolume {
     }
 
     /**
-     * @return intersecting cell pointer or -1 if no cell in intersecting this
-     * ray.
+     * Trace ray through the world and return pointer to intersecting cell.
+     *
+     * @return pointer to intersecting cell or TRACE_NO_HIT if no intersection.
      */
     public int traceCell(final int cellX, final int cellY, final int cellZ,
                          final int cellSize, final int pointer, final Ray ray) {
index b0dec82..02f21a7 100755 (executable)
@@ -6,35 +6,20 @@ package eu.svjatoslav.sixth.e3d.renderer.octree.raytracer;
 
 public class Ray {
 
+    // ray origin
     public double x, y, z;
 
+    // ray direction
     public double xp, yp, zp;
 
+    // ray hit point
     public double hitX, hitY, hitZ;
 
+
     public int hitCellSize;
 
     public int hitCellX, hitCellY, hitCellZ;
 
-    /*
-     * public int orientation;
-     *
-     * public static final int ORIENTATION_RIGHT = 0;
-     *
-     * public static final int ORIENTATION_LEFT = 1;
-     *
-     * public static final int ORIENTATION_DOWN = 2;
-     *
-     * public static final int ORIENTATION_UP = 3;
-     *
-     * public static final int ORIENTATION_FORWARD = 4;
-     *
-     * public static final int ORIENTATION_BACK = 5;
-     *
-     * public static final String orientations[] = { "RIGHT", "LEFT", "DOWN",
-     * "UP", "FORWARD", "BACK" };
-     */
-
     public Ray(final double X, final double Y, final double Z, final double Xp,
                final double Yp, final double Zp) {
         x = X;
@@ -43,30 +28,13 @@ public class Ray {
         xp = Xp;
         yp = Yp;
         zp = Zp;
-        // calculateOrientation();
     }
 
-    /*
-     * public void calculateOrientation() { float axp = Math.abs(xp); float ayp
-     * = Math.abs(yp); float azp = Math.abs(zp);
-     *
-     * if (axp > ayp) { if (axp > azp) { if (xp > 0) { orientation =
-     * ORIENTATION_RIGHT; } else { orientation = ORIENTATION_LEFT; } } else { if
-     * (zp > 0) { orientation = ORIENTATION_FORWARD; } else { orientation =
-     * ORIENTATION_BACK; } } } else { if (ayp > azp) { if (yp > 0) { orientation
-     * = ORIENTATION_DOWN; } else { orientation = ORIENTATION_UP; } } else { if
-     * (zp > 0) { orientation = ORIENTATION_FORWARD; } else { orientation =
-     * ORIENTATION_BACK; } } }
-     *
-     *
-     * }
-     */
+
     @Override
     public String toString() {
         return "Ray \n" + "    x " + x + "\n" + "      y " + y + "\n" + "      z " + z
                 + "\n" + "     xp " + xp + "\n" + "    yp " + yp + "\n" + "    zp " + zp
-                + "\n"; /*
-         * + " orientation " + orientations[orientation];
-         */
+                + "\n";
     }
 }
index 98b9af4..d93100b 100755 (executable)
@@ -2,8 +2,8 @@
  * Sixth 3D engine. Author: Svjatoslav Agejenko. 
  * This project is released under Creative Commons Zero (CC0) license.
  *
-*
  * Various 3D renderers utilizing different rendering approaches.
+ *
  */
 
 package eu.svjatoslav.sixth.e3d.renderer;
index ea14935..302abc1 100755 (executable)
@@ -9,7 +9,7 @@ import eu.svjatoslav.sixth.e3d.gui.Avatar;
 import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
 import eu.svjatoslav.sixth.e3d.gui.ViewPanel;
 import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.math.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape;
 
 import java.util.ArrayList;
@@ -19,7 +19,7 @@ import java.util.List;
 public class ShapeCollection {
 
     private final RenderAggregator aggregator = new RenderAggregator();
-    private final TransformPipe transformPipe = new TransformPipe();
+    private final TransformsPipeline transformPipe = new TransformsPipeline();
     private final List<AbstractShape> shapes = new ArrayList<>();
 
     public synchronized void addShape(final AbstractShape shape) {
index 30384e6..649e546 100644 (file)
@@ -7,7 +7,7 @@ package eu.svjatoslav.sixth.e3d.renderer.raster.shapes;
 import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
 import eu.svjatoslav.sixth.e3d.math.GeometryCoordinate;
-import eu.svjatoslav.sixth.e3d.math.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
 import eu.svjatoslav.sixth.e3d.renderer.raster.RenderAggregator;
 
 import java.util.concurrent.atomic.AtomicInteger;
@@ -43,7 +43,7 @@ public abstract class AbstractCoordinateShape extends AbstractShape {
     public abstract void paint(RenderingContext renderBuffer);
 
     @Override
-    public void transform(final TransformPipe transforms,
+    public void transform(final TransformsPipeline transforms,
                           final RenderAggregator aggregator,
                           final RenderingContext renderingContext) {
 
index 4f17cd3..4c1aba3 100644 (file)
@@ -6,7 +6,7 @@ package eu.svjatoslav.sixth.e3d.renderer.raster.shapes;
 
 import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
 import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController;
-import eu.svjatoslav.sixth.e3d.math.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
 import eu.svjatoslav.sixth.e3d.renderer.raster.RenderAggregator;
 
 public abstract class AbstractShape {
@@ -18,7 +18,7 @@ public abstract class AbstractShape {
         this.mouseInteractionController = mouseInteractionController;
     }
 
-    public abstract void transform(final TransformPipe transforms,
+    public abstract void transform(final TransformsPipeline transforms,
                                    final RenderAggregator aggregator,
                                    final RenderingContext renderingContext);
 
index f952a4a..184d57a 100644 (file)
@@ -9,7 +9,7 @@ import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
 import eu.svjatoslav.sixth.e3d.gui.UserRelativityTracker;
 import eu.svjatoslav.sixth.e3d.gui.humaninput.MouseInteractionController;
 import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.math.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
 import eu.svjatoslav.sixth.e3d.renderer.raster.RenderAggregator;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.AbstractShape;
@@ -64,7 +64,7 @@ public class AbstractCompositeShape extends AbstractShape {
      * This method should be overridden by anyone wanting to customize shape
      * before it is rendered.
      */
-    public void beforeTransformHook(final TransformPipe transformPipe,
+    public void beforeTransformHook(final TransformsPipeline transformPipe,
                                     final RenderingContext context) {
     }
 
@@ -194,7 +194,7 @@ public class AbstractCompositeShape extends AbstractShape {
     }
 
     @Override
-    public void transform(final TransformPipe transformPipe,
+    public void transform(final TransformsPipeline transformPipe,
                           final RenderAggregator aggregator, final RenderingContext context) {
 
         // add current composite shape transform to the end of the transform
index 7945a54..fd78bf9 100644 (file)
@@ -8,7 +8,7 @@ import eu.svjatoslav.sixth.e3d.geometry.Point3D;
 import eu.svjatoslav.sixth.e3d.gui.RenderingContext;
 import eu.svjatoslav.sixth.e3d.gui.TextPointer;
 import eu.svjatoslav.sixth.e3d.math.Transform;
-import eu.svjatoslav.sixth.e3d.math.TransformPipe;
+import eu.svjatoslav.sixth.e3d.math.TransformsPipeline;
 import eu.svjatoslav.sixth.e3d.renderer.raster.Color;
 import eu.svjatoslav.sixth.e3d.renderer.raster.shapes.composite.TexturedRectangle;
 
@@ -118,7 +118,7 @@ public class TextCanvas extends TexturedRectangle {
     }
 
     @Override
-    public void beforeTransformHook(final TransformPipe transformPipe,
+    public void beforeTransformHook(final TransformsPipeline transformPipe,
                                     final RenderingContext context) {
 
         final double textRelativeSize = context.width