--- /dev/null
+/*
+ * 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.
+ *
+ */
+
+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);
+ }
+}