public class FilterPostProcessor extends java.lang.Object implements SceneProcessor, Savable
Filter
s to a rendered sceneModifier and Type | Field and Description |
---|---|
static java.lang.String |
FPP |
Modifier | Constructor and Description |
---|---|
protected |
FilterPostProcessor()
Don't use this constructor, use
FilterPostProcessor(AssetManager assetManager) This constructor is used for serialization only |
|
FilterPostProcessor(AssetManager assetManager)
Create a FilterProcessor
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(Filter filter)
Adds a filter to the filters list
|
void |
cleanup()
Called when the SP is removed from the RM.
|
Image.Format |
getDefaultPassTextureFormat() |
Texture2D |
getDepthTexture()
For internal use only
returns the depth texture of the scene |
<T extends Filter> |
getFilter(java.lang.Class<T> filterType)
returns the first filter in the list assignable from the given type
|
java.util.Iterator<Filter> |
getFilterIterator() |
java.util.List<Filter> |
getFilterList()
returns an unmodifiable version of the filter list.
|
Texture2D |
getFilterTexture()
For internal use only
returns the rendered texture of the scene |
Image.Format |
getFrameBufferDepthFormat()
Returns the depth format currently used for the internal frame buffer's depth buffer
|
int |
getNumSamples()
return the number of samples for antialiasing
|
void |
initialize(RenderManager rm,
ViewPort vp)
Called in the render thread to initialize the scene processor.
|
boolean |
isInitialized() |
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 frame
|
void |
read(JmeImporter im) |
void |
removeAllFilters()
Removes all the filters from this processor
|
void |
removeFilter(Filter filter)
removes this filters from the filters list
|
void |
reshape(ViewPort vp,
int w,
int h)
Called when the resolution of the viewport has been changed.
|
void |
setAssetManager(AssetManager assetManager)
Sets the asset manager for this processor
|
protected void |
setFilterState(Filter filter,
boolean enabled)
sets the filter to enabled or disabled
|
void |
setFrameBufferDepthFormat(Image.Format depthFormat)
Sets the format to be used for the internal frame buffer's depth buffer
|
void |
setFrameBufferFormat(Image.Format fbFormat)
Sets the format to be used for the internal frame buffer's color buffer
|
void |
setNumSamples(int numSamples)
Sets the number of samples for antialiasing
|
void |
setProfiler(AppProfiler profiler)
Sets a profiler Instance for this processor.
|
void |
write(JmeExporter ex) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
rescale
public FilterPostProcessor(AssetManager assetManager)
assetManager
- the assetManagerprotected FilterPostProcessor()
FilterPostProcessor(AssetManager assetManager)
public void addFilter(Filter filter)
filter
- the filter to addpublic void removeFilter(Filter filter)
filter
- the Filter to remove (not null)public java.util.Iterator<Filter> getFilterIterator()
public void initialize(RenderManager rm, ViewPort vp)
SceneProcessor
initialize
in interface SceneProcessor
rm
- The render manager to which the SP was added tovp
- The viewport to which the SP is assignedpublic Image.Format getDefaultPassTextureFormat()
public boolean isInitialized()
isInitialized
in interface SceneProcessor
public void postQueue(RenderQueue rq)
SceneProcessor
postQueue
in interface SceneProcessor
rq
- The render queuepublic void postFrame(FrameBuffer out)
SceneProcessor
postFrame
in interface SceneProcessor
out
- The FB to which the scene was rendered.public void preFrame(float tpf)
SceneProcessor
preFrame
in interface SceneProcessor
tpf
- Time per frameprotected void setFilterState(Filter filter, boolean enabled)
filter
- the Filter to modify (not null)enabled
- true to enable, false to disablepublic void cleanup()
SceneProcessor
cleanup
in interface SceneProcessor
public void setProfiler(AppProfiler profiler)
SceneProcessor
setProfiler
in interface SceneProcessor
profiler
- the profiler instance.public void reshape(ViewPort vp, int w, int h)
SceneProcessor
reshape
in interface SceneProcessor
vp
- the affected ViewPortw
- the new width (in pixels)h
- the new height (in pixels)public int getNumSamples()
public void removeAllFilters()
public void setNumSamples(int numSamples)
numSamples
- the number of Samplespublic void setAssetManager(AssetManager assetManager)
assetManager
- to load assetspublic void setFrameBufferFormat(Image.Format fbFormat)
fbFormat
- the formatpublic void setFrameBufferDepthFormat(Image.Format depthFormat)
depthFormat
- the formatpublic Image.Format getFrameBufferDepthFormat()
public void write(JmeExporter ex) throws java.io.IOException
public void read(JmeImporter im) throws java.io.IOException
public Texture2D getDepthTexture()
public Texture2D getFilterTexture()
public <T extends Filter> T getFilter(java.lang.Class<T> filterType)
T
- the filter typefilterType
- the filter typepublic java.util.List<Filter> getFilterList()