Revision c7a98f94
Added by Leszek Koltunski about 4 years ago
| src/main/java/org/distorted/objects/Movement12.java | ||
|---|---|---|
| 28 | 28 |
import org.distorted.library.type.Static3D; |
| 29 | 29 |
|
| 30 | 30 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 31 |
// Dodecahedral objects: map the 2D swipes of user's fingers to 3D rotations |
|
| 31 | 32 |
|
| 32 | 33 |
abstract class Movement12 extends Movement |
| 33 | 34 |
{
|
| src/main/java/org/distorted/objects/Movement4.java | ||
|---|---|---|
| 22 | 22 |
import org.distorted.library.type.Static3D; |
| 23 | 23 |
|
| 24 | 24 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 25 |
// Tetrahedral objects: map the 2D swipes of user's fingers to 3D rotations |
|
| 25 | 26 |
|
| 26 | 27 |
abstract class Movement4 extends Movement |
| 27 | 28 |
{
|
| ... | ... | |
| 44 | 45 |
} |
| 45 | 46 |
|
| 46 | 47 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 48 |
// Jing has nL=2 |
|
| 47 | 49 |
|
| 48 | 50 |
public float returnRotationFactor(int numLayers, int row) |
| 49 | 51 |
{
|
| 50 |
return ((float)numLayers)/(numLayers-row); |
|
| 52 |
return numLayers==2 ? 1.0f : ((float)numLayers)/(numLayers-row);
|
|
| 51 | 53 |
} |
| 52 | 54 |
|
| 53 | 55 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| src/main/java/org/distorted/objects/Movement6.java | ||
|---|---|---|
| 22 | 22 |
import org.distorted.library.type.Static3D; |
| 23 | 23 |
|
| 24 | 24 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 25 |
// Hexahedral objects: map the 2D swipes of user's fingers to 3D rotations |
|
| 25 | 26 |
|
| 26 | 27 |
abstract class Movement6 extends Movement |
| 27 | 28 |
{
|
| src/main/java/org/distorted/objects/Movement8.java | ||
|---|---|---|
| 22 | 22 |
import org.distorted.library.type.Static3D; |
| 23 | 23 |
|
| 24 | 24 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
| 25 |
// Octahedral objects: map the 2D swipes of user's fingers to 3D rotations |
|
| 25 | 26 |
|
| 26 | 27 |
abstract class Movement8 extends Movement |
| 27 | 28 |
{
|
Also available in: Unified diff
Minor