private Node createObjects() {
Node objects = new Node( "objects" );
//Torus torus = new Torus( "Torus", 50, 50, 10, 20 );
//torus.setLocalTranslation( new Vector3f( 50, -5, 20 ) );
TextureState ts = display.getRenderer().createTextureState();
Texture t0 = TextureManager.loadTexture(
TestQuadWater.class.getClassLoader().getResource(
"jmetest/data/images/Monkey.jpg" ),
Texture.MM_LINEAR_LINEAR,
Texture.FM_LINEAR );
Texture t1 = TextureManager.loadTexture(
TestQuadWater.class.getClassLoader().getResource(
"jmetest/data/texture/north.jpg" ),
Texture.MM_LINEAR_LINEAR,
Texture.FM_LINEAR );
t1.setEnvironmentalMapMode( Texture.EM_SPHERE );
ts.setTexture( t0, 0 );
ts.setTexture( t1, 1 );
ts.setEnabled( true );
//torus.setRenderState( ts );
//objects.attachChild( torus );
ts = display.getRenderer().createTextureState();
t0 = TextureManager.loadTexture(
TestQuadWater.class.getClassLoader().getResource(
"jmetest/data/texture/wall.jpg" ),
Texture.MM_LINEAR_LINEAR,
Texture.FM_LINEAR );
t0.setWrap( Texture.WM_WRAP_S_WRAP_T );
ts.setTexture( t0 );
Box box = new Box( "box1", new Vector3f( -10, -10, -10 ), new Vector3f( 10, 10, 10 ) );
box.setLocalTranslation( new Vector3f( 0, -7, 0 ) );
box.setRenderState( ts );
objects.attachChild( box );
box = new Box( "box2", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
box.setLocalTranslation( new Vector3f( 15, 10, 0 ) );
box.setRenderState( ts );
objects.attachChild( box );
box = new Box( "box3", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
box.setLocalTranslation( new Vector3f( 0, -10, 15 ) );
box.setRenderState( ts );
objects.attachChild( box );
box = new Box( "box4", new Vector3f( -5, -5, -5 ), new Vector3f( 5, 5, 5 ) );
box.setLocalTranslation( new Vector3f( 20, 0, 0 ) );
box.setRenderState( ts );
objects.attachChild( box );
ts = display.getRenderer().createTextureState();
t0 = TextureManager.loadTexture(
TestSimpleQuadWater.class.getClassLoader().getResource(
"jmetest/data/images/Monkey.jpg" ),
Texture.MM_LINEAR_LINEAR,
Texture.FM_LINEAR );
t0.setWrap( Texture.WM_WRAP_S_WRAP_T );
ts.setTexture( t0 );
box = new Box( "box5", new Vector3f( -50, -2, -50 ), new Vector3f( 50, 2, 50 ) );
box.setLocalTranslation( new Vector3f( 0, -15, 0 ) );
box.setRenderState( ts );
box.setModelBound( new BoundingBox() );