Commit 77d2c638 authored by Timothy  Borunov's avatar Timothy Borunov
Browse files

Made handle operate independent of static arrays, so only manual work still...

Made handle operate independent of static arrays, so only manual work still needed is adding original objects at the beginning
parent b5f80500
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -167,8 +167,12 @@ public class GraphicsAndWindowsTest extends Application {
            public void handle(long now) {
                //Built in class that helps calculate the bounds of the mesh for collision
                //Bounds meshBounds = newObject1.getMesh().getBoundsInParent();
                Bounds[] meshBounds = {newObject1.getMesh().getBoundsInParent(),newObject2.getMesh().getBoundsInParent(),newObject3.getMesh().getBoundsInParent()};
                double[][] direction = {newObject1.getVelocityVec(),newObject2.getVelocityVec(),newObject3.getVelocityVec()};
                Bounds[] meshBounds = new Bounds[objects.length];
                double[][] direction = new double[objects.length][3];
                for (int i = 0; i < objects.length; i++) {
                    meshBounds[i] = objects[i].getMesh().getBoundsInParent();
                    direction[i] = objects[i].getVelocityVec();
                }

//                double minX = meshBounds.getMinX() + direction1[0];
//                double maxX = meshBounds.getMaxX() + direction1[0];