float zMovement = FastMath.sin( timer.getTimeInSeconds() * 0.5f ) * 50.0f; waterEffectRenderPass.setWaterHeight( zMovement ); FloatBuffer vertBuf = waterQuad.getVertexBuffer( 0 ); vertBuf.put( 2, waterEffectRenderPass.getWaterHeight() ); vertBuf.put( 5, waterEffectRenderPass.getWaterHeight() ); vertBuf.put( 8, waterEffectRenderPass.getWaterHeight() ); vertBuf.put( 11, waterEffectRenderPass.getWaterHeight() );
if( !freezeMovement ) { waterQuad.getLocalTranslation().set( 0.0f, 0.0f, FastMath.sin( timer.getTimeInSeconds() * 0.2f ) * 50.0f ); waterQuad.getLocalRotation().fromAngles( FastMath.sin( timer.getTimeInSeconds() * 0.5f ) * 1.0f, FastMath.sin( timer.getTimeInSeconds() * 0.5f ) * 0.8f, 0.0f );  tmpVec.set(0,0,1); waterQuad.getLocalRotation().multLocal( tmpVec ); waterEffectRenderPass.getNormal().set( tmpVec );  float dist = waterEffectRenderPass.getNormal().dot( waterQuad.getLocalTranslation() ); waterEffectRenderPass.setWaterHeight( dist ); }
	protected void simpleUpdate() {		if( KeyBindingManager.getKeyBindingManager().isValidCommand( "e", false ) ) {			switchShowDebug();		}		skybox.getLocalTranslation().set( cam.getLocation() );		skybox.updateGeometricState( 0.0f, true );		//make some funny movement of the quad...		float zMovement = FastMath.sin( timer.getTimeInSeconds() * 0.5f ) * 50.0f;		waterEffectRenderPass.setWaterHeight( zMovement );		FloatBuffer vertBuf = waterQuad.getVertexBuffer( 0 );		vertBuf.put( 2, waterEffectRenderPass.getWaterHeight() );		vertBuf.put( 5, waterEffectRenderPass.getWaterHeight() );		vertBuf.put( 8, waterEffectRenderPass.getWaterHeight() );		vertBuf.put( 11, waterEffectRenderPass.getWaterHeight() );	}