Project

General

Profile

« Previous | Next » 

Revision ad98c3cb

Added by Leszek Koltunski over 4 years ago

new VertexEffectRotate

View differences:

src/main/java/org/distorted/examples/generic/GenericEffect.java
44 44
import org.distorted.library.effect.VertexEffectMove;
45 45
import org.distorted.library.effect.VertexEffectPinch;
46 46
import org.distorted.library.effect.VertexEffectQuaternion;
47
import org.distorted.library.effect.VertexEffectRotate;
47 48
import org.distorted.library.effect.VertexEffectSink;
48 49
import org.distorted.library.effect.VertexEffectSwirl;
49 50
import org.distorted.library.effect.VertexEffectWave;
......
109 110

  
110 111
    switch(mName)
111 112
      {
112
      case ROTATE           : effect = new MatrixEffectRotate      (mDyn1, mDyn3, mCenterDyn);break;
113
      case QUATERNION       : effect = new MatrixEffectQuaternion  (mDyn4, mCenterDyn); break;
114
      case MOVE             : effect = new MatrixEffectMove        (mDyn3)            ; break;
115
      case SCALE            : effect = new MatrixEffectScale       (mDyn3)            ; break;
116
      case SHEAR            : effect = new MatrixEffectShear       (mDyn3, mCenterDyn); break;
113
      case ROTATE           : effect = new MatrixEffectRotate      (mDyn1, mDyn3, mCenterDyn); break;
114
      case QUATERNION       : effect = new MatrixEffectQuaternion  (mDyn4, mCenterDyn)       ; break;
115
      case MOVE             : effect = new MatrixEffectMove        (mDyn3)                   ; break;
116
      case SCALE            : effect = new MatrixEffectScale       (mDyn3)                   ; break;
117
      case SHEAR            : effect = new MatrixEffectShear       (mDyn3, mCenterDyn)       ; break;
117 118

  
118 119
      case DISTORT          : effect = new VertexEffectDistort     (mDyn3, mCenterDyn, mRegion4Dyn); break;
119 120
      case DEFORM           : effect = new VertexEffectDeform      (mDyn3, mCenterDyn, mRegion4Dyn); break;
......
123 124
      case WAVE             : effect = new VertexEffectWave        (mDyn5, mCenterDyn, mRegion4Dyn); break;
124 125
      case VERTEX_MOVE      : effect = new VertexEffectMove        (mDyn3)                         ; break;
125 126
      case VERTEX_QUATERNION: effect = new VertexEffectQuaternion  (mDyn4, mCenterDyn)             ; break;
127
      case VERTEX_ROTATE    : effect = new VertexEffectRotate      (mDyn1, mDyn3, mCenterDyn)      ; break;
126 128

  
127 129
      case ALPHA            : effect = new FragmentEffectAlpha     (mDyn1,        mCenterDyn, mRegion3Dyn, false); break;
128 130
      case SMOOTH_ALPHA     : effect = new FragmentEffectAlpha     (mDyn1,        mCenterDyn, mRegion3Dyn, true ); break;
......
157 159
      // MATRIX (and VERTEX-pseudo-matrix)
158 160
      ///////////////////////////////////////////////////////////////////////////////////////
159 161

  
162
      case VERTEX_ROTATE    :
160 163
      case ROTATE           : float an = (mInter[0]-50)*180/50.0f;
161 164
                              float rx = (mInter[1]-50)/ 50.0f;
162 165
                              float ry = (mInter[2]-50)/ 50.0f;
......
273 276
      }
274 277

  
275 278
    if( mName==EffectName.ROTATE         ||
276
        mName==EffectName.QUATERNION     ||
279
        mName==EffectName.VERTEX_ROTATE   )
280
      {
281
      mInter[1]= 100;
282
      }
283
    if( mName==EffectName.QUATERNION     ||
277 284
        mName==EffectName.VERTEX_QUATERNION )
278 285
      {
279 286
      mInter[0]= 100;

Also available in: Unified diff