Hi!
I want to apply this processor to a box. I modify the method CreateWaterGeometry(), but it shows nothing
protected void initGeometry()
{
// we create a water processor
SimpleMirrorProcessor waterProcessor = new SimpleMirrorProcessor(assetManager);
waterProcessor.setReflectionScene(rootNode);
// we set the water plane
Vector3f waterLocation = new Vector3f(0,-6,0);
viewPort.addProcessor(waterProcessor);
// we set wave properties
waterProcessor.setRenderSize(1024, 1024);
waterProcessor.setLightPosition(sun.getDirection());
// we create the water geometry from the quad
Geometry waterPlane = waterProcessor.createWaterGeometry(1024, 1024);
waterPlane.setLocalTranslation(-512, -20, 512);
waterPlane.setMaterial(waterProcessor.getMaterial());
rootNode.attachChild(waterPlane);
}
SimpleWaterProcessor.java
[java]public Geometry createWaterGeometry(float width, float height) {
Box quad = new Box(3, 3, 3);
Geometry geom = new Geometry(“WaterGeometry”, quad);
//geom.setLocalRotation(new Quaternion().fromAngleAxis(-FastMath.HALF_PI, Vector3f.UNIT_X));
geom.setMaterial(material);
return geom;
}[/java]