Project

General

Profile

« Previous | Next » 

Revision 2683f0c4

Added by Leszek Koltunski over 2 years ago

Bugfix for rotating the object in BandagedCreator mode.

View differences:

src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java
379 379

  
380 380
   public void setQuatTemp(float x, float y, float z, float w)
381 381
     {
382
     mSetQuatT = false;
383

  
382 384
     mQuatX = x;
383 385
     mQuatY = y;
384 386
     mQuatZ = z;
src/main/java/org/distorted/bandaged/BandagedCreatorView.java
25 25

  
26 26
public class BandagedCreatorView extends GLSurfaceView
27 27
{
28
    private final static float DIRECTION_SENSITIVITY= 12.0f;
29 28
    public static final int INVALID_POINTER_ID = -1;
30 29

  
31 30
    private BandagedCreatorRenderer mRenderer;
......
240 239
            mRenderer.setQuatTemp(px*sinA, py*sinA, pz*sinA, cosA);
241 240
            }
242 241
          }
243
        if( (mX-x)*(mX-x) + (mY-y)*(mY-y) > mScreenMin*mScreenMin/(DIRECTION_SENSITIVITY*DIRECTION_SENSITIVITY) )
244
          {
245
          mX = x;
246
          mY = y;
247
          mRenderer.resetQuats();
248
          }
242

  
243
        mRenderer.resetQuats();
244
        mX = x;
245
        mY = y;
249 246
        }
250 247
      }
251 248

  

Also available in: Unified diff