Project

General

Profile

« Previous | Next » 

Revision 09b76d08

Added by Leszek Koltunski over 2 years ago

Bandaged: progress with creating the object.

View differences:

src/main/java/org/distorted/bandaged/BandagedCreatorRenderer.java
67 67
   private final DistortedScreen mScreen;
68 68
   private final Static3D mScale;
69 69
   private final Static4D mQuatT, mQuatA;
70
   private final int[] mObjSize;
70 71

  
71 72
   private BandagedCubit[] mCubits;
72 73
   private boolean mInitialPhase;
......
99 100
     mCreatingCubits   = false;
100 101

  
101 102
     mSaveIcon = -1;
103
     mObjSize  = new int[3];
102 104

  
103 105
     mScreen = new DistortedScreen();
104 106
     mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f);
......
404 406
         }
405 407

  
406 408
     TwistyBandagedGeneric.setPositions(pos);
407
     TwistyObject obj = new TwistyBandagedGeneric( new int[] {3,3,3}, TwistyObject.MESH_NICE, TwistyObject.MODE_NORM,
409
     TwistyObject obj = new TwistyBandagedGeneric( mObjSize, TwistyObject.MESH_NICE, TwistyObject.MODE_NORM,
408 410
                                                   new Static4D(0,0,0,1), new Static3D(0,0,0), 1.0f, null );
409 411
     String name = obj.getShortName();
410 412
     BandagedCreatorActivity act = (BandagedCreatorActivity) mView.getContext();
......
481 483
     final int FBO_HEIGHT = (int)(R*360);
482 484
     final float OBJECT_SIZE = R*0.38f;
483 485

  
484
     TwistyObject obj = new TwistyBandagedGeneric( new int[] {3,3,3}, TwistyObject.MESH_NICE, TwistyObject.MODE_ICON,
486
     TwistyObject obj = new TwistyBandagedGeneric( mObjSize, TwistyObject.MESH_NICE, TwistyObject.MODE_ICON,
485 487
                                                   ShapeHexahedron.DEFAULT_ROT, new Static3D(0,0,0), OBJECT_SIZE, null );
486 488

  
487 489
     DistortedEffects effects = obj.getObjectEffects();
......
558 560
       mY = y;
559 561
       mZ = z;
560 562

  
563
       mObjSize[0] = mX;
564
       mObjSize[1] = mY;
565
       mObjSize[2] = mZ;
566

  
561 567
       mNumCubits = computeNumCubits(mX,mY,mZ);
562 568

  
563 569
       mCreatingCubits = true;

Also available in: Unified diff