Package jme3utilities
Class ContrastAdjustmentFilter
java.lang.Object
com.jme3.post.Filter
jme3utilities.ContrastAdjustmentFilter
- All Implemented Interfaces:
com.jme3.export.Savable
public class ContrastAdjustmentFilter
extends com.jme3.post.Filter
A filter to adjust the contrast of a rendered scene using a power-law
function.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.jme3.post.Filter
com.jme3.post.Filter.Pass -
Field Summary
FieldsFields inherited from class com.jme3.post.Filter
defaultPass, enabled, material, postRenderPasses, processor -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNo-argument constructor needed by SavableClassUtil.ContrastAdjustmentFilter(float exponent) Instantiate a filter with the specified exponent. -
Method Summary
Modifier and TypeMethodDescriptionfloatRead the filter's power-law exponent.protected com.jme3.material.MaterialAccess the Material used in this Filter.protected voidinitFilter(com.jme3.asset.AssetManager assetManager, com.jme3.renderer.RenderManager renderManager, com.jme3.renderer.ViewPort viewPort, int width, int height) Initialize the filter.voidread(com.jme3.export.JmeImporter importer) De-serialize this filter, for example when loading from a J3O file.final voidsetExponent(float newExponent) Alter the filter's power-law exponent.voidwrite(com.jme3.export.JmeExporter exporter) Serialize this filter, for example when saving to a J3O file.Methods inherited from class com.jme3.post.Filter
cleanup, cleanUpFilter, getDefaultPassDepthFormat, getDefaultPassTextureFormat, getName, getPostRenderPasses, getRenderedTexture, getRenderFrameBuffer, init, isEnabled, isRequiresBilinear, isRequiresDepthTexture, isRequiresSceneTexture, postFilter, postFrame, postQueue, preFrame, setDepthTexture, setEnabled, setName, setProcessor, setRenderedTexture, setRenderFrameBuffer
-
Field Details
-
assetPath
asset path of the material definition- See Also:
-
-
Constructor Details
-
ContrastAdjustmentFilter
protected ContrastAdjustmentFilter()No-argument constructor needed by SavableClassUtil. Do not invoke directly! -
ContrastAdjustmentFilter
public ContrastAdjustmentFilter(float exponent) Instantiate a filter with the specified exponent.- Parameters:
exponent- exponent for the power law (>0)
-
-
Method Details
-
getExponent
public float getExponent()Read the filter's power-law exponent.- Returns:
- exponent (>0)
-
setExponent
public final void setExponent(float newExponent) Alter the filter's power-law exponent.- Parameters:
newExponent- new value (>0)
-
getMaterial
protected com.jme3.material.Material getMaterial()Access the Material used in this Filter. This method is invoked on every frame.- Specified by:
getMaterialin classcom.jme3.post.Filter- Returns:
- the pre-existing instance, or null if the Filter hasn't been initialized
-
initFilter
protected void initFilter(com.jme3.asset.AssetManager assetManager, com.jme3.renderer.RenderManager renderManager, com.jme3.renderer.ViewPort viewPort, int width, int height) Initialize the filter. Invoked when the filter is added to the FilterPostProcessor.- Specified by:
initFilterin classcom.jme3.post.Filter- Parameters:
assetManager- asset manager (not null)renderManager- render manager (not null)viewPort- view port where the filter will be rendered (not null)width- the width of the filter (in pixels, >0)height- the height of the filter (in pixels, >0)
-
read
De-serialize this filter, for example when loading from a J3O file.- Specified by:
readin interfacecom.jme3.export.Savable- Overrides:
readin classcom.jme3.post.Filter- Parameters:
importer- (not null)- Throws:
IOException- from importer
-
write
Serialize this filter, for example when saving to a J3O file.- Specified by:
writein interfacecom.jme3.export.Savable- Overrides:
writein classcom.jme3.post.Filter- Parameters:
exporter- (not null)- Throws:
IOException- from exporter
-