Author: paperwing
Date: 2011-05-18 14:50:15 -0700 (Wed, 18 May 2011)
New Revision: 25469

Modified:
   csplugins/trunk/toronto/paperwing/TestJME3/src/TestJME3/TestJME3.java
Log:
Added optimization that increases framerate by combining node meshes

Modified: csplugins/trunk/toronto/paperwing/TestJME3/src/TestJME3/TestJME3.java
===================================================================
--- csplugins/trunk/toronto/paperwing/TestJME3/src/TestJME3/TestJME3.java       
2011-05-18 19:35:03 UTC (rev 25468)
+++ csplugins/trunk/toronto/paperwing/TestJME3/src/TestJME3/TestJME3.java       
2011-05-18 21:50:15 UTC (rev 25469)
@@ -2,6 +2,8 @@
 
 import java.util.Random;
 
+import jme3tools.optimize.GeometryBatchFactory;
+
 // import TestGraphics.DrawnNode;
 
 import com.jme3.app.SimpleApplication;
@@ -24,7 +26,7 @@
  */
 public class TestJME3 extends SimpleApplication {
 
-       private final int NODE_COUNT = 5500;
+       private final int NODE_COUNT = 30000;
        private final float LARGE_SPHERE_RADIUS = 3.0f;
        
     float angle;
@@ -43,7 +45,7 @@
 
         // teapot.setLocalScale(2f);
         
-       Sphere s = new Sphere(3, 2, 2);
+       Sphere s = new Sphere(6, 6, 2);
         Geometry sphere = new Geometry ("Sphere", s);
         Material mat = new Material(assetManager, 
"Common/MatDefs/Light/Lighting.j3md");
 
@@ -69,9 +71,9 @@
         
         DirectionalLight dl = new DirectionalLight();
         dl.setDirection(new Vector3f(-1, -1, -1).normalizeLocal());
-        dl.setColor(ColorRGBA.Cyan);
+        dl.setColor(ColorRGBA.White);
         rootNode.addLight(dl);
-        
+
         generateNodes();
     }
 
@@ -81,7 +83,7 @@
                // nodeSeed++;
                // 500 should be the default seed
                
-               Sphere sphere = new Sphere(10, 10, 0.03f);;
+               Sphere sphere = new Sphere(6, 6, 0.02f);;
                Geometry geometry;
                Material material = new Material(assetManager, 
"Common/MatDefs/Light/Lighting.j3md");
                
@@ -112,6 +114,9 @@
                        rootNode.attachChild(geometry);
                }
                
+               // GeometryBatchFactory.optimize(rootNode);
+
+               
                //System.out.println("Last node float: " + random.nextFloat());
        }
     

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to