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