Class ReflectionProcessor

java.lang.Object
com.jme3.water.ReflectionProcessor
All Implemented Interfaces:
SceneProcessor

public class ReflectionProcessor extends Object implements SceneProcessor
Reflection Processor Used to render the reflected scene in an off view port
  • Constructor Details

    • ReflectionProcessor

      public ReflectionProcessor(Camera reflectionCam, FrameBuffer reflectionBuffer, Plane reflectionClipPlane)
      Creates a ReflectionProcessor
      Parameters:
      reflectionCam - the cam to use for reflection
      reflectionBuffer - the FrameBuffer to render to
      reflectionClipPlane - the clipping plane
  • Method Details

    • initialize

      public void initialize(RenderManager rm, ViewPort vp)
      Description copied from interface: SceneProcessor
      Called in the render thread to initialize the scene processor.
      Specified by:
      initialize in interface SceneProcessor
      Parameters:
      rm - The render manager to which the SP was added to
      vp - The viewport to which the SP is assigned
    • reshape

      public void reshape(ViewPort vp, int w, int h)
      Description copied from interface: SceneProcessor
      Called when the resolution of the viewport has been changed.
      Specified by:
      reshape in interface SceneProcessor
      Parameters:
      vp - the affected ViewPort
      w - the new width (in pixels)
      h - the new height (in pixels)
    • isInitialized

      public boolean isInitialized()
      Specified by:
      isInitialized in interface SceneProcessor
      Returns:
      True if initialize() has been called on this SceneProcessor, false if otherwise.
    • preFrame

      public void preFrame(float tpf)
      Description copied from interface: SceneProcessor
      Called before a frame
      Specified by:
      preFrame in interface SceneProcessor
      Parameters:
      tpf - Time per frame
    • postQueue

      public void postQueue(RenderQueue rq)
      Description copied from interface: SceneProcessor
      Called after the scene graph has been queued, but before it is flushed.
      Specified by:
      postQueue in interface SceneProcessor
      Parameters:
      rq - The render queue
    • postFrame

      public void postFrame(FrameBuffer out)
      Description copied from interface: SceneProcessor
      Called after a frame has been rendered and the queue flushed.
      Specified by:
      postFrame in interface SceneProcessor
      Parameters:
      out - The FB to which the scene was rendered.
    • cleanup

      public void cleanup()
      Description copied from interface: SceneProcessor
      Called when the SP is removed from the RM.
      Specified by:
      cleanup in interface SceneProcessor
    • setProfiler

      public void setProfiler(AppProfiler profiler)
      Description copied from interface: SceneProcessor
      Sets a profiler Instance for this processor.
      Specified by:
      setProfiler in interface SceneProcessor
      Parameters:
      profiler - the profiler instance.
    • getReflectionBuffer

      public FrameBuffer getReflectionBuffer()
      Internal use only
      returns the frame buffer
      Returns:
      the pre-existing buffer
    • setReflectionBuffer

      public void setReflectionBuffer(FrameBuffer reflectionBuffer)
      Internal use only
      sets the frame buffer
      Parameters:
      reflectionBuffer - the FrameBuffer to use (alias created)
    • getReflectionCam

      public Camera getReflectionCam()
      returns the reflection cam
      Returns:
      the pre-existing Camera
    • setReflectionCam

      public void setReflectionCam(Camera reflectionCam)
      sets the reflection cam
      Parameters:
      reflectionCam - the Camera to use (alias created)
    • getReflectionClipPlane

      public Plane getReflectionClipPlane()
      returns the reflection clip plane
      Returns:
      the pre-existing instance
    • setReflectionClipPlane

      public void setReflectionClipPlane(Plane reflectionClipPlane)
      Sets the reflection clip plane
      Parameters:
      reflectionClipPlane - the Plane to use (alias created)