Revision 8a40abf4
Added by Leszek Koltunski about 5 years ago
src/main/java/org/distorted/examples/rubik/RubikCube.java | ||
---|---|---|
87 | 87 |
Static3D center = new Static3D(TEXTURE_SIZE*0.5f, TEXTURE_SIZE*0.5f, TEXTURE_SIZE*0.5f); |
88 | 88 |
Static4D region = new Static4D(0,0,0, TEXTURE_SIZE*0.72f); |
89 | 89 |
|
90 |
VertexEffectSink sinkEffect = new VertexEffectSink( new Static1D(3.0f - 1.8f/mSize), center, region );
|
|
90 |
VertexEffectSink sinkEffect = new VertexEffectSink( new Static1D(getSinkStrength()), center, region );
|
|
91 | 91 |
MatrixEffectMove moveEffect = new MatrixEffectMove(move); |
92 | 92 |
MatrixEffectScale scaleEffect = new MatrixEffectScale(scale); |
93 | 93 |
MatrixEffectQuaternion quatCEffect = new MatrixEffectQuaternion(quatC, center); |
... | ... | |
286 | 286 |
} |
287 | 287 |
} |
288 | 288 |
|
289 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
290 |
|
|
291 |
private float getSinkStrength() |
|
292 |
{ |
|
293 |
switch(mSize) |
|
294 |
{ |
|
295 |
case 1 : return 1.1f; |
|
296 |
case 2 : return 1.5f; |
|
297 |
case 3 : return 1.8f; |
|
298 |
case 4 : return 2.0f; |
|
299 |
default: return 3.0f - 4.0f/mSize; |
|
300 |
} |
|
301 |
} |
|
302 |
|
|
289 | 303 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
290 | 304 |
|
291 | 305 |
private boolean belongsToRotation(int x, int y, int z, int vector, int row) |
Also available in: Unified diff
Rubk App: improve 4 buttons in the top.