Package com.jme3.post
Class FilterPostProcessor
java.lang.Object
com.jme3.post.FilterPostProcessor
- All Implemented Interfaces:
- Savable,- SceneProcessor
A FilterPostProcessor is a processor that can apply several 
It manages a list of filters that will be applied in the order in which they've been added to the list
Filters to a rendered sceneIt manages a list of filters that will be applied in the order in which they've been added to the list
- 
Field SummaryFields
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDon't use this constructor, useFilterPostProcessor(AssetManager assetManager)
 This constructor is used for serialization onlyFilterPostProcessor(AssetManager assetManager) Create a FilterProcessor
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds a filter to the filters listvoidcleanup()Called when the SP is removed from the RM.For internal use only
 returns the depth texture of the scene<T extends Filter>
 Treturns the first filter in the list assignable from the given typereturns an unmodifiable version of the filter list.For internal use only
 returns the rendered texture of the sceneReturns the depth format currently used for the internal frame buffer's depth bufferintreturn the number of samples for antialiasingvoidinitialize(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 framevoidread(JmeImporter im) voidRemoves all the filters from this processorvoidremoveFilter(Filter filter) removes this filters from the filters listvoidCalled when the resolution of the viewport has been changed.voidsetAssetManager(AssetManager assetManager) Sets the asset manager for this processorprotected voidsetFilterState(Filter filter, boolean enabled) sets the filter to enabled or disabledvoidsetFrameBufferDepthFormat(Image.Format depthFormat) Sets the format to be used for the internal frame buffer's depth buffervoidsetFrameBufferFormat(Image.Format fbFormat) Sets the format to be used for the internal frame buffer's color buffervoidsetNumSamples(int numSamples) Sets the number of samples for antialiasingvoidsetProfiler(AppProfiler profiler) Sets a profiler Instance for this processor.voidwrite(JmeExporter ex) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jme3.post.SceneProcessorrescale
- 
Field Details- 
FPP
 
- 
- 
Constructor Details- 
FilterPostProcessorCreate a FilterProcessor- Parameters:
- assetManager- the assetManager
 
- 
FilterPostProcessorprotected FilterPostProcessor()Don't use this constructor, useFilterPostProcessor(AssetManager assetManager)
 This constructor is used for serialization only
 
- 
- 
Method Details- 
addFilterAdds a filter to the filters list- Parameters:
- filter- the filter to add
 
- 
removeFilterremoves this filters from the filters list- Parameters:
- filter- the Filter to remove (not null)
 
- 
getFilterIterator
- 
initializeDescription copied from interface:SceneProcessorCalled in the render thread to initialize the scene processor.- Specified by:
- initializein interface- SceneProcessor
- Parameters:
- rm- The render manager to which the SP was added to
- vp- The viewport to which the SP is assigned
 
- 
getDefaultPassTextureFormat
- 
isInitializedpublic boolean isInitialized()- Specified by:
- isInitializedin interface- SceneProcessor
- Returns:
- True if initialize() has been called on this SceneProcessor, false if otherwise.
 
- 
postQueueDescription copied from interface:SceneProcessorCalled after the scene graph has been queued, but before it is flushed.- Specified by:
- postQueuein interface- SceneProcessor
- Parameters:
- rq- The render queue
 
- 
postFrameDescription copied from interface:SceneProcessorCalled after a frame has been rendered and the queue flushed.- Specified by:
- postFramein interface- SceneProcessor
- Parameters:
- out- The FB to which the scene was rendered.
 
- 
preFramepublic void preFrame(float tpf) Description copied from interface:SceneProcessorCalled before a frame- Specified by:
- preFramein interface- SceneProcessor
- Parameters:
- tpf- Time per frame
 
- 
setFilterStatesets the filter to enabled or disabled- Parameters:
- filter- the Filter to modify (not null)
- enabled- true to enable, false to disable
 
- 
cleanuppublic void cleanup()Description copied from interface:SceneProcessorCalled when the SP is removed from the RM.- Specified by:
- cleanupin interface- SceneProcessor
 
- 
setProfilerDescription copied from interface:SceneProcessorSets a profiler Instance for this processor.- Specified by:
- setProfilerin interface- SceneProcessor
- Parameters:
- profiler- the profiler instance.
 
- 
reshapeDescription copied from interface:SceneProcessorCalled when the resolution of the viewport has been changed.- Specified by:
- reshapein interface- SceneProcessor
- Parameters:
- vp- the affected ViewPort
- w- the new width (in pixels)
- h- the new height (in pixels)
 
- 
getNumSamplespublic int getNumSamples()return the number of samples for antialiasing- Returns:
- numSamples
 
- 
removeAllFilterspublic void removeAllFilters()Removes all the filters from this processor
- 
setNumSamplespublic void setNumSamples(int numSamples) Sets the number of samples for antialiasing- Parameters:
- numSamples- the number of Samples
 
- 
setAssetManagerSets the asset manager for this processor- Parameters:
- assetManager- to load assets
 
- 
setFrameBufferFormatSets the format to be used for the internal frame buffer's color buffer- Parameters:
- fbFormat- the format
 
- 
setFrameBufferDepthFormatSets the format to be used for the internal frame buffer's depth buffer- Parameters:
- depthFormat- the format
 
- 
getFrameBufferDepthFormatReturns the depth format currently used for the internal frame buffer's depth buffer- Returns:
- the depth format
 
- 
write- Specified by:
- writein interface- Savable
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Savable
- Throws:
- IOException
 
- 
getDepthTextureFor internal use only
 returns the depth texture of the scene- Returns:
- the depth texture
 
- 
getFilterTextureFor internal use only
 returns the rendered texture of the scene- Returns:
- the filter texture
 
- 
getFilterreturns the first filter in the list assignable from the given type- Type Parameters:
- T- the filter type
- Parameters:
- filterType- the filter type
- Returns:
- a filter assignable from the given type
 
- 
getFilterListreturns an unmodifiable version of the filter list.- Returns:
- the filters list
 
 
-