commit 03ad46a918c943783ea1aa607913de5bcf277a30
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Tue Dec 28 19:16:29 2021 +0100

    Progress standarising stickering.

diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
index 814a9a6d..1a56b8d2 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
@@ -286,29 +286,6 @@ abstract class TwistyBandagedAbstract extends ShapeHexahedron
     return 0;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public ObjectSticker retSticker(int sticker)
-    {
-    if( mStickers==null )
-      {
-      int numStickers = mStickerCoords.length;
-      mStickers = new ObjectSticker[numStickers];
-
-      for(int s=0; s<numStickers; s++)
-        {
-        float scale = mStickerScales[s];
-        float radius = 0.10f / scale;
-        float stroke = 0.08f / scale;
-        float[] radii = new float[] {radius,radius,radius,radius};
-        if( ObjectControl.isInIconMode() ) stroke*=2.0f;
-        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
-        }
-      }
-
-    return mStickers[sticker];
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public float[][] getCubitPositions(int[] numLayers)
@@ -409,13 +386,6 @@ abstract class TwistyBandagedAbstract extends ShapeHexahedron
     return 6;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public int getVariantFaceColor(int variant, int face, int[] numLayers)
-    {
-    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int getCubitFaceColor(int cubit, int cubitface, int[] numLayers)
@@ -460,6 +430,36 @@ abstract class TwistyBandagedAbstract extends ShapeHexahedron
     return reaches ? face : -1;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int getVariantFaceColor(int variant, int face, int[] numLayers)
+    {
+    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public ObjectSticker retSticker(int sticker)
+    {
+    if( mStickers==null )
+      {
+      int numStickers = mStickerCoords.length;
+      mStickers = new ObjectSticker[numStickers];
+
+      for(int s=0; s<numStickers; s++)
+        {
+        float scale = mStickerScales[s];
+        float radius = 0.10f / scale;
+        float stroke = 0.08f / scale;
+        float[] radii = new float[] {radius,radius,radius,radius};
+        if( ObjectControl.isInIconMode() ) stroke*=2.0f;
+        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
+        }
+      }
+
+    return mStickers[sticker];
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // PUBLIC API
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java b/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
index efe8e466..6998ba59 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyCuboid.java
@@ -518,85 +518,6 @@ public class TwistyCuboid extends ShapeHexahedron
     return 2;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public int getVariantFaceColor(int variant, int face, int[] numLayers)
-    {
-    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public int getCubitFaceColor(int cubit, int face, int[] numLayers)
-    {
-    int variant = getCubitVariant(cubit,numLayers);
-
-    switch(variant)
-      {
-      case 0: int axis = face/2;
-              return CUBITS[cubit].getRotRow(axis) == (face%2==0 ? (1<<(numLayers[axis]-1)):1) ? face : -1;
-      case 1: if( face!=3 && face !=5 ) return -1;
-              int edge = getEdgeNum(cubit,numLayers);
-
-              switch(edge)
-                {
-                case  0: return face==3 ? 3 : 5;
-                case  1: return face==3 ? 4 : 3;
-                case  2: return face==3 ? 5 : 2;
-                case  3: return face==3 ? 2 : 4;
-                case  4: return face==3 ? 5 : 1;
-                case  5: return face==3 ? 1 : 4;
-                case  6: return face==3 ? 5 : 0;
-                case  7: return face==3 ? 0 : 4;
-                case  8: return face==3 ? 1 : 3;
-                case  9: return face==3 ? 2 : 1;
-                case 10: return face==3 ? 0 : 3;
-                case 11: return face==3 ? 2 : 0;
-                default: return 0;
-                }
-
-      case 2: return face==4 ? getCenterNum(cubit,numLayers) : -1;
-      }
-
-    return -1;
-    }
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public ObjectSticker retSticker(int sticker)
-    {
-    if( mStickers==null )
-      {
-      int numStickers = mStickerCoords.length;
-      mStickers = new ObjectSticker[numStickers];
-
-      for(int s=0; s<numStickers; s++)
-        {
-        float scale = mStickerScales[s];
-        float radius = 0.10f / scale;
-        float stroke = 0.08f / scale;
-        float[] radii = new float[] {radius,radius,radius,radius};
-
-        if( ObjectControl.isInIconMode() )
-          {
-          int[] numLayers = getNumLayers();
-
-          switch(numLayers[0])
-            {
-            case 2: stroke*=1.8f; break;
-            case 3: stroke*=2.0f; break;
-            case 4: stroke*=2.1f; break;
-            default:stroke*=2.2f; break;
-            }
-          }
-
-        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
-        }
-      }
-
-    return mStickers[sticker];
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public Static4D[] getQuats()
@@ -700,6 +621,85 @@ public class TwistyCuboid extends ShapeHexahedron
     return 6;
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int getCubitFaceColor(int cubit, int face, int[] numLayers)
+    {
+    int variant = getCubitVariant(cubit,numLayers);
+
+    switch(variant)
+      {
+      case 0: int axis = face/2;
+              return CUBITS[cubit].getRotRow(axis) == (face%2==0 ? (1<<(numLayers[axis]-1)):1) ? face : -1;
+      case 1: if( face!=3 && face !=5 ) return -1;
+              int edge = getEdgeNum(cubit,numLayers);
+
+              switch(edge)
+                {
+                case  0: return face==3 ? 3 : 5;
+                case  1: return face==3 ? 4 : 3;
+                case  2: return face==3 ? 5 : 2;
+                case  3: return face==3 ? 2 : 4;
+                case  4: return face==3 ? 5 : 1;
+                case  5: return face==3 ? 1 : 4;
+                case  6: return face==3 ? 5 : 0;
+                case  7: return face==3 ? 0 : 4;
+                case  8: return face==3 ? 1 : 3;
+                case  9: return face==3 ? 2 : 1;
+                case 10: return face==3 ? 0 : 3;
+                case 11: return face==3 ? 2 : 0;
+                default: return 0;
+                }
+
+      case 2: return face==4 ? getCenterNum(cubit,numLayers) : -1;
+      }
+
+    return -1;
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int getVariantFaceColor(int variant, int face, int[] numLayers)
+    {
+    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
+    }
+
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public ObjectSticker retSticker(int sticker)
+    {
+    if( mStickers==null )
+      {
+      int numStickers = mStickerCoords.length;
+      mStickers = new ObjectSticker[numStickers];
+
+      for(int s=0; s<numStickers; s++)
+        {
+        float scale = mStickerScales[s];
+        float radius = 0.10f / scale;
+        float stroke = 0.08f / scale;
+        float[] radii = new float[] {radius,radius,radius,radius};
+
+        if( ObjectControl.isInIconMode() )
+          {
+          int[] numLayers = getNumLayers();
+
+          switch(numLayers[0])
+            {
+            case 2: stroke*=1.8f; break;
+            case 3: stroke*=2.0f; break;
+            case 4: stroke*=2.1f; break;
+            default:stroke*=2.2f; break;
+            }
+          }
+
+        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
+        }
+      }
+
+    return mStickers[sticker];
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // PUBLIC API
 
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
index 73d4d532..c5bcfe17 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java
@@ -464,13 +464,6 @@ public class TwistyDiamond extends ShapeOctahedron
     return cubit<getNumOctahedrons(numLayers[0]) ? 0 : 1;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public int getVariantFaceColor(int variant, int face, int[] numLayers)
-    {
-    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int getCubitFaceColor(int cubit, int face, int[] numLayers)
@@ -503,6 +496,13 @@ public class TwistyDiamond extends ShapeOctahedron
       }
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int getVariantFaceColor(int variant, int face, int[] numLayers)
+    {
+    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public ObjectSticker retSticker(int sticker)
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
index 13f2d023..d7a9cd79 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyDino.java
@@ -224,7 +224,7 @@ abstract class TwistyDino extends ShapeHexahedron
 
   public int getVariantFaceColor(int variant, int face, int[] numLayers)
     {
-    return 0;
+    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
     }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
@@ -233,18 +233,20 @@ abstract class TwistyDino extends ShapeHexahedron
     {
     if( mStickers==null )
       {
-      float[][] STICKERS = new float[][] { { 0.0f, -1.0f/3, 0.5f, 1.0f/6, -0.5f, 1.0f/6 } };
-      float radius = 0.025f;
-      float stroke = 0.050f;
-      float[] radii = new float[] {radius,radius,radius};
+      int numStickers = mStickerCoords.length;
+      mStickers = new ObjectSticker[numStickers];
 
-      if( ObjectControl.isInIconMode() )
+      for(int s=0; s<numStickers; s++)
         {
-        stroke*=1.5f;
-        }
+        float scale = mStickerScales[s];
+        float radius = 0.07f / scale;
+        float stroke = 0.15f / scale;
+        float[] radii = new float[] {radius,radius,radius};
 
-      mStickers     = new ObjectSticker[STICKERS.length];
-      mStickers[0]  = new ObjectSticker(STICKERS[0],null,radii,stroke);
+        if( ObjectControl.isInIconMode() ) stroke*=1.5f;
+
+        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
+        }
       }
 
     return mStickers[sticker];
diff --git a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
index 853837a2..7fe79ade 100644
--- a/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
+++ b/src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java
@@ -360,13 +360,6 @@ public class TwistyHelicopter extends ShapeHexahedron
     return cubit<8 ? 0:1;
     }
 
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-  public int getVariantFaceColor(int variant, int face, int[] numLayers)
-    {
-    return 0;
-    }
-
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public int getCubitFaceColor(int cubit, int face, int[] numLayers)
@@ -419,24 +412,31 @@ public class TwistyHelicopter extends ShapeHexahedron
     return mFaceMap[cubit][face];
     }
 
+///////////////////////////////////////////////////////////////////////////////////////////////////
+
+  public int getVariantFaceColor(int variant, int face, int[] numLayers)
+    {
+    return face>=mStickerVariants[variant].length ? -1 : mStickerVariants[variant][face];
+    }
+
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
   public ObjectSticker retSticker(int sticker)
     {
     if( mStickers==null )
       {
-      float[][] STICKERS = new float[][] { { -0.5f, 0.25f, 0.25f, -0.5f, 0.25f, 0.25f } };
-      float radius = 0.03f;
-      float stroke = 0.05f;
-      float[] radii = new float[] {radius,radius,radius};
+      int numStickers = mStickerCoords.length;
+      mStickers = new ObjectSticker[numStickers];
 
-      if( ObjectControl.isInIconMode() )
+      for(int s=0; s<numStickers; s++)
         {
-        stroke*=2.0f;
+        float scale = mStickerScales[s];
+        float radius = 0.06f / scale;
+        float stroke = 0.10f / scale;
+        float[] radii = new float[] {radius,radius,radius};
+        if( ObjectControl.isInIconMode() ) stroke*=2.0f;
+        mStickers[s] = new ObjectSticker(mStickerCoords[s],null,radii,stroke);
         }
-
-      mStickers = new ObjectSticker[STICKERS.length];
-      mStickers[0] = new ObjectSticker(STICKERS[0],null,radii,stroke);
       }
 
     return mStickers[sticker];
