Project

General

Profile

« Previous | Next » 

Revision 7a44bbc2

Added by Leszek Koltunski almost 3 years ago

Progress with RubikControl.

View differences:

src/main/java/org/distorted/control/RubikControlRotate.java
22 22
import org.distorted.library.effect.MatrixEffectScale;
23 23
import org.distorted.library.main.DistortedEffects;
24 24
import org.distorted.library.main.DistortedNode;
25
import org.distorted.library.main.DistortedScreen;
25 26
import org.distorted.library.main.DistortedTexture;
26 27
import org.distorted.library.mesh.MeshQuad;
27 28
import org.distorted.library.type.Dynamic;
......
52 53
      mEffects   = new DistortedEffects[NUM_NODE];
53 54
      mEffects[0]= new DistortedEffects();
54 55

  
56
      DistortedScreen screen = mControl.getScreen();
57
      int wid = screen.getWidth();
58

  
55 59
      Static3D scaleStart= new Static3D(1,1,1);
56
      Static3D scaleEnd  = new Static3D(1000,1000,1000);
60
      Static3D scaleEnd  = new Static3D(wid,wid,wid);
57 61

  
58 62
      mDynamic = new Dynamic3D(10000,0.5f);
59 63
      mDynamic.add(scaleStart);
src/main/java/org/distorted/control/RubikControlWhole.java
86 86
      float x1 = wid*0.35f;
87 87
      float y1 = hei*0.28f;
88 88
      float z  = 0;
89
      float handScale = wid*0.33f;
90
      float circScale = handScale*0.5f;
89 91

  
90 92
      Static3D point0 = new Static3D(-x1,-y1,z);
91 93
      Static3D point1 = new Static3D(  0,-y1,z);
......
113 115
      mMoveHand1.notifyWhenFinished(mControl);
114 116
      mEffectID = mMoveHand1.getID();
115 117

  
116
      mEffects[0].apply( new MatrixEffectScale(150));
118
      mEffects[0].apply( new MatrixEffectScale(circScale));
117 119
      mEffects[0].apply(mMoveHand1);
118
      mEffects[2].apply( new MatrixEffectScale(300));
120
      mEffects[2].apply( new MatrixEffectScale(handScale));
119 121
      mEffects[2].apply(mMoveHand1);
120 122
      }
121 123
    else

Also available in: Unified diff