Project

General

Profile

« Previous | Next » 

Revision 3c4a326c

Added by Leszek Koltunski about 4 years ago

More work on making new types of RubikObjects easily creatable.

View differences:

src/main/java/org/distorted/magic/RubikSurfaceView.java
27 27
import android.view.MotionEvent;
28 28

  
29 29
import org.distorted.library.type.Static2D;
30
import org.distorted.library.type.Static3D;
30 31
import org.distorted.library.type.Static4D;
31 32
import org.distorted.object.RubikObject;
32 33
import org.distorted.object.RubikObjectMovement;
......
264 265
                                           Static4D touchPoint2 = new Static4D(x, y, 0, 0);
265 266
                                           Static4D rotatedTouchPoint2= rotateVectorByInvertedQuat(touchPoint2, mQuatAccumulated);
266 267

  
267
                                           Static2D rot = mMovement.newRotation(rotatedTouchPoint2);
268
                                           Static4D rot = mMovement.newRotation(rotatedTouchPoint2);
268 269
                                           RubikObject object = mRenderer.getObject();
269 270

  
270
                                           object.beginNewRotation( (int)rot.get0(), (int)(object.getSize()*rot.get1()) );
271
                                           object.beginNewRotation( new Static3D(rot.get0(),rot.get1(),rot.get2()), (int)(object.getSize()*rot.get3()) );
271 272

  
272 273
                                           if( RubikState.getCurrentState()==RubikState.SOLV )
273 274
                                             {

Also available in: Unified diff