Project

General

Profile

« Previous | Next » 

Revision 59bbb86a

Added by Leszek Koltunski almost 8 years ago

- Javadoc for EffectNames
- make Matrix effects consistent with the rest (center of effect as last parameter!)
- bugfix for yesterday's bugfix (we only want to send 'EFFECT_REMOVED' messages if it was really the Application that called 'abortAll' and not when we are cleaning up everything)

View differences:

src/main/java/org/distorted/examples/cubes/CubesRenderer.java
118 118
    
119 119
      Static3D center = new Static3D(mCols*SIZE/2,mRows*SIZE/2, 0);
120 120
      
121
      mCubes.quaternion(center, mQuatInt1);
122
      mCubes.quaternion(center, mQuatInt2);
121
      mCubes.quaternion(mQuatInt1, center);
122
      mCubes.quaternion(mQuatInt2, center);
123 123
       
124 124
      Distorted.onSurfaceChanged(width, height); 
125 125
      }
src/main/java/org/distorted/examples/deform/DeformRenderer.java
248 248
                           break;
249 249
        case MODE_DEFORM : stretch.deform( mMovingDynamic, touchPoint);
250 250
                           break;
251
        case MODE_SHEAR  : shearID = stretch.shear(touchPoint, mMovingDynamic);
251
        case MODE_SHEAR  : shearID = stretch.shear(mMovingDynamic, touchPoint);
252 252
                           break;
253 253
        }                   
254 254
      }
......
291 291
                           break;
292 292
        case MODE_DEFORM : stretch.deform( mReleasedDynamic, touchPoint);
293 293
                           break;
294
        case MODE_SHEAR  : shearID = stretch.shear(touchPoint,mReleasedDynamic);
294
        case MODE_SHEAR  : shearID = stretch.shear(mReleasedDynamic, touchPoint);
295 295
                           break;
296 296
        }      
297 297
      }
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java
107 107
          {
108 108
          case Effects3DActivity.MOVE  : mCube.move(mMoveInter)                 ; break;
109 109
          case Effects3DActivity.SCALE : mCube.scale(mScaleInter)               ; break;
110
          case Effects3DActivity.ROTATE: mCube.rotate(mZeroPoint,mDynamicRotate); break;
111
          case Effects3DActivity.SHEAR : mCube.shear(mZeroPoint,mShearInter)    ; break;
110
          case Effects3DActivity.ROTATE: mCube.rotate(mDynamicRotate,mZeroPoint); break;
111
          case Effects3DActivity.SHEAR : mCube.shear(mShearInter, mZeroPoint)   ; break;
112 112
          }
113 113
        }
114 114
      }
src/main/java/org/distorted/examples/macroblock/MacroblockRenderer.java
138 138

  
139 139
      macroblock.move(diMove);
140 140
      macroblock.scale(diScale);
141
      macroblock.rotate( new Static3D(bmpWidth/2,bmpHeight/2,0), diRotate, new Static3D(0,0,1) );
141
      macroblock.rotate( diRotate, new Static3D(0,0,1), new Static3D(bmpWidth/2,bmpHeight/2,0) );
142 142

  
143 143
      Distorted.onSurfaceChanged(width, height); 
144 144
      }
src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
90 90
            {
91 91
            tmp = new DistortedBitmap(mLeaf, Distorted.CLONE_BITMAP);
92 92
            mCircleNode[i].attach(tmp);
93
            tmp.rotate(center, new Static1D(j*(360/NUM_LEAVES)), axis);
93
            tmp.rotate( new Static1D(j*(360/NUM_LEAVES)), axis, center );
94 94
            tmp.move(moveVector);
95 95
            }
96 96
          }
......
102 102
        mScreen.attach(mCircleNode[i]);
103 103
        tmp = (DistortedBitmap)mCircleNode[i].getObject();
104 104
        tmp.move( new Static3D(positions[2*i], positions[2*i+1], 0) );
105
        tmp.rotate( center, mRot, axis );
105
        tmp.rotate( mRot, axis, center );
106 106
        tmp.chroma( new Static1D(0.8f), new Static3D(colors[3*i],colors[3*i+1], colors[3*i+2]) );
107 107
        }
108 108
      }
src/main/java/org/distorted/examples/quaternion/QuaternionRenderer.java
110 110
      mCube.scale(factor);
111 111
      }
112 112
     
113
    mCube.quaternion( new Static3D(3*SIZE/2,3*SIZE/2,0), mRot);
113
    mCube.quaternion( mRot, new Static3D(3*SIZE/2,3*SIZE/2,0) );
114 114
       
115 115
    Distorted.onSurfaceChanged(width, height); 
116 116
    }
src/main/java/org/distorted/examples/starwars/StarWarsRenderer.java
176 176
      
177 177
      mStars[i].move( new Static3D(randomX,randomY,0) );
178 178
      mStars[i].scale( new Static3D(randomS,randomS,randomS) );
179
      mStars[i].rotate( center, new Static1D(randomA), axis);
179
      mStars[i].rotate( new Static1D(randomA), axis, center );
180 180
      
181 181
      Dynamic1D di = new Dynamic1D(randomTime,0.0f);
182 182
      di.setNoise(0.5f);
......
372 372
        di.add(new Static3D(screenW/2,-scale*crawlH, 0));
373 373
        
374 374
        mCrawlBackground.move( new Static3D(0,screenH-backH,0) );
375
        mCrawlBackground.rotate(new Static3D(screenW/2,backH,0), new Static1D(CRAWL_ANGLE), new Static3D(1,0,0) );
375
        mCrawlBackground.rotate( new Static1D(CRAWL_ANGLE), new Static3D(1,0,0), new Static3D(screenW/2,backH,0) );
376 376
        
377 377
        final int transpDist = 5;
378 378
        Static4D region = new Static4D(screenW/2,(1-transpDist)*backH,transpDist*backH,transpDist*backH);

Also available in: Unified diff