Project

General

Profile

« Previous | Next » 

Revision 1d581993

Added by Leszek Koltunski about 2 years ago

Introduce ObjectSignature that can incorporate 192-bit signatures (for 5x5x5 bandaged cubes).
ObjectScrambler does not fully work yet.

View differences:

src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java
30 30

  
31 31
import org.distorted.objectlib.helpers.FactoryBandagedCubit;
32 32
import org.distorted.objectlib.helpers.ObjectFaceShape;
33
import org.distorted.objectlib.scrambling.ScrambleStateBandagedCuboid;
33
import org.distorted.objectlib.helpers.ObjectSignature;
34
import org.distorted.objectlib.scrambling.ScrambleStateBandaged3x3;
34 35
import org.distorted.objectlib.touchcontrol.TouchControlHexahedron;
35 36
import org.distorted.objectlib.helpers.ObjectShape;
36 37
import org.distorted.objectlib.scrambling.ScrambleState;
......
191 192
    return mSolvedQuatsAbstract;
192 193
    }
193 194

  
195
///////////////////////////////////////////////////////////////////////////////////////////////////
196

  
197
  public ObjectSignature getSignature()
198
    {
199
    long signature = 0;
200
    float[][] positions = getPositions();
201
    for(float[] pos : positions ) signature = markConnections(signature,pos);
202

  
203
    return new ObjectSignature(signature);
204
    }
205

  
194 206
///////////////////////////////////////////////////////////////////////////////////////////////////
195 207

  
196 208
  public ScrambleState[] getScrambleStates()
197 209
    {
198 210
    if( mStates==null && !isInIconMode() )
199 211
      {
200
      long signature = getSignature();
201
      mStates = ScrambleStateBandagedCuboid.computeGraph(signature);
212
      ObjectSignature signature = getSignature();
213
      mStates = ScrambleStateBandaged3x3.computeGraph(signature.getLong3());
202 214
      }
203 215

  
204 216
    return mStates;
......
382 394
    return signature;
383 395
    }
384 396

  
385
///////////////////////////////////////////////////////////////////////////////////////////////////
386

  
387
  public long getSignature()
388
    {
389
    long signature = 0;
390
    float[][] positions = getPositions();
391
    for(float[] pos : positions ) signature = markConnections(signature,pos);
392
    return signature;
393
    }
394

  
395 397
///////////////////////////////////////////////////////////////////////////////////////////////////
396 398

  
397 399
  public ObjectShape getObjectShape(int variant)

Also available in: Unified diff