Project

General

Profile

« Previous | Next » 

Revision c494476f

Added by Leszek Koltunski over 3 years ago

Make it possible to have some objects created from dmesh, and others - bootstrapped programmatically.

View differences:

src/main/java/org/distorted/objects/TwistyObject.java
81 81
  private static final float MAX_SIZE_CHANGE = 1.35f;
82 82
  private static final float MIN_SIZE_CHANGE = 0.75f;
83 83

  
84
  private static final boolean mCreateFromDMesh = true;
85

  
86 84
  private static final Static3D CENTER = new Static3D(0,0,0);
87 85
  private static final int POST_ROTATION_MILLISEC = 500;
88 86

  
......
244 242

  
245 243
  private void createMeshAndCubits(ObjectList list, Resources res)
246 244
    {
247
    if( mCreateFromDMesh )
248
      {
249
      int sizeIndex = ObjectList.getSizeIndex(list.ordinal(),mNumLayers);
250
      int resourceID= list.getResourceIDs()[sizeIndex];
245
    int sizeIndex = ObjectList.getSizeIndex(list.ordinal(),mNumLayers);
246
    int resourceID= list.getResourceIDs()[sizeIndex];
251 247

  
248
    if( resourceID!=0 )
249
      {
252 250
      InputStream is = res.openRawResource(resourceID);
253 251
      DataInputStream dos = new DataInputStream(is);
254 252
      mMesh = new MeshFile(dos);
src/main/java/org/distorted/solvers/SolverMain.java
30 30

  
31 31
public class SolverMain implements Runnable
32 32
{
33
  private String mObjectPosition;
34
  private Resources mRes;
35
  private ObjectList mObject;
36
  private int mSize;
33
  private final String mObjectPosition;
34
  private final Resources mRes;
35
  private final ObjectList mObject;
36
  private final int mSize;
37 37

  
38 38
///////////////////////////////////////////////////////////////////////////////////////////////////
39 39

  

Also available in: Unified diff