commit 1686159989c54b790e5c47ee042333940fcb0d88
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Wed Sep 15 23:24:40 2021 +0200

    Make Rex standard size (cube size=3, i.e. equal to numLayers so that DIST2D and DIST3D are standard)

diff --git a/src/main/java/org/distorted/objects/MovementRex.java b/src/main/java/org/distorted/objects/MovementRex.java
index 22f96f9f..daf82aad 100644
--- a/src/main/java/org/distorted/objects/MovementRex.java
+++ b/src/main/java/org/distorted/objects/MovementRex.java
@@ -25,8 +25,8 @@ import org.distorted.library.type.Static3D;
 
 class MovementRex extends Movement
 {
-  static final float DIST3D = 0.166f;
-  static final float DIST2D = 0.166f;
+  static final float DIST3D = 0.5f;
+  static final float DIST2D = 0.5f;
 
   static final Static3D[] FACE_AXIS = new Static3D[]
          {
diff --git a/src/main/java/org/distorted/objects/TwistyRex.java b/src/main/java/org/distorted/objects/TwistyRex.java
index b1fda998..551539c1 100644
--- a/src/main/java/org/distorted/objects/TwistyRex.java
+++ b/src/main/java/org/distorted/objects/TwistyRex.java
@@ -119,7 +119,7 @@ public class TwistyRex extends TwistyObject
 
   float getScreenRatio()
     {
-    return 1.5f;
+    return 0.5f;
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -162,7 +162,7 @@ public class TwistyRex extends TwistyObject
 
   float[][] getCuts(int numLayers)
     {
-    float C = SQ3*0.15f; // bit less than 1/6 of the length of the main diagonal
+    float C = SQ3*0.45f; // bit less than 1/2 of the length of the main diagonal
     float[] cut = new float[] {-C,+C};
     return new float[][] { cut,cut,cut,cut };
     }
@@ -178,9 +178,9 @@ public class TwistyRex extends TwistyObject
 
   float[][] getCubitPositions(int numLayers)
     {
-    final float DIST1= 0.50f;
-    final float DIST2= (1+2*REX_D)/6;
-    final float DIST3= 0.51f;
+    final float DIST1= 1.50f;
+    final float DIST2= (1+2*REX_D)/2;
+    final float DIST3= 1.53f;
 
     final float[][] CENTERS = new float[24+6+12][];
 
@@ -241,75 +241,39 @@ public class TwistyRex extends TwistyObject
     if( variant==0 )
       {
       float G = (1-REX_D)*SQ2/2;
-
-      double[][] vertices =
-         {
-             {  -0.033333f, 0.23333f, 0.0f },
-             {  -0.233333f, 0.03333f, 0.0f },
-             {  +0.216666f,-0.23666f, 0.0f },
-             {  +0.236666f,-0.21666f, 0.0f }
-         };
-
+      double[][] vertices ={{-0.10f,0.70f,0},{-0.70f,0.10f,0},{+0.65f,-0.71f,0},{+0.71f,-0.65f,0}};
       int[][] vertIndexes = { {0,1,2,3},{3,2,1,0} };
-      float[][] centers= new float[][] { {0.0f,0.0f,-G/3} };
-      float[][] corners= new float[][] { {0.03f,0.10f} };
+      float[][] centers= new float[][] { {0.0f,0.0f,-G} };
+      float[][] corners= new float[][] { {0.03f,0.30f} };
       int[] indices= {-1,-1,0,0};
       int[] bandIndices= new int[] { 0,1 };
+      float[][] bands = { {+0.016f,10,G/3,0.5f,5,1,1},{+0.230f,45,G/3,0.0f,2,0,0} };
 
-      float[][] bands =
-        {
-            {+0.016f,10,G/3,0.5f,5,1,1},
-            {+0.230f,45,G/3,0.0f,2,0,0}
-        };
       return new ObjectShape(vertices,vertIndexes,bands,bandIndices,corners,indices,centers,indices,getNumCubitFaces(), null);
       }
     else if( variant==1 )
       {
-      double[][] vertices =
-        {
-            { -REX_D,   0.0f, 0.0f },
-            {   0.0f, -REX_D, 0.0f },
-            { +REX_D,   0.0f, 0.0f },
-            {   0.0f, +REX_D, 0.0f }
-        };
-
+      float G = 3*REX_D;
+      double[][] vertices= { { -G, 0, 0 },{ 0, -G, 0 },{ +G, 0, 0 },{ 0,+G,0 } };
       int[][] vertIndexes= { {0,1,2,3},{3,2,1,0} };
       int[] indices= {-1,-1,-1,-1};
       int[] bandIndices= new int[] { 0,1 };
-
-      float[][] bands =
-        {
-            {0.025f,10,REX_D/2,0.5f,5,0,0},
-            {0.000f,45,REX_D/2,0.0f,2,0,0}
-        };
+      float[][] bands = { {0.025f,10,G/2,0.5f,5,0,0},{0.000f,45,G/2,0.0f,2,0,0} };
 
       return new ObjectShape(vertices,vertIndexes,bands,bandIndices,null,indices,null,indices,getNumCubitFaces(), null);
       }
     else
       {
-      float E = 0.5f - REX_D;
-      float F = 0.5f;
+      float E = 1.5f - 3*REX_D;
+      float F = 1.5f;
       float G = (float)Math.sqrt(E*E+F*F);
-
-      double[][] vertices =
-         {
-             { -F, 0, 0 },
-             {  0,-E, 0 },
-             { +F, 0, 0 },
-             {  0, 0,-E },
-         };
-
+      double[][] vertices = { { -F, 0, 0 },{  0,-E, 0 },{ +F, 0, 0 },{  0, 0,-E } };
       int[][] vertIndexes = { {0,1,2}, {0,2,3}, {0,3,1}, {1,3,2} };
-      float[][] centers= new float[][] { {0.0f,-0.5f,-0.5f} };
-      float[][] corners= new float[][] { {0.06f,0.10f} };
+      float[][] centers= new float[][] { {0.0f,-1.5f,-1.5f} };
+      float[][] corners= new float[][] { {0.06f,0.20f} };
       int[] indices= {0,-1,0,-1};
       int[] bandIndices= new int[] { 0,0,1,1 };
-
-      float[][] bands =
-        {
-           {0.03f,27,F/3,0.8f,5,2,3},
-           {0.01f,45,G/3,0.2f,3,1,2}
-        };
+      float[][] bands = { {0.03f,27,F/3,0.8f,5,2,3},{0.01f,45,G/3,0.2f,3,1,2} };
 
       return new ObjectShape(vertices,vertIndexes,bands,bandIndices,corners,indices,centers,indices,getNumCubitFaces(), null);
       }
diff --git a/src/main/res/raw/rex.dmesh b/src/main/res/raw/rex.dmesh
index 933b611b..ac0dfe9e 100644
Binary files a/src/main/res/raw/rex.dmesh and b/src/main/res/raw/rex.dmesh differ
