Project

General

Profile

« Previous | Next » 

Revision e2e92a29

Added by Leszek Koltunski almost 7 years ago

Simplify Effect classes.

View differences:

src/main/java/org/distorted/library/effect/FragmentEffectAlpha.java
34 34
/**
35 35
 * Makes a certain sub-region of the Object smoothly change its transparency level.
36 36
 *
37
 * @param alpha  1-dimensional Data that returns the level of transparency we want to have at any given
38
 *               moment: pixel.a *= alpha.
37
 * @param alpha  level of transparency we want to have at any given moment: pixel.a *= alpha.
39 38
 *               Valid range: <0,1>
40 39
 * @param region Region this Effect is limited to.
41 40
 * @param smooth If true, the level of 'alpha' will smoothly fade out towards the edges of the region.
......
43 42
  public FragmentEffectAlpha(Data1D alpha, Data4D region, boolean smooth)
44 43
    {
45 44
    super(smooth? EffectName.SMOOTH_ALPHA:EffectName.ALPHA);
46

  
47 45
    mAlpha = alpha;
48 46
    mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region);
49 47
    }
......
52 50
/**
53 51
 * Makes the whole Object smoothly change its transparency level.
54 52
 *
55
 * @param alpha  1-dimensional Data that returns the level of transparency we want to have at any
56
 *               given moment: pixel.a *= alpha.
53
 * @param alpha  level of transparency we want to have at any given moment: pixel.a *= alpha.
57 54
 *               Valid range: <0,1>
58 55
 */
59 56
  public FragmentEffectAlpha(Data1D alpha)
60 57
    {
61 58
    super(EffectName.ALPHA);
62

  
63 59
    mAlpha = alpha;
64 60
    mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE);
65 61
    }

Also available in: Unified diff