Artenus 2D Framework
Artenus Reference
Represents a post-processing filter that adds a ghosting effect to the rendered frame.
public class GhostingFilter
implements PostProcessingFilter

Constructor Summary

Modifier and TypeConstructor and Description
public GhostingFilter()

Method Summary

Modifier and TypeMethod and Description
public floatgetAmount()
Gets the amount of ghosting, which corresponds to the scaling of the ghost image.
public voidrender(int pass, RenderingContext context, RenderTarget renderedFrame)
Renders the frame for the current pass.
public voidsetAmount(float amount)
Sets the amount of ghosting, which corresponds to the scaling of the ghost image.
public booleansetup(int pass, FilterPassSetup setup)
Returns false, as this filter only has one pass.

Methods inherited from java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

GhostingFilter
public  GhostingFilter()

Method Detail

getAmount
public float getAmount()
Gets the amount of ghosting, which corresponds to the scaling of the ghost image.
Returns:
Ghosting amount
render
public void render(
    int pass,
    RenderingContext context,
    RenderTarget renderedFrame
)
Renders the frame for the current pass. On pass 0 the raw rendering output is given to the function, and subsequent passes receive output from their predecessor. The rendering context can be used to draw elements for the next pass (if there is one), or for the final output of this filter. Note that the result of the final pass might still be processed by other post-processing filters before actually being displayed on the screen.
Specified By:
setAmount
public void setAmount(
    float amount
)
Sets the amount of ghosting, which corresponds to the scaling of the ghost image. For best results use a value between 0 and 1.
Parameters:
amountGhosting amount
setup
public boolean setup(
    int pass,
    FilterPassSetup setup
)
Returns false, as this filter only has one pass.
Parameters:
passCurrent pass number (starting at 0)
setupFrame setup for the previous pass
Specified By:
Returns:
A value indicating whether another pass is required to complete this filter (other than the current pass that is being set up)