Project

General

Profile

« Previous | Next » 

Revision 71759555

Added by Leszek Koltunski almost 10 years ago

1) stop culling back face
2) reset OpenGL state beore each render (and not in onCreate)
3) Improve Matrix3D so that we can test negative Scales

View differences:

src/main/java/org/distorted/examples/matrix3d/Matrix3DEffect.java
138 138
                              float zm = (mInter[2]-50)*(sw+sh)/2;
139 139
                              mSta3.set(xm,ym,zm);
140 140
                              break;
141
      case SCALE            : float xs = (mInter[0]>50 ? 0.18f : 0.018f)*(mInter[0]-50) + 1;
142
                              float ys = (mInter[1]>50 ? 0.18f : 0.018f)*(mInter[1]-50) + 1;
143
                              float zs = (mInter[2]>50 ? 0.18f : 0.018f)*(mInter[2]-50) + 1;
141
      case SCALE            : float xs = (mInter[0]-50)/10.0f;
142
                              float ys = (mInter[1]-50)/10.0f;
143
                              float zs = (mInter[2]-50)/10.0f;
144 144
                              mSta3.set(xs,ys,zs);
145 145
                              break;
146 146
      case SHEAR            : float xsh = (mInter[0]-50)/25.0f;
......
205 205
      case 1: mInter[0] = 50;
206 206
      }
207 207

  
208
    if( mName==EffectNames.ROTATE || mName==EffectNames.QUATERNION ) mInter[1]= 100;
208
    if( mName==EffectNames.ROTATE || mName==EffectNames.QUATERNION )
209
      {
210
      mInter[1]= 100;
211
      }
212
    if( mName==EffectNames.SCALE )
213
      {
214
      mInter[0]= 60;
215
      mInter[1]= 60;
216
      mInter[2]= 60;
217
      }
209 218
    }
210 219

  
211 220
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff