Package com.jme3.water
Class ReflectionProcessor
java.lang.Object
com.jme3.water.ReflectionProcessor
- All Implemented Interfaces:
SceneProcessor
Reflection Processor
Used to render the reflected scene in an off view port
-
Constructor Summary
ConstructorsConstructorDescriptionReflectionProcessor(Camera reflectionCam, FrameBuffer reflectionBuffer, Plane reflectionClipPlane) Creates a ReflectionProcessor -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Called when the SP is removed from the RM.Internal use only
returns the frame bufferreturns the reflection camreturns the reflection clip planevoidinitialize(RenderManager rm, ViewPort vp) Called in the render thread to initialize the scene processor.booleanvoidpostFrame(FrameBuffer out) Called after a frame has been rendered and the queue flushed.voidpostQueue(RenderQueue rq) Called after the scene graph has been queued, but before it is flushed.voidpreFrame(float tpf) Called before a framevoidCalled when the resolution of the viewport has been changed.voidsetProfiler(AppProfiler profiler) Sets a profiler Instance for this processor.voidsetReflectionBuffer(FrameBuffer reflectionBuffer) Internal use only
sets the frame buffervoidsetReflectionCam(Camera reflectionCam) sets the reflection camvoidsetReflectionClipPlane(Plane reflectionClipPlane) Sets the reflection clip planeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessor
rescale
-
Constructor Details
-
ReflectionProcessor
public ReflectionProcessor(Camera reflectionCam, FrameBuffer reflectionBuffer, Plane reflectionClipPlane) Creates a ReflectionProcessor- Parameters:
reflectionCam- the cam to use for reflectionreflectionBuffer- the FrameBuffer to render toreflectionClipPlane- the clipping plane
-
-
Method Details
-
initialize
Description copied from interface:SceneProcessorCalled in the render thread to initialize the scene processor.- Specified by:
initializein interfaceSceneProcessor- Parameters:
rm- The render manager to which the SP was added tovp- The viewport to which the SP is assigned
-
reshape
Description copied from interface:SceneProcessorCalled when the resolution of the viewport has been changed.- Specified by:
reshapein interfaceSceneProcessor- Parameters:
vp- the affected ViewPortw- the new width (in pixels)h- the new height (in pixels)
-
isInitialized
public boolean isInitialized()- Specified by:
isInitializedin interfaceSceneProcessor- Returns:
- True if initialize() has been called on this SceneProcessor, false if otherwise.
-
preFrame
public void preFrame(float tpf) Description copied from interface:SceneProcessorCalled before a frame- Specified by:
preFramein interfaceSceneProcessor- Parameters:
tpf- Time per frame
-
postQueue
Description copied from interface:SceneProcessorCalled after the scene graph has been queued, but before it is flushed.- Specified by:
postQueuein interfaceSceneProcessor- Parameters:
rq- The render queue
-
postFrame
Description copied from interface:SceneProcessorCalled after a frame has been rendered and the queue flushed.- Specified by:
postFramein interfaceSceneProcessor- Parameters:
out- The FB to which the scene was rendered.
-
cleanup
public void cleanup()Description copied from interface:SceneProcessorCalled when the SP is removed from the RM.- Specified by:
cleanupin interfaceSceneProcessor
-
setProfiler
Description copied from interface:SceneProcessorSets a profiler Instance for this processor.- Specified by:
setProfilerin interfaceSceneProcessor- Parameters:
profiler- the profiler instance.
-
getReflectionBuffer
Internal use only
returns the frame buffer- Returns:
- the pre-existing buffer
-
setReflectionBuffer
Internal use only
sets the frame buffer- Parameters:
reflectionBuffer- the FrameBuffer to use (alias created)
-
getReflectionCam
returns the reflection cam- Returns:
- the pre-existing Camera
-
setReflectionCam
sets the reflection cam- Parameters:
reflectionCam- the Camera to use (alias created)
-
getReflectionClipPlane
returns the reflection clip plane- Returns:
- the pre-existing instance
-
setReflectionClipPlane
Sets the reflection clip plane- Parameters:
reflectionClipPlane- the Plane to use (alias created)
-