Filter.Pass
defaultPass, enabled, material, postRenderPasses, processor
Constructor and Description |
---|
FogFilter()
Creates a FogFilter
|
FogFilter(ColorRGBA fogColor,
float fogDensity,
float fogDistance)
Create a fog filter
|
Modifier and Type | Method and Description |
---|---|
ColorRGBA |
getFogColor()
returns the fog color
|
float |
getFogDensity()
returns the fog density
|
float |
getFogDistance()
returns the fog distance
|
protected Material |
getMaterial()
Must return the material used for this filter.
|
protected void |
initFilter(AssetManager manager,
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 |
read(JmeImporter im)
Override this method if you want to load extra properties when the filter
is loaded else only basic properties of the filter will be loaded
This method should always begin by super.read(im);
|
void |
setFogColor(ColorRGBA fogColor)
Sets the color of the fog
|
void |
setFogDensity(float fogDensity)
Sets the density of the fog, a high value gives a thick fog
|
void |
setFogDistance(float fogDistance)
the distance of the fog.
|
void |
write(JmeExporter ex)
Override this method if you want to save extra properties when the filter is saved else only basic properties of the filter will be saved
This method should always begin by super.write(ex);
|
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
public FogFilter()
public FogFilter(ColorRGBA fogColor, float fogDensity, float fogDistance)
fogColor
- the color of the fog (default is white)fogDensity
- the density of the fog (default is 0.7)fogDistance
- the distance of the fog (default is 1000)protected boolean isRequiresDepthTexture()
Filter
isRequiresDepthTexture
in class Filter
protected void initFilter(AssetManager manager, RenderManager renderManager, ViewPort vp, int w, int h)
Filter
initFilter
in class Filter
manager
- the assetManagerrenderManager
- the renderManagervp
- the viewPort where this filter is renderedw
- the width of the filterh
- the height of the filterprotected Material getMaterial()
Filter
getMaterial
in class Filter
public ColorRGBA getFogColor()
public void setFogColor(ColorRGBA fogColor)
fogColor
- the desired color (alias created, default=(1,1,1,1))public float getFogDensity()
public void setFogDensity(float fogDensity)
fogDensity
- the desired density (default=0.7)public float getFogDistance()
public void setFogDistance(float fogDistance)
fogDistance
- the desired distance (in world units, default=1000)public void write(JmeExporter ex) throws java.io.IOException
Filter
public void read(JmeImporter im) throws java.io.IOException
Filter