Project

General

Profile

« Previous | Next » 

Revision 3695d6fa

Added by Leszek Koltunski over 7 years ago

Comments

View differences:

src/main/java/org/distorted/library/DistortedObject.java
821 821
 *               second is the wave length, third is the offset (i.e. when offset = PI/2, the sine
822 822
 *               wave at the center does not start from sin(0), but from sin(PI/2) ) and the next two
823 823
 *               describe the 'direction' of the wave.
824
 *               <p>
824 825
 *               Wave direction is defined to be a 3D vector of length 1. To define such vectors, we
825 826
 *               need 2 floats: thus the third member is the angle Alpha (in degrees) which the vector
826 827
 *               forms with the XY-plane, and the fourth is the angle Beta (again in degrees) which
827 828
 *               the projection of the vector to the XY-plane forms with the Y-axis (counterclockwise).
828
 *
829
 *               <p>
830
 *               <p>
829 831
 *               Example1: if Alpha = 90, Beta = 90, (then V=(0,0,1) ) and the wave acts 'vertically'
830 832
 *               in the X-direction, i.e. cross-sections of the resulting surface with the XZ-plane
831 833
 *               will be sine shapes.
834
 *               <p>
832 835
 *               Example2: if Alpha = 90, Beta = 0, the again V=(0,0,1) and the wave is 'vertical',
833 836
 *               but this time it waves in the Y-direction, i.e. cross sections of the surface and the
834 837
 *               YZ-plane with be sine shapes.
838
 *               <p>
835 839
 *               Example3: if Alpha = 0 and Beta = 45, then V=(sqrt(2)/2, -sqrt(2)/2, 0) and the wave
836 840
 *               is entirely 'horizontal' and moves point (x,y,0) in direction V by whatever is the
837 841
 *               value if sin at this point.
src/main/java/org/distorted/library/EffectNames.java
50 50
   * Rotate the whole Object around a center point (in angle-axis notation).
51 51
   * <p>
52 52
   * Uniforms: (angle,axisX,axisY,axisZ,centerX,centerY,centerZ)
53
   * <p>
53 54
   * Unity: angle==0
54 55
   */
55 56
  ROTATE           ( EffectTypes.MATRIX  ,   new float[] {0.0f}           ),
......
57 58
   * Rotate the whole Object around a center point (in quaternion notation).
58 59
   * <p>
59 60
   * Uniforms: (quatX,quatY,quatZ,quatW,centerX,centerY,centerZ)
61
   * <p>
60 62
   * Unity: (quatX,quatY,quatZ) = (0,0,0)
61 63
   */
62 64
  QUATERNION       ( EffectTypes.MATRIX  ,   new float[] {0.0f,0.0f,0.0f} ),
......
64 66
   * Move the whole Object by a vector.
65 67
   * <p>
66 68
   * Uniforms: (vectorX,vectorY,vectorZ,UNUSED,UNUSED,UNUSED,UNUSED)
69
   * <p>
67 70
   * Unity: (vectorX,vectorY,vectorZ) = (0,0,0)
68 71
   */
69 72
  MOVE             ( EffectTypes.MATRIX  ,   new float[] {0.0f,0.0f,0.0f} ),
......
71 74
   * Scale the whole Object independently in all 3 dimensions.
72 75
   * <p>
73 76
   * Uniforms: (scaleX,scaleY,scaleZ,UNUSED,UNUSED,UNUSED,UNUSED)
77
   * <p>
74 78
   * Unity: (scaleX,scaleY,scaleZ) = (1,1,1)
75 79
   */
76 80
  SCALE            ( EffectTypes.MATRIX  ,   new float[] {1.0f,1.0f,1.0f} ),
......
78 82
   * Shear the whole Object in 3 dimensions around a center point.
79 83
   * <p>
80 84
   * Uniforms: (shearX,shearY,shearZ,UNUSED,centerX,centerY,centerZ)
85
   * <p>
81 86
   * Unity:  (shearX,shearY,shearZ) = (0,0,0)
82 87
   */
83 88
  SHEAR            ( EffectTypes.MATRIX  ,   new float[] {0.0f,0.0f,0.0f} ),
......
91 96
   * Apply a 3D vector of force to area around a point on the surface of the Object.
92 97
   * <p>
93 98
   * Uniforms: (forceX ,forceY ,forceZ  ,UNUSED  ,
94
  *             UNUSED , UNUSED,centerX ,centerY ,
95
  *             regionX,regionY,regionRX,regionRY)
99
   *            UNUSED , UNUSED,centerX ,centerY ,
100
   *            regionX,regionY,regionRX,regionRY)
101
   * <p>
96 102
   * Unity: (forceX,forceY,forceZ) = (0,0,0)
97 103
   */
98 104
  DISTORT          ( EffectTypes.VERTEX  ,   new float[] {0.0f,0.0f,0.0f} ),
......
102 108
   * Uniforms: (forceX,forceY,UNUSED,UNUSED,
103 109
   *            UNUSED,UNUSED,centerX,centerY,
104 110
   *            UNUSED,UNUSED,UNUSED,UNUSED)
111
   * <p>
105 112
   * Unity: (forceX,forceY) = (0,0)
106 113
   */
107 114
  DEFORM           ( EffectTypes.VERTEX  ,   new float[] {0.0f,0.0f}      ),
......
111 118
   * Uniforms: (sinkFactor,UNUSED,UNUSED,UNUSED,
112 119
   *            UNUSED,UNUSED,centerX,centerY,
113 120
   *            regionX,regionY,regionRX,regionRY)
121
   * <p>
114 122
   * Unity: sinkFactor = 1
115 123
   */
116 124
  SINK             ( EffectTypes.VERTEX  ,   new float[] {1.0f}           ),
......
120 128
   * Uniforms: (swirlAngle,UNUSED,UNUSED,UNUSED,
121 129
   *            UNUSED, UNUSED,centerX,centerY,
122 130
   *            regionX,regionY,regionRX,regionRY)
131
   * <p>
123 132
   * Unity: swirlAngle = 0
124 133
   */
125 134
  SWIRL            ( EffectTypes.VERTEX  ,   new float[] {0.0f}           ),
126 135
  /**
127 136
   * Directional sinusoidal wave effect. The direction of the wave is given by the 'angle'
128
   * parameters. Details: {@see DistortedObject#wave(Data4D,Data2D)}
137
   * parameters. Details: {@see DistortedObject#wave(Data5D,Data2D)}
129 138
   * <p>
130
   * Uniforms: (amplitude,length,angleAlpha,angleBeta,
131
   *            UNUSED, UNUSED,centerX,centerY,
139
   * Uniforms: (amplitude,length,offset,angleAlpha,
140
   *            angleBeta, UNUSED,centerX,centerY,
132 141
   *            regionX,regionY,regionRX,regionRY)
142
   * <p>
133 143
   * Unity: amplitude  = 0
134 144
   */
135 145
  WAVE             ( EffectTypes.VERTEX  ,   new float[] {0.0f}           ),
......
142 152
   * Make a given Region (partially) transparent.
143 153
   * <p>
144 154
   * Uniforms: (transparencyLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
155
   * <p>
145 156
   * Unity: transparencyLevel = 1
146 157
   */
147 158
  ALPHA            ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
157 168
   * Blend current color in the texture with a given color.
158 169
   * <p>
159 170
   * Uniforms: (blendLevel,colorR,colorG,colorB, regionX, regionY, regionRX, regionRY)
171
   * <p>
160 172
   * Unity: blendLevel = 0
161 173
   */
162 174
  CHROMA           ( EffectTypes.FRAGMENT,   new float[] {0.0f}           ),
......
171 183
   * Change brightness level of a given Region.
172 184
   * <p>
173 185
   * Uniforms: (brightnessLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
186
   * <p>
174 187
   * Unity: brightnessLevel = 1
175 188
   */
176 189
  BRIGHTNESS       ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
178 191
   * Smoothly change brightness level of a given Region.
179 192
   * <p>
180 193
   * Uniforms: (brightnessLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
194
   * <p>
181 195
   * Unity: brightnessLevel = 1
182 196
   */
183 197
  SMOOTH_BRIGHTNESS( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
185 199
   * Change saturation level of a given Region.
186 200
   * <p>
187 201
   * Uniforms: (saturationLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
202
   * <p>
188 203
   * Unity: saturationLevel = 1
189 204
   */
190 205
  SATURATION       ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
192 207
   * Smoothly change saturation level of a given Region.
193 208
   * <p>
194 209
   * Uniforms: (saturationLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
210
   * <p>
195 211
   * Unity: saturationLevel = 1
196 212
   */
197 213
  SMOOTH_SATURATION( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
199 215
   * Change contrast level of a given Region.
200 216
   * <p>
201 217
   * Uniforms: (contrastLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
218
   * <p>
202 219
   * Unity: contrastLevel = 1
203 220
   */
204 221
  CONTRAST         ( EffectTypes.FRAGMENT,   new float[] {1.0f}           ),
......
206 223
   * Smoothly change contrast level of a given Region.
207 224
   * <p>
208 225
   * Uniforms: (contrastLevel,UNUSED,UNUSED,UNUSED, regionX, regionY, regionRX, regionRY)
226
   * <p>
209 227
   * Unity: contrastLevel = 1
210 228
   */
211 229
  SMOOTH_CONTRAST  ( EffectTypes.FRAGMENT,   new float[] {1.0f}           );

Also available in: Unified diff