Revision 2241c459
Added by Leszek Koltunski over 2 years ago
| src/main/java/org/distorted/objectlib/objects/TwistyCoinTetrahedron.java | ||
|---|---|---|
| 72 | 72 |
{
|
| 73 | 73 |
if( mCuts==null ) |
| 74 | 74 |
{
|
| 75 |
float[] cut = new float[] { 0,SQ6/6};
|
|
| 75 |
float[] cut = new float[] { -0.620f,0.621f };
|
|
| 76 | 76 |
mCuts = new float[][] { cut,cut,cut,cut };
|
| 77 | 77 |
} |
| 78 | 78 |
|
| ... | ... | |
| 600 | 600 |
@Override |
| 601 | 601 |
public void adjustStickerCoords() |
| 602 | 602 |
{
|
| 603 |
float L = 0.025f;
|
|
| 603 |
float L = 0.02f; |
|
| 604 | 604 |
float Z = 0.06422593f - 0.25f*L; |
| 605 | 605 |
float X = 0.5f - L; |
| 606 | 606 |
|
| src/main/java/org/distorted/objectlib/touchcontrol/TouchControlShapeConstant.java | ||
|---|---|---|
| 301 | 301 |
if( offset<translated ) return i; |
| 302 | 302 |
} |
| 303 | 303 |
} |
| 304 |
else |
|
| 305 |
{
|
|
| 306 |
// poor hack for CoinTetrahedron where 0 happens to the the correct value. |
|
| 307 |
// in this case we have the rotAxis normal to the face, i.e. A here is 0. |
|
| 308 |
// we want to be rotating the central 'coin' where which happens to be row 0. |
|
| 309 |
return 0; |
|
| 310 |
} |
|
| 304 | 311 |
|
| 305 | 312 |
return len; |
| 306 | 313 |
} |
| ... | ... | |
| 389 | 396 |
output[1] =result.get1(); |
| 390 | 397 |
|
| 391 | 398 |
float len = (float)Math.sqrt(output[0]*output[0] + output[1]*output[1]); |
| 392 |
output[0] /= len; |
|
| 393 |
output[1] /= len; |
|
| 399 |
|
|
| 400 |
if( len!=0 ) |
|
| 401 |
{
|
|
| 402 |
output[0] /= len; |
|
| 403 |
output[1] /= len; |
|
| 404 |
} |
|
| 394 | 405 |
} |
| 395 | 406 |
|
| 396 | 407 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Coin Tetrahedron: progress