Project

General

Profile

« Previous | Next » 

Revision 43889e94

Added by Leszek Koltunski over 3 years ago

Square-1: this is a shape-shifter; we cannot just clamp the Cubit positions to the initial list of positions.
Do so only if the minError is appropriately low.

View differences:

src/main/java/org/distorted/objects/TwistyBandagedAbstract.java
176 176

  
177 177
///////////////////////////////////////////////////////////////////////////////////////////////////
178 178

  
179
  float[] getCubitPosition(int cubit)
179
  private float[] getCubitPosition(int cubit)
180 180
    {
181 181
    float[][] pos = getPositions();
182 182

  
src/main/java/org/distorted/objects/TwistyObject.java
452 452
        }
453 453
      }
454 454

  
455
    pos[offset  ] = mOrigPos[minErrorIndex1][3*minErrorIndex2  ];
456
    pos[offset+1] = mOrigPos[minErrorIndex1][3*minErrorIndex2+1];
457
    pos[offset+2] = mOrigPos[minErrorIndex1][3*minErrorIndex2+2];
455
    if( minError< 0.1f )
456
      {
457
      pos[offset  ] = mOrigPos[minErrorIndex1][3*minErrorIndex2  ];
458
      pos[offset+1] = mOrigPos[minErrorIndex1][3*minErrorIndex2+1];
459
      pos[offset+2] = mOrigPos[minErrorIndex1][3*minErrorIndex2+2];
460
      }
458 461
    }
459 462

  
460 463
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff