Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.threed.jpct
Class WaterTextureEffect

    java.lang.Object
      com.threed.jpct.WaterTextureEffect

All Implemented Interfaces:
  ITextureEffect, java.io.Serializable

public class WaterTextureEffect
extends java.lang.Object
implements ITextureEffect, java.io.Serializable

An effect that renders ripples into a texture.

See Also:
  Serialized Form

Constructor Summary
`WaterTextureEffect(int intensity)` Creates a new texture effect.

Method Summary
`void` | `apply(int[] dest, int[] source)` Applies the effect.
`boolean` | `containsAlpha()` If this returns true, jPCT assumes that the alpha channel in the returned pixels is populated and treats it accordingly.
`void` | `init(Texture tex)` Initializes the effect.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### WaterTextureEffect

    public WaterTextureEffect(int intensity)

  Creates a new texture effect.

Parameters:
  `intensity` - the "power" of the ripples the effect produces. The higher this value is, the longer the ripples will last.

Method Detail

### init

    public void init(Texture tex)

  Description copied from interface: `ITextureEffect`
  Initializes the effect. This will be called by setEffect(), so there should be no need to call this method directly.

  Specified by:
    `init` in interface `ITextureEffect`
  Parameters:
    `tex` - the Texture to which the effect should be applied
  See Also:
    `Texture.setEffect(com.threed.jpct.ITextureEffect)`

### apply

    public void apply(int[] dest,
                      int[] source)

  Description copied from interface: `ITextureEffect`
  Applies the effect. Like init(), this will be called from within the Texture class. To avoid the construction of a new int[] for every call, the resulting image is rendered directly into dest. So if one wants to implements an effect, take the source bitmap (it's an int[] containing the texture in ARGB (0xaarrggbb)-format) and write the modified source bitmap into the dest bitmap.

  Specified by:
    `apply` in interface `ITextureEffect`
  Parameters:
    `dest` - the destination bitmap
    `source` - the source bitmap (the unmodified texture)

### containsAlpha

    public boolean containsAlpha()

  Description copied from interface: `ITextureEffect`
  If this returns true, jPCT assumes that the alpha channel in the returned pixels is populated and treats it accordingly.

  Specified by:
    `containsAlpha` in interface `ITextureEffect`
  Returns:
    does it?

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD