commit a70b1e96ecdaef6662fbe553b5449ac34b1ab991
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Fri Jun 2 10:55:47 2023 +0200

    Actually use the 'overridable rotation factors' feature and tweat the factors of many objects.

diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyCoinHexahedron.java b/src/main/java/org/distorted/objectlib/objects/TwistyCoinHexahedron.java
index eda0a14e..549b4994 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyCoinHexahedron.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyCoinHexahedron.java
@@ -99,6 +99,19 @@ public class TwistyCoinHexahedron extends ShapeHexahedron
     return ScrambleEdgeGenerator.getScramblingAlgorithms(mBasicAngle, mRotatable);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C1 = 2.5f;
+    float C2 = 1.0f;
+    float[] f1 = new float[] { C1,C1,C1 };
+    float[] f2 = new float[] { C2,C2,C2 };
+
+    return new float[][] { f1,f1,f1,f1, f2,f2,f2 };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public float[][] getCuts(int[] numLayers)
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyCoinTetrahedron.java b/src/main/java/org/distorted/objectlib/objects/TwistyCoinTetrahedron.java
index 95b5fd93..ed06ae2f 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyCoinTetrahedron.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyCoinTetrahedron.java
@@ -59,6 +59,17 @@ public class TwistyCoinTetrahedron extends ShapeTetrahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C1 = 1.0f;
+    float C2 = 1.7f;
+    float[] f = new float[] { C1,C1,C2 };
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int[][] getScrambleEdges()
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyContainer.java b/src/main/java/org/distorted/objectlib/objects/TwistyContainer.java
index f8d8b1a8..6aba0b79 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyContainer.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyContainer.java
@@ -51,6 +51,16 @@ public class TwistyContainer extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 1.3f;
+    float[] f = new float[] {C,C};
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // we want colorful insides
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
index 5b48e172..c327c257 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
@@ -54,6 +54,17 @@ public class TwistyDiamond extends ShapeOctahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    int numL = getNumLayers()[0];
+    float[] f = new float[numL];
+    for(int i=0; i<numL; i++) f[i] = 1.5f;
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int[][] getScrambleEdges()
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
index 8fa89317..a59e8cdf 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
@@ -49,6 +49,16 @@ abstract class TwistyDino extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 1.5f;
+    float[] f = new float[] { C,C,C };
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public float[][] getCuts(int[] numLayers)
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
index a679b104..289ab289 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
@@ -54,6 +54,16 @@ public class TwistyHelicopter extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 2.2f;
+    float[] f = new float[] { C,C,C };
+    return new float[][] { f,f,f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int[][] getScrambleEdges()
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java b/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
index b7ffed98..ef702b51 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyIvy.java
@@ -55,6 +55,16 @@ public class TwistyIvy extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 1.5f;
+    float[] f = new float[] { C,C };
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // ditto, manually provide the sticker coordinates.
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyJing.java b/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
index 49e6a3c4..7a53dd4a 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyJing.java
@@ -57,6 +57,17 @@ public class TwistyJing extends ShapeTetrahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    int numL = getNumLayers()[0];
+    float[] f = new float[numL];
+    for(int i=0; i<numL; i++) f[i] = 1.3f;
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMasterball.java b/src/main/java/org/distorted/objectlib/objects/TwistyMasterball.java
index c061f15c..cc995acb 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMasterball.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMasterball.java
@@ -54,6 +54,18 @@ public class TwistyMasterball extends ShapeDiamond
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C1 = 1.0f;
+    float C2 = 1.7f;
+    float[] f1 = new float[] { C1,C1,C1,C1 };
+    float[] f2 = new float[] { C2,C2};
+    return new float[][] { f1,f2,f2,f2,f2 };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // make the equator a bit thicker
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyMorphix.java b/src/main/java/org/distorted/objectlib/objects/TwistyMorphix.java
index d5aa1066..09689aa4 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyMorphix.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyMorphix.java
@@ -56,6 +56,17 @@ public class TwistyMorphix extends ShapeTetrahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    int numL = getNumLayers()[0];
+    float[] f = new float[numL];
+    for(int i=0; i<numL; i++) f[i] = 1.3f;
+    return new float[][] { f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDiamond.java b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDiamond.java
index 8302dead..98036619 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDiamond.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDiamond.java
@@ -53,6 +53,16 @@ public class TwistyPyraminxDiamond extends ShapeOctahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 1.5f;
+    float[] f = new float[] {C,C,C};
+    return new float[][] { f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // single edge; middle layers don't move
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDuo.java b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDuo.java
index 4787e7d0..736872fa 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDuo.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyPyraminxDuo.java
@@ -55,6 +55,15 @@ public class TwistyPyraminxDuo extends ShapeTetrahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float[] f = new float[] {1.4f,1.8f};
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // single edge; only the tip layers move
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java b/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
index 21ca98bb..43063aeb 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyRedi.java
@@ -51,6 +51,16 @@ public class TwistyRedi extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 1.5f;
+    float[] f = new float[] { C,C,C };
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int[][] getScrambleEdges()
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyRex.java b/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
index ee5ece4b..834f9658 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyRex.java
@@ -54,6 +54,16 @@ public class TwistyRex extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C = 1.5f;
+    float[] f = new float[] { C,C,C };
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java b/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
index 5b221817..ec5a1b4d 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySkewb.java
@@ -52,6 +52,17 @@ public class TwistySkewb extends ShapeHexahedron
     super(meshState, iconMode, 2*data.getNumLayers()[0]-2, quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    int numL = getNumLayers()[0];
+    float[] f = new float[numL];
+    for(int i=0; i<numL; i++) f[i] = 1.7f;
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int[][] getScrambleEdges()
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
index 6efbb71b..3108aa75 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare.java
@@ -48,6 +48,22 @@ abstract class TwistySquare extends ShapeHexahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  abstract float getFactor();
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C1 = getFactor();
+    float C2 = 1.8f;
+    float[] f1 = new float[] { C1,C1,C1,C1,C1,C1,C1,C1,C1,C1,C1,C1 };
+    float[] f2 = new float[] { C2,C2 };
+    return new float[][] { f1,f2,f1 };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare0.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare0.java
index 8679efd0..85b0b8f1 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare0.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare0.java
@@ -36,6 +36,13 @@ public class TwistySquare0 extends TwistySquare
     super(meshState, iconMode, quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  float getFactor()
+    {
+    return 1.3f;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int[][] getScrambleEdges()
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
index b11f93b3..3f12af2e 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare1.java
@@ -37,6 +37,13 @@ public class TwistySquare1 extends TwistySquare
     super(meshState, iconMode, quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  float getFactor()
+    {
+    return 1.0f;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java b/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
index 216c7b85..2dd794ee 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistySquare2.java
@@ -37,6 +37,13 @@ public class TwistySquare2 extends TwistySquare
     super(meshState, iconMode, quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  float getFactor()
+    {
+    return 0.8f;
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyTins.java b/src/main/java/org/distorted/objectlib/objects/TwistyTins.java
index 28e79b4b..8d8077f5 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyTins.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyTins.java
@@ -75,6 +75,17 @@ public class TwistyTins extends ShapeHexahedron
     return ScrambleEdgeGenerator.getScramblingAlgorithms(mBasicAngle, mRotatable);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    float C1 = 1.7f;
+    float C2 = 2.5f;
+    float[] f = new float[] { C2,C1,C1,C1,C2 };
+    return new float[][] { f,f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public float[][] getCuts(int[] numLayers)
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java b/src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java
index 83f4abf7..c85ebbb1 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyTrajber.java
@@ -56,6 +56,17 @@ public class TwistyTrajber extends ShapeOctahedron
     super(meshState, iconMode, data.getNumLayers()[0], quat, move, scale, data, asset);
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  @Override
+  public float[][] returnRotationFactor()
+    {
+    int numL = getNumLayers()[0];
+    float[] f = new float[numL];
+    for(int i=0; i<numL; i++) f[i] = 1.4f;
+    return new float[][] { f,f,f };
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   @Override
