/** * Sets the height of the water plane * default is 0.0 * @param waterHeight */ public void setWaterHeight(float waterHeight) { this.waterHeight = waterHeight; this.plane = new Plane(Vector3f.UNIT_Y, waterHeight); if (material != null) { material.setFloat("WaterHeight", waterHeight); } if (reflectionProcessor != null) { reflectionProcessor.setReflectionClipPlane(plane); } }
plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y)); reflectionProcessor = new ReflectionProcessor(reflectionCam, reflectionPass.getRenderFrameBuffer(), plane); reflectionProcessor.setReflectionClipPlane(plane); reflectionView.addProcessor(reflectionProcessor);
/** * Sets the height of the water plane * default is 0.0 * @param waterHeight */ public void setWaterHeight(float waterHeight) { this.waterHeight = waterHeight; this.plane = new Plane(Vector3f.UNIT_Y, waterHeight); if (material != null) { material.setFloat("WaterHeight", waterHeight); } if (reflectionProcessor != null) { reflectionProcessor.setReflectionClipPlane(plane); } }
/** * Sets the height of the water plane * default is 0.0 * @param waterHeight */ public void setWaterHeight(float waterHeight) { this.waterHeight = waterHeight; this.plane = new Plane(Vector3f.UNIT_Y, waterHeight); if (material != null) { material.setFloat("WaterHeight", waterHeight); } if (reflectionProcessor != null) { reflectionProcessor.setReflectionClipPlane(plane); } }
ray.setDirection(sceneCam.getDirection()); plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y)); reflectionProcessor.setReflectionClipPlane(plane); boolean inv = false; if (!ray.intersectsWherePlane(plane, targetLocation)) {
plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y)); reflectionProcessor = new ReflectionProcessor(reflectionCam, reflectionPass.getRenderFrameBuffer(), plane); reflectionProcessor.setReflectionClipPlane(plane); reflectionView.addProcessor(reflectionProcessor);
plane = new Plane(Vector3f.UNIT_Y, new Vector3f(0, waterHeight, 0).dot(Vector3f.UNIT_Y)); reflectionProcessor = new ReflectionProcessor(reflectionCam, reflectionPass.getRenderFrameBuffer(), plane); reflectionProcessor.setReflectionClipPlane(plane); reflectionView.addProcessor(reflectionProcessor);