* Plane.normal is now created by default and set instead of using references

* Fix crash in TestAppStates 
 * Fix crash in TestBox 
 * Removed useless calls to Spatial.updateModelBound()
 

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7673 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
sha..rd 2011-06-19 19:22:35 +00:00
parent ba88539817
commit e8069191a3
9 changed files with 2 additions and 16 deletions

View File

@ -73,7 +73,7 @@ public class TestAppStates extends Application {
inputManager,
audioRenderer,
guiViewPort);
niftyDisplay.getNifty().fromXml("jme3test/niftygui/hellojme.xml", "start");
niftyDisplay.getNifty().fromXml("Interface/Nifty/HelloJme.xml", "start");
guiViewPort.addProcessor(niftyDisplay);
}

View File

@ -294,8 +294,6 @@ public class TestHoveringTank extends SimpleApplication implements AnalogListene
terrain.addControl(control);
terrain.setMaterial(matRock);
terrain.setLocalScale(new Vector3f(2, 2, 2));
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocked(false); // unlock it so we can edit the height
terrain.setShadowMode(ShadowMode.CastAndReceive);

View File

@ -287,8 +287,6 @@ public class TestWalkingChar extends SimpleApplication implements ActionListener
TerrainLodControl control = new TerrainLodControl(terrain, cameras);
terrain.addControl(control);
terrain.setMaterial(matRock);
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocalScale(new Vector3f(2, 2, 2));
terrainPhysicsNode = new RigidBodyControl(CollisionShapeFactory.createMeshShape(terrain), 0);

View File

@ -49,7 +49,7 @@ public class TestBox extends SimpleApplication {
public void simpleInitApp() {
Box b = new Box(Vector3f.ZERO, 1, 1, 1);
Geometry geom = new Geometry("Box", b);
Material mat = new Material(assetManager, "Common/MatDefs/Misc/SimpleTextured.j3md");
Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md");
mat.setTexture("ColorMap", assetManager.loadTexture("Interface/Logo/Monkey.jpg"));
geom.setMaterial(mat);
rootNode.attachChild(geom);

View File

@ -184,8 +184,6 @@ public class TestDepthOfField extends SimpleApplication {
terrain.setMaterial(matRock);
terrain.setLocalScale(new Vector3f(5, 5, 5));
terrain.setLocalTranslation(new Vector3f(0, -30, 0));
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocked(false); // unlock it so we can edit the height
terrain.setShadowMode(ShadowMode.Receive);

View File

@ -166,8 +166,6 @@ public class TerrainTest extends SimpleApplication {
TerrainLodControl control = new TerrainLodControl(terrain, cameras);
terrain.addControl(control);
terrain.setMaterial(matRock);
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocalTranslation(0, -100, 0);
terrain.setLocalScale(2f, 1f, 2f);
rootNode.attachChild(terrain);

View File

@ -143,8 +143,6 @@ public class TerrainTestCollision extends SimpleApplication {
terrain.addControl(control);
terrain.setMaterial(matRock);
terrain.setLocalScale(new Vector3f(2, 2, 2));
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocked(false); // unlock it so we can edit the height
rootNode.attachChild(terrain);

View File

@ -166,8 +166,6 @@ public class TerrainTestReadWrite extends SimpleApplication {
TerrainLodControl control = new TerrainLodControl(terrain, cameras);
terrain.addControl(control);
terrain.setMaterial(matTerrain);
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocalTranslation(0, -100, 0);
terrain.setLocalScale(2f, 1f, 2f);
rootNode.attachChild(terrain);

View File

@ -273,8 +273,6 @@ public class TestPostWater extends SimpleApplication {
terrain.setMaterial(matRock);
terrain.setLocalScale(new Vector3f(5, 5, 5));
terrain.setLocalTranslation(new Vector3f(0, -30, 0));
terrain.setModelBound(new BoundingBox());
terrain.updateModelBound();
terrain.setLocked(false); // unlock it so we can edit the height
terrain.setShadowMode(ShadowMode.Receive);