Commits

Michael Ludwig committed 96a144e

Update tests to use new render task.

Comments (0)

Files changed (3)

ferox-demos/src/main/java/com/ferox/physics/GravityTest.java

               .setZDistances(1.0, 6 * BOUNDS);
         camera.add(Transform.class)
               .getData()
-              .setMatrix(new Matrix4(-1,
-                                     0,
-                                     0,
-                                     0,
-                                     0,
-                                     1,
-                                     0,
-                                     0,
-                                     0,
-                                     0,
-                                     -1,
-                                     .75 * BOUNDS,
-                                     0,
-                                     0,
-                                     0,
-                                     1));
+              .setMatrix(new Matrix4().set(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, -1,
+                                           .75 * BOUNDS, 0, 0, 0, 1));
 
         // shapes
         Geometry geomShape1 = com.ferox.util.geom.Box.create(2 + 2 * MARGIN, COMPILE_TYPE);
         e.add(CollisionBody.class)
          .getData()
          .setShape(physShape1)
-         .setTransform(new Matrix4(1,
-                                   0,
-                                   0,
-                                   0,
-                                   0,
-                                   1,
-                                   0,
-                                   BOUNDS / 2,
-                                   0,
-                                   0,
-                                   1,
-                                   0,
-                                   0,
-                                   0,
-                                   0,
-                                   1));
+         .setTransform(new Matrix4().set(1, 0, 0, 0, 0, 1, 0, BOUNDS / 2, 0, 0, 1, 0, 0,
+                                         0, 0, 1));
         e.add(RigidBody.class).getData().setMass(1.0);
         e.add(Gravity.class).getData().setGravity(new Vector3(0, -10, 0));
 
         e.add(CollisionBody.class)
          .getData()
          .setShape(physShape2)
-         .setTransform(new Matrix4(1,
-                                   0,
-                                   0,
-                                   0,
-                                   0,
-                                   1,
-                                   0,
-                                   -BOUNDS / 2,
-                                   0,
-                                   0,
-                                   1,
-                                   0,
-                                   0,
-                                   0,
-                                   0,
-                                   1));
+         .setTransform(new Matrix4().set(1, 0, 0, 0, 0, 1, 0, -BOUNDS / 2, 0, 0, 1, 0, 0,
+                                         0, 0, 1));
         e.add(RigidBody.class).getData().setMass(1.0);
         e.add(Gravity.class).getData().setGravity(new Vector3(0, 10, 0));
 
         point.add(PointLight.class).getData().setColor(new ColorRGB(0.5, 0.5, 0.5));
         point.add(Transform.class)
              .getData()
-             .setMatrix(new Matrix4(1,
-                                    0,
-                                    0,
-                                    BOUNDS / 2,
-                                    0,
-                                    1,
-                                    0,
-                                    BOUNDS / 2,
-                                    0,
-                                    0,
-                                    1,
-                                    BOUNDS / 2,
-                                    0,
-                                    0,
-                                    0,
-                                    1));
+             .setMatrix(new Matrix4().set(1, 0, 0, BOUNDS / 2, 0, 1, 0, BOUNDS / 2, 0, 0,
+                                          1, BOUNDS / 2, 0, 0, 0, 1));
     }
 
     public static void main(String[] args) throws Exception {

ferox-demos/src/main/java/com/ferox/physics/PhysicsApplicationStub.java

 import com.ferox.scene.controller.ComputeCameraFrustumTask;
 import com.ferox.scene.controller.ComputePVSTask;
 import com.ferox.scene.controller.UpdateWorldBoundsTask;
-import com.ferox.scene.controller.ffp.FixedFunctionRenderController;
+import com.ferox.scene.controller.ffp.FixedFunctionRenderTask;
 import com.ferox.scene.controller.light.ComputeLightGroupTask;
 import com.ferox.scene.controller.light.ComputeShadowFrustumTask;
 import com.ferox.util.ApplicationStub;
                                                                                        6)),
                                      new ComputePVSTask(),
                                      new ComputeLightGroupTask(),
-                                     new FixedFunctionRenderController(surface.getFramework()));
-        //                                     new FixedFunctionRenderTask(surface.getFramework(),
-        //                                                                 1024,
-        //                                                                 false));
+                                     new FixedFunctionRenderTask(surface.getFramework(),
+                                                                 1024,
+                                                                 false));
 
         surface.setVSyncEnabled(true);
 

ferox-demos/src/main/java/com/ferox/scene/controller/ffp/SimpleTest.java

                                                                                            6)),
                                          new ComputePVSTask(),
                                          new ComputeLightGroupTask(),
-                                         new FixedFunctionRenderController(framework));
-        //                                         new FixedFunctionRenderTask(framework,
-        //                                                                     1024,
-        //                                                                     false));
+                                         new FixedFunctionRenderTask(framework,
+                                                                     1024,
+                                                                     false));
 
         long now = System.nanoTime();
         int numRuns = 0;