commit c7e79b690ad368ffbbcc36564202795e69b12232
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Mon Aug 10 22:31:36 2020 +0100

    Progress with Dino Movement

diff --git a/src/main/java/org/distorted/main/RubikSurfaceView.java b/src/main/java/org/distorted/main/RubikSurfaceView.java
index df236b74..ec31fd89 100644
--- a/src/main/java/org/distorted/main/RubikSurfaceView.java
+++ b/src/main/java/org/distorted/main/RubikSurfaceView.java
@@ -58,16 +58,7 @@ public class RubikSurfaceView extends GLSurfaceView
     // Moving the finger by 0.3 of an inch will start a Rotation.
     private final static float ROTATION_SENSITIVITY = 0.3f;
 
-    // Where did we get this sqrt(3)/2 ? From the (default, i.e. 60 degrees - see InternalOutputSurface!)
-    // FOV of the projection matrix of the Node onto the Screen.
-    // Take a look how the CAMERA_POINT is used in onTouchEvent - (x,y) there are expressed in sort of
-    // 'half-NDC' coordinates i.e. they range from +0.5 to -0.5; thus CAMERA_POINT also needs to be
-    // in 'half-NDC'. Since in this coordinate system the height of the screen is equal to 1, then the
-    // Z-distance from the center of the object to the camera is equal to (scrHeight/2)/tan(FOV/2) =
-    // 0.5/tan(30) = sqrt(3)/2.
-    // Why is the Z-distance between the camera and the object equal to (scrHeight/2)/tan(FOV/2)?
-    // Because of the way the View part of the ModelView matrix is constructed in EffectQueueMatrix.send().
-    private final Static4D CAMERA_POINT = new Static4D(0, 0, (float)Math.sqrt(3)*0.5f, 0);
+    private final Static4D CAMERA_POINT = new Static4D(0, 0, 1, 0);
 
     private RubikRenderer mRenderer;
     private RubikPreRender mPreRender;
diff --git a/src/main/java/org/distorted/objects/RubikCube.java b/src/main/java/org/distorted/objects/RubikCube.java
index 7ac695eb..25f0e1c8 100644
--- a/src/main/java/org/distorted/objects/RubikCube.java
+++ b/src/main/java/org/distorted/objects/RubikCube.java
@@ -53,9 +53,9 @@ class RubikCube extends RubikObject
   // the six axis that determine the faces
   static final Static3D[] FACE_AXIS = new Static3D[]
          {
-           new Static3D(-1,0,0), new Static3D(1,0,0),
-           new Static3D(0,-1,0), new Static3D(0,1,0),
-           new Static3D(0,0,-1), new Static3D(0,0,1)
+           new Static3D(1,0,0), new Static3D(-1,0,0),
+           new Static3D(0,1,0), new Static3D(0,-1,0),
+           new Static3D(0,0,1), new Static3D(0,0,-1)
          };
 
   private static final int[] FACE_COLORS = new int[]
diff --git a/src/main/java/org/distorted/objects/RubikDino.java b/src/main/java/org/distorted/objects/RubikDino.java
index a4f0481e..c271edc7 100644
--- a/src/main/java/org/distorted/objects/RubikDino.java
+++ b/src/main/java/org/distorted/objects/RubikDino.java
@@ -94,18 +94,18 @@ public class RubikDino extends RubikObject
   // centers of the 12 edges. Must be in the same order like QUATs above.
   private static final Static3D[] CENTERS = new Static3D[]
          {
-           new Static3D( 0.0f, 0.5f, 0.5f ),
-           new Static3D( 0.5f, 0.0f, 0.5f ),
-           new Static3D( 0.0f,-0.5f, 0.5f ),
-           new Static3D(-0.5f, 0.0f, 0.5f ),
-           new Static3D( 0.5f, 0.5f, 0.0f ),
-           new Static3D( 0.5f,-0.5f, 0.0f ),
-           new Static3D(-0.5f,-0.5f, 0.0f ),
-           new Static3D(-0.5f, 0.5f, 0.0f ),
-           new Static3D( 0.0f, 0.5f,-0.5f ),
-           new Static3D( 0.5f, 0.0f,-0.5f ),
-           new Static3D( 0.0f,-0.5f,-0.5f ),
-           new Static3D(-0.5f, 0.0f,-0.5f )
+           new Static3D( 0.0f, 1.5f, 1.5f ),
+           new Static3D( 1.5f, 0.0f, 1.5f ),
+           new Static3D( 0.0f,-1.5f, 1.5f ),
+           new Static3D(-1.5f, 0.0f, 1.5f ),
+           new Static3D( 1.5f, 1.5f, 0.0f ),
+           new Static3D( 1.5f,-1.5f, 0.0f ),
+           new Static3D(-1.5f,-1.5f, 0.0f ),
+           new Static3D(-1.5f, 1.5f, 0.0f ),
+           new Static3D( 0.0f, 1.5f,-1.5f ),
+           new Static3D( 1.5f, 0.0f,-1.5f ),
+           new Static3D( 0.0f,-1.5f,-1.5f ),
+           new Static3D(-1.5f, 0.0f,-1.5f )
          };
 
   private static final int[] mFaceMap = {2,4, 4,0, 3,4, 4,1,
@@ -228,7 +228,7 @@ public class RubikDino extends RubikObject
 
     MatrixEffectMove   moveEffect = new MatrixEffectMove  ( new Static3D(0.0f,SQ3*SQ2/12,SQ3/6) );
     MatrixEffectRotate rot1Effect = new MatrixEffectRotate( new Static1D(180+ANGLE_FACES/2), axis, cent);
-    MatrixEffectScale  scalEffect = new MatrixEffectScale ( new Static3D(1.0f, SQ2/2, 0.5f) );
+    MatrixEffectScale  scalEffect = new MatrixEffectScale ( new Static3D(3.0f, 3*SQ2/2, 1.5f) );
     MatrixEffectRotate rot2Effect = new MatrixEffectRotate( new Static1D(-45), axis, cent);
 
     mMesh.apply(moveEffect, 0xffffffff, 0);
@@ -241,7 +241,7 @@ public class RubikDino extends RubikObject
 
   float getScreenRatio()
     {
-    return 1.5f;
+    return 0.5f;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
