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
ConstructorDescriptionReflectionProcessor
(Camera reflectionCam, FrameBuffer reflectionBuffer, Plane reflectionClipPlane) Creates a ReflectionProcessor -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanup()
Called when the SP is removed from the RM.Internal use only
returns the frame bufferreturns the reflection camreturns the reflection clip planevoid
initialize
(RenderManager rm, ViewPort vp) Called in the render thread to initialize the scene processor.boolean
void
postFrame
(FrameBuffer out) Called after a frame has been rendered and the queue flushed.void
postQueue
(RenderQueue rq) Called after the scene graph has been queued, but before it is flushed.void
preFrame
(float tpf) Called before a framevoid
Called when the resolution of the viewport has been changed.void
setProfiler
(AppProfiler profiler) Sets a profiler Instance for this processor.void
setReflectionBuffer
(FrameBuffer reflectionBuffer) Internal use only
sets the frame buffervoid
setReflectionCam
(Camera reflectionCam) sets the reflection camvoid
setReflectionClipPlane
(Plane reflectionClipPlane) Sets the reflection clip planeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:SceneProcessor
Called in the render thread to initialize the scene processor.- Specified by:
initialize
in 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:SceneProcessor
Called when the resolution of the viewport has been changed.- Specified by:
reshape
in interfaceSceneProcessor
- Parameters:
vp
- the affected ViewPortw
- the new width (in pixels)h
- the new height (in pixels)
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceSceneProcessor
- 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 interfaceSceneProcessor
- Parameters:
tpf
- Time per frame
-
postQueue
Description copied from interface:SceneProcessor
Called after the scene graph has been queued, but before it is flushed.- Specified by:
postQueue
in interfaceSceneProcessor
- Parameters:
rq
- The render queue
-
postFrame
Description copied from interface:SceneProcessor
Called after a frame has been rendered and the queue flushed.- Specified by:
postFrame
in interfaceSceneProcessor
- 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 interfaceSceneProcessor
-
setProfiler
Description copied from interface:SceneProcessor
Sets a profiler Instance for this processor.- Specified by:
setProfiler
in 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)
-