|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme3.post.Filter
com.jme3.post.filters.DepthOfFieldFilter
public class DepthOfFieldFilter
A post-processing filter that performs a depth range blur using a scaled convolution filter.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.jme3.post.Filter |
---|
Filter.Pass |
Field Summary |
---|
Fields inherited from class com.jme3.post.Filter |
---|
defaultPass, enabled, material, postRenderPasses, processor |
Constructor Summary | |
---|---|
DepthOfFieldFilter()
Creates a DepthOfField filter |
Method Summary | |
---|---|
float |
getBlurScale()
returns the blur scale |
float |
getFocusDistance()
returns the focus distance |
float |
getFocusRange()
returns the focus range |
protected Material |
getMaterial()
Must return the material used for this filter. |
protected void |
initFilter(AssetManager assets,
RenderManager renderManager,
ViewPort vp,
int w,
int h)
Initialization of sub classes filters This method is called once when the filter is added to the FilterPostProcessor It should contain Material initializations and extra passes initialization |
protected boolean |
isRequiresDepthTexture()
Override this method and return true if your Filter needs the depth texture |
void |
setBlurScale(float f)
Sets the blur amount by scaling the convolution filter up or down. |
void |
setFocusDistance(float f)
Sets the distance at which objects are purely in focus. |
void |
setFocusRange(float f)
Sets the range to either side of focusDistance where the objects go gradually out of focus. |
Methods inherited from class com.jme3.post.Filter |
---|
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresSceneTexture, postFrame, postQueue, preFrame, read, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DepthOfFieldFilter()
Method Detail |
---|
protected boolean isRequiresDepthTexture()
Filter
isRequiresDepthTexture
in class Filter
protected Material getMaterial()
Filter
getMaterial
in class Filter
protected void initFilter(AssetManager assets, RenderManager renderManager, ViewPort vp, int w, int h)
Filter
initFilter
in class Filter
assets
- the assetManagerrenderManager
- the renderManagervp
- the viewPort where this filter is renderedw
- the width of the filterh
- the height of the filterpublic void setFocusDistance(float f)
public float getFocusDistance()
public void setFocusRange(float f)
public float getFocusRange()
public void setBlurScale(float f)
public float getBlurScale()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |