Project

General

Profile

« Previous | Next » 

Revision e50f49b6

Added by Leszek Koltunski almost 5 years ago

All apps converted to the new V&F center schema!

View differences:

src/main/java/org/distorted/examples/aroundtheworld/AroundTheWorldEffectsManager.java
149 149
    // WHITENESS
150 150
    // Vertex Effects
151 151
    wLipsRegion = new Static4D(0,0,0,100);
152
    wLipsCenter = new Static3D(300,100,0);
152
    wLipsCenter = new Static3D(3,-200,0);
153 153
    wLipsFactor = new Static1D(0.7f);
154 154
    wLipsDyn    = new Dynamic1D();
155 155
    wLipsDyn.add(wLipsFactor);
......
157 157
    // ASIANNESS
158 158
    // Vertex Effects
159 159
    aLipsNoseRegion    = new Static4D(0,0,0,267);
160
    aLipsNoseCenter    = new Static3D(300, 40,0);
160
    aLipsNoseCenter    = new Static3D(3,260,0);
161 161
    aLipsNoseDyn       = new Dynamic3D();
162 162
    aLipsNoseFactor    = new Static3D(0,0,0);
163 163
    aLipsNoseDyn.add(aLipsNoseFactor);
164 164

  
165 165
    aNoseBroaderRegion = new Static4D(0,0,0,130);
166
    aNoseBroaderCenter = new Static3D(300,293,0);
166
    aNoseBroaderCenter = new Static3D(3,-7,0);
167 167
    aNoseBroaderDyn    = new Dynamic3D();
168 168
    aNoseBroaderFactor = new Static3D(0,0,90);
169 169
    aNoseBroaderDyn.add(aNoseBroaderFactor);
170 170

  
171 171
    aNostrilsRegion    = new Static4D(0,0,0,60);
172
    aNostrilsCenter    = new Static3D(300,264,0);
172
    aNostrilsCenter    = new Static3D(3,-36,0);
173 173
    aNostrilsDyn       = new Dynamic3D();
174 174
    aNostrilsFactor    = new Static3D(0,0,0);
175 175
    aNostrilsDyn.add(aNostrilsFactor);
176 176

  
177 177
    aEyesRegion        = new Static4D(0,0,0,83);
178
    aLEyeCenter        = new Static3D(176,370,0);
179
    aREyeCenter        = new Static3D(420,370,0);
178
    aLEyeCenter        = new Static3D(-121,70,0);
179
    aREyeCenter        = new Static3D( 123,70,0);
180 180
    aLEyeDyn           = new Dynamic1D();
181 181
    aREyeDyn           = new Dynamic1D();
182 182
    aLEyeFactor        = new Static1D(0);
......
185 185
    aREyeDyn.add(aREyeFactor);
186 186

  
187 187
    aEyebrowsRegion    = new Static4D(0,0,0,142);
188
    aEyebrowsCenter    = new Static3D(300,500,0);
188
    aEyebrowsCenter    = new Static3D(3,200,0);
189 189
    aEyebrowsDyn       = new Dynamic3D();
190 190
    aEyebrowsFactor    = new Static3D(0,0,0);
191 191
    aEyebrowsDyn.add(aEyebrowsFactor);
192 192

  
193 193
    // Fragment Effects
194
    aSkinColorCenter   = new Static3D(300,300,0);
194
    aSkinColorCenter   = new Static3D(3,0,0);
195 195
    aSkinColorRegion   = new Static3D(600,600,600);
196
    aLEyeColorCenter   = new Static3D(172,370,0);
196
    aLEyeColorCenter   = new Static3D(-125,70,0);
197 197
    aLEyeColorRegion   = new Static3D(29,25,25);
198
    aREyeColorCenter   = new Static3D(423,370,0);
198
    aREyeColorCenter   = new Static3D(126,70,0);
199 199
    aREyeColorRegion   = new Static3D(29,25,25);
200 200

  
201 201
    aChromaSkin        = new Static3D(0.5f, 0.5f, 0.5f);
......
211 211
    // BLACKNESS
212 212
    // Vertex Effects
213 213
    bFaceRegion        = new Static4D(0,0,0,600);
214
    bFaceCenter        = new Static3D(300,300,0);
214
    bFaceCenter        = new Static3D(3,0,0);
215 215
    bFaceFactor        = new Static3D(1.0f,0.0f,90.0f);
216 216
    bFaceDyn           = new Dynamic3D();
217 217
    bFaceDyn.add(bFaceFactor);
218 218

  
219 219
    bTipLowerRegion    = new Static4D(0,0,0,41);
220
    bTipLowerCenter    = new Static3D(300,207,0);
220
    bTipLowerCenter    = new Static3D(3,-93,0);
221 221
    bTipLowerFactor    = new Static3D(0,0,0);
222 222
    bTipLowerDyn       = new Dynamic3D();
223 223
    bTipLowerDyn.add(bTipLowerFactor);
224 224

  
225 225
    bWholeNoseRegion   = new Static4D(0,0,0,130);
226
    bWholeNoseCenter   = new Static3D(300,243,0);
226
    bWholeNoseCenter   = new Static3D(3,-57,0);
227 227
    bWholeNoseFactor   = new Static3D(1.0f,0.0f,90.0f);
228 228
    bWholeNoseDyn      = new Dynamic3D();
229 229
    bWholeNoseDyn.add(bWholeNoseFactor);
230 230

  
231 231
    bNoseBroaderRegion = new Static4D(0,0,0,95);
232
    bNoseBroaderCenter = new Static3D(300,192,0);
232
    bNoseBroaderCenter = new Static3D(3,-108,0);
233 233
    bNoseBroaderFactor = new Static3D(1.0f,0.0f,90.0f);
234 234
    bNoseBroaderDyn    = new Dynamic3D();
235 235
    bNoseBroaderDyn.add(bNoseBroaderFactor);
236 236

  
237 237
    bLipsRegion        = new Static4D(0,-96,0,118);
238
    bLipsCenter        = new Static3D(300,142,0);
238
    bLipsCenter        = new Static3D(3,-158,0);
239 239
    bLipsFactor        = new Static3D(1.0f,90.0f,0.0f);
240 240
    bLipsDyn           = new Dynamic3D();
241 241
    bLipsDyn.add(bLipsFactor);
242 242

  
243
// 594 x 600
244

  
243 245
    // Fragment Effects
244
    bSkinColorCenter     = new Static3D(300,300,0);
246
    bSkinColorCenter     = new Static3D(3,0,0);
245 247
    bSkinColorRegion     = new Static3D(600,600,600);
246
    bLEyeColorCenter     = new Static3D(158,359,0);
248
    bLEyeColorCenter     = new Static3D(-139,59,0);
247 249
    bLEyeColorRegion     = new Static3D(55,24,50);
248
    bREyeColorCenter     = new Static3D(436,359,0);
250
    bREyeColorCenter     = new Static3D(139,59,0);
249 251
    bREyeColorRegion     = new Static3D(55,24,50);
250
    bLPupilColorCenter   = new Static3D(166,370,0);
252
    bLPupilColorCenter   = new Static3D(-131,70,0);
251 253
    bLPupilColorRegion   = new Static3D(28,23,25);
252
    bRPupilColorCenter   = new Static3D(431,370,0);
254
    bRPupilColorCenter   = new Static3D(134,70,0);
253 255
    bRPupilColorRegion   = new Static3D(28,23,25);
254 256

  
255 257
    bChromaSkin        = new Static3D(0.4f, 0.25f, 0.25f);
......
315 317
    mAsianness = asianness;
316 318
    mBlackness = blackness;
317 319

  
318
    //android.util.Log.e("manager", "blackness="+blackness+" asianness="+asianness);
319

  
320 320
    // WHITENESS
321 321
    wLipsFactor.set(1.0f-0.3f*mWhiteness);
322 322

  
src/main/java/org/distorted/examples/earth/EarthRenderer.java
203 203
      float y = (float)        sinLAT /2.0f;
204 204
      float z = (float)(cosLON*cosLAT)/2.0f;
205 205

  
206
      Static3D center = new Static3D( (0.5f+x)*mObjWidth, (0.5f+y)*mObjHeight, (0.5f+z)*mObjDepth);
206
      Static3D center = new Static3D( (x)*mObjWidth, (y)*mObjHeight, (z)*mObjDepth);
207 207

  
208 208
      switch(name)
209 209
        {
src/main/java/org/distorted/examples/flag/FlagRenderer.java
92 92
      mQuat1 = new Static4D(           0,         0,           0,          1);  // unity quaternion
93 93
      mQuat2 = new Static4D(-0.25189602f,0.3546389f,0.009657208f,0.90038127f);  // something semi-random that looks good
94 94

  
95
      Static3D waveCenter = new Static3D(mObjWidth, mObjHeight/2, mObjDepth/2);  // middle of the right edge
95
      Static3D waveCenter = new Static3D(mObjWidth/2, 0, 0);  // middle of the right edge
96 96
      Static4D waveRegion = new Static4D(0,0,0,mObjWidth);
97 97

  
98 98
      DistortedEffects effects = new DistortedEffects();
src/main/java/org/distorted/examples/wind/WindEffectsManager.java
104 104

  
105 105
  void apply(DistortedEffects effects)
106 106
    {
107
    Static3D midLeftMatrix= new Static3D(-mWidth/2,0,0);          // matrix effects center is in the middle
108
    Static3D midRight     = new Static3D(mWidth,mHeight/2,0);     //
109
    Static3D tadRight     = new Static3D(3*mWidth/4,mHeight/2,0); // vertex & fragment - in the lower-left
110
    Static4D windRegion   = new Static4D(0,0,0,mHeight);          //
107
    Static3D midLeft   = new Static3D(-mWidth/2,0,0);
108
    Static3D midRight  = new Static3D( mWidth/2,0,0);
109
    Static3D tadRight  = new Static3D( mWidth/4,0,0);
110
    Static4D windRegion= new Static4D(0,0,0,mHeight);
111 111

  
112 112
    setWind(0);
113 113

  
114 114
    effects.apply( new MatrixEffectScale(scaleFactor) );
115
    effects.apply( new MatrixEffectShear(shearFactor,midLeftMatrix) );
115
    effects.apply( new MatrixEffectShear(shearFactor,midLeft) );
116 116

  
117 117
    effects.apply( new VertexEffectDeform(deformForce,midRight) );
118 118
    effects.apply( new VertexEffectWave(windDynamic1, midRight, windRegion) );

Also available in: Unified diff