Revision e2e92a29
Added by Leszek Koltunski over 7 years ago
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 |
} |
src/main/java/org/distorted/library/effect/FragmentEffectBrightness.java | ||
---|---|---|
34 | 34 |
/** |
35 | 35 |
* Makes a certain sub-region of the Object smoothly change its brightness level. |
36 | 36 |
* |
37 |
* @param brightness 1-dimensional Data that returns the level of brightness we want to have |
|
38 |
* at any given moment. Valid range: <0,infinity) |
|
37 |
* @param brightness level of brightness we want to have at any given moment. Valid range: <0,infinity) |
|
39 | 38 |
* @param region Region this Effect is limited to. |
40 | 39 |
* @param smooth If true, the level of 'brightness' will smoothly fade out towards the edges of the region. |
41 | 40 |
*/ |
42 | 41 |
public FragmentEffectBrightness(Data1D brightness, Data4D region, boolean smooth) |
43 | 42 |
{ |
44 | 43 |
super(smooth?EffectName.SMOOTH_BRIGHTNESS:EffectName.BRIGHTNESS); |
45 |
|
|
46 | 44 |
mBrightness = brightness; |
47 | 45 |
mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region); |
48 | 46 |
} |
... | ... | |
51 | 49 |
/** |
52 | 50 |
* Makes the whole Object smoothly change its brightness level. |
53 | 51 |
* |
54 |
* @param brightness 1-dimensional Data that returns the level of brightness we want to have |
|
55 |
* at any given moment. Valid range: <0,infinity) |
|
52 |
* @param brightness level of brightness we want to have at any given moment. Valid range: <0,infinity) |
|
56 | 53 |
*/ |
57 | 54 |
public FragmentEffectBrightness(Data1D brightness) |
58 | 55 |
{ |
59 | 56 |
super(EffectName.BRIGHTNESS); |
60 |
|
|
61 | 57 |
mBrightness = brightness; |
62 | 58 |
mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE); |
63 | 59 |
} |
src/main/java/org/distorted/library/effect/FragmentEffectChroma.java | ||
---|---|---|
36 | 36 |
/** |
37 | 37 |
* Makes a certain sub-region of the Object smoothly change all three of its RGB components. |
38 | 38 |
* |
39 |
* @param blend 1-dimensional Data that returns the level of blend a given pixel will be
|
|
40 |
* mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color.
|
|
39 |
* @param blend level of blend a given pixel will be mixed with the next parameter 'color':
|
|
40 |
* pixel = (1-level)*pixel + level*color. |
|
41 | 41 |
* Valid range: <0,1> |
42 | 42 |
* @param color Color to mix. (1,0,0) is RED. |
43 | 43 |
* @param region Region this Effect is limited to. |
... | ... | |
46 | 46 |
public FragmentEffectChroma(Data1D blend, Data3D color, Data4D region, boolean smooth) |
47 | 47 |
{ |
48 | 48 |
super(smooth?EffectName.SMOOTH_CHROMA:EffectName.CHROMA); |
49 |
|
|
50 | 49 |
mBlend = blend; |
51 | 50 |
mColor = color; |
52 | 51 |
mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region); |
... | ... | |
56 | 55 |
/** |
57 | 56 |
* Makes the whole Object smoothly change all three of its RGB components. |
58 | 57 |
* |
59 |
* @param blend 1-dimensional Data that returns the level of blend a given pixel will be
|
|
60 |
* mixed with the next parameter 'color': pixel = (1-level)*pixel + level*color.
|
|
58 |
* @param blend level of blend a given pixel will be mixed with the next parameter 'color':
|
|
59 |
* pixel = (1-level)*pixel + level*color. |
|
61 | 60 |
* Valid range: <0,1> |
62 | 61 |
* @param color Color to mix. (1,0,0) is RED. |
63 | 62 |
*/ |
64 | 63 |
public FragmentEffectChroma(Data1D blend, Data3D color) |
65 | 64 |
{ |
66 | 65 |
super(EffectName.CHROMA); |
67 |
|
|
68 | 66 |
mBlend = blend; |
69 | 67 |
mColor = color; |
70 | 68 |
mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE); |
src/main/java/org/distorted/library/effect/FragmentEffectContrast.java | ||
---|---|---|
34 | 34 |
/** |
35 | 35 |
* Makes a certain sub-region of the Object smoothly change its contrast level. |
36 | 36 |
* |
37 |
* @param contrast 1-dimensional Data that returns the level of contrast we want to have |
|
38 |
* at any given moment. Valid range: <0,infinity) |
|
37 |
* @param contrast level of contrast we want to have at any given moment. Valid range: <0,infinity) |
|
39 | 38 |
* @param region Region this Effect is limited to. |
40 | 39 |
* @param smooth If true, the level of 'contrast' will smoothly fade out towards the edges of the region. |
41 | 40 |
*/ |
42 | 41 |
public FragmentEffectContrast(Data1D contrast, Data4D region, boolean smooth) |
43 | 42 |
{ |
44 | 43 |
super(smooth?EffectName.SMOOTH_CONTRAST:EffectName.CONTRAST); |
45 |
|
|
46 | 44 |
mContrast = contrast; |
47 | 45 |
mRegion = (region==null ? new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE) : region); |
48 | 46 |
} |
... | ... | |
51 | 49 |
/** |
52 | 50 |
* Makes the whole Object smoothly change its contrast level. |
53 | 51 |
* |
54 |
* @param contrast 1-dimensional Data that returns the level of contrast we want to have |
|
55 |
* at any given moment. Valid range: <0,infinity) |
|
52 |
* @param contrast level of contrast we want to have at any given moment. Valid range: <0,infinity) |
|
56 | 53 |
*/ |
57 | 54 |
public FragmentEffectContrast(Data1D contrast) |
58 | 55 |
{ |
59 | 56 |
super(EffectName.CONTRAST); |
60 |
|
|
61 | 57 |
mContrast = contrast; |
62 | 58 |
mRegion = new Static4D(0,0,Float.MAX_VALUE, Float.MAX_VALUE); |
63 | 59 |
} |
src/main/java/org/distorted/library/effect/FragmentEffectSaturation.java | ||
---|---|---|
34 | 34 |
/** |
35 | 35 |
* Makes a certain sub-region of the Object smoothly change its saturation level. |
36 | 36 |
* |
37 |
* @param saturation 1-dimensional Data that returns the level of saturation we want to have |
|
38 |
* at any given moment. Valid range: <0,infinity) |
|
37 |
* @param saturation level of saturation we want to have at any given moment. Valid range: <0,infinity) |
|
39 | 38 |
* @param region Region this Effect is limited to. |
40 | 39 |
* @param smooth If true, the level of 'saturation' will smoothly fade out towards the edges of the region. |
41 | 40 |
*/ |
... | ... | |
51 | 50 |
/** |
52 | 51 |
* Makes the whole Object smoothly change its saturation level. |
53 | 52 |
* |
54 |
* @param saturation 1-dimensional Data that returns the level of saturation we want to have |
|
55 |
* at any given moment. Valid range: <0,infinity) |
|
53 |
* @param saturation level of saturation we want to have at any given moment. Valid range: <0,infinity) |
|
56 | 54 |
*/ |
57 | 55 |
public FragmentEffectSaturation(Data1D saturation) |
58 | 56 |
{ |
src/main/java/org/distorted/library/effect/MatrixEffectMove.java | ||
---|---|---|
31 | 31 |
/** |
32 | 32 |
* Moves the Object by a (possibly changing in time) vector. |
33 | 33 |
* |
34 |
* @param vector 3-dimensional Data which at any given time will return a Static3D |
|
35 |
* representing the current coordinates of the vector we want to move the Object with. |
|
34 |
* @param vector current coordinates of the vector we want to move the Object with. |
|
36 | 35 |
*/ |
37 | 36 |
public MatrixEffectMove(Data3D vector) |
38 | 37 |
{ |
src/main/java/org/distorted/library/effect/MatrixEffectQuaternion.java | ||
---|---|---|
33 | 33 |
/** |
34 | 34 |
* Rotates the Object by quaternion. |
35 | 35 |
* |
36 |
* @param quaternion The quaternion describing the rotation.
|
|
36 |
* @param quaternion Quaternion describing the rotation.
|
|
37 | 37 |
* @param center Coordinates of the Point we are rotating around. |
38 | 38 |
*/ |
39 | 39 |
public MatrixEffectQuaternion(Data4D quaternion, Data3D center ) |
src/main/java/org/distorted/library/effect/MatrixEffectScale.java | ||
---|---|---|
32 | 32 |
/** |
33 | 33 |
* Scales the Object by (possibly changing in time) 3D scale factors. |
34 | 34 |
* |
35 |
* @param scale 3-dimensional Data which at any given time returns a Static3D |
|
36 |
* representing the current x- , y- and z- scale factors. |
|
35 |
* @param scale current x- , y- and z- scale factors. |
|
37 | 36 |
*/ |
38 | 37 |
public MatrixEffectScale(Data3D scale) |
39 | 38 |
{ |
src/main/java/org/distorted/library/effect/VertexEffectDistort.java | ||
---|---|---|
34 | 34 |
/** |
35 | 35 |
* Distort a (possibly changing in time) part of the Object by a (possibly changing in time) vector of force. |
36 | 36 |
* |
37 |
* @param vector 3-dimensional Vector which represents the force the Center of the Effect is |
|
38 |
* currently being dragged with. |
|
37 |
* @param vector vector of force the Center of the Effect is currently being dragged with. |
|
39 | 38 |
* @param center 3-dimensional Data that, at any given time, returns the Center of the Effect. |
40 | 39 |
* @param region Region that masks the Effect. |
41 | 40 |
*/ |
... | ... | |
51 | 50 |
/** |
52 | 51 |
* Distort the whole Object by a (possibly changing in time) vector of force. |
53 | 52 |
* |
54 |
* @param vector 3-dimensional Vector which represents the force the Center of the Effect is |
|
55 |
* currently being dragged with. |
|
53 |
* @param vector vector of force the Center of the Effect is currently being dragged with. |
|
56 | 54 |
* @param center 3-dimensional Data that, at any given time, returns the Center of the Effect. |
57 | 55 |
*/ |
58 | 56 |
public VertexEffectDistort(Data3D vector, Data3D center) |
Also available in: Unified diff
Simplify Effect classes.