Project

General

Profile

« Previous | Next » 

Revision a97e02b7

Added by Leszek Koltunski over 3 years ago

Objects must explicitly provide a list of offsets specifying where the cut planes are (rather than just a BASIC_STEP - the width of the layer - which is insufficient in case of objects which have layers of vastly different width, like the Master Skewb)

View differences:

src/main/java/org/distorted/objects/TwistySkewb.java
185 185

  
186 186
///////////////////////////////////////////////////////////////////////////////////////////////////
187 187

  
188
  float getBasicStep()
188
  float[] getCuts(int size)
189 189
    {
190
    return SQ3;
190
    float[] cuts = new float[size-1];
191

  
192
    switch(size)
193
      {
194
      case 2: cuts[0] = 0;
195
              break;
196
      case 3: cuts[0] = -SQ3/12;
197
              cuts[1] = +SQ3/12;
198
              break;
199
      }
200
    return cuts;
191 201
    }
192 202

  
193 203
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff