Project

General

Profile

« Previous | Next » 

Revision 698ad0a8

Added by Leszek Koltunski about 4 years ago

Move the Effects.setStretch to Meshbase.setStretch

View differences:

src/main/java/org/distorted/examples/rubik/RubikCube.java
130 130
              tmpBottom= (y==       0 ? mapBottom:mapBlack);
131 131

  
132 132
              mCubes[x][y][z]           = new MeshCubes(vertices,vertices,vertices, tmpFront, tmpBack, tmpLeft, tmpRight, tmpTop, tmpBottom);
133
              mCubes[x][y][z].setStretch(STRETCH_SIZE,STRETCH_SIZE,STRETCH_SIZE);
134

  
133 135
              cubeVectors[x][y][z]      = new Static3D( STRETCH_SIZE*(x-nc), STRETCH_SIZE*(y-nc), STRETCH_SIZE*(z-nc) );
134 136
              mRotationAngle[x][y][z]   = new Dynamic1D();
135 137
              mRotationAxis[x][y][z]    = new Static3D(1,0,0);
......
138 140
              mRotationAngle[x][y][z].add(new Static1D(0.0f));
139 141
              mRotate[x][y][z] = new MatrixEffectRotate( mRotationAngle[x][y][z], mRotationAxis[x][y][z], center);
140 142

  
141
              mEffects[x][y][z] = new DistortedEffects(STRETCH_SIZE,STRETCH_SIZE,STRETCH_SIZE);
143
              mEffects[x][y][z] = new DistortedEffects();
142 144
              mEffects[x][y][z].apply( new MatrixEffectMove(cubeVectors[x][y][z]) );
143 145
              mEffects[x][y][z].apply( mRotate[x][y][z] );
144 146
              mEffects[x][y][z].apply(quatEffect);

Also available in: Unified diff