Project

General

Profile

« Previous | Next » 

Revision 69bd6b70

Added by Leszek Koltunski almost 2 years ago

A few code improvements.

View differences:

src/main/java/org/distorted/objectlib/json/JsonReader.java
742 742
        android.util.Log.e("readJsonFile", "Unknown version "+major);
743 743
        }
744 744
      }
745
    catch(IOException e)
745
    catch(Exception e)
746 746
      {
747 747
      android.util.Log.e("readJsonFile", "Error reading JSON file: "+e.toString());
748 748
      }
749
    catch( JSONException e )
750
      {
751
      android.util.Log.e("parseJsonFile", "Error parsing JSON file: "+e.toString());
752
      }
753 749
    }
754 750

  
755 751
///////////////////////////////////////////////////////////////////////////////////////////////////
src/main/java/org/distorted/objectlib/touchcontrol/TouchControlShapeChanging.java
110 110

  
111 111
  public TouchControlShapeChanging(TwistyObject object)
112 112
    {
113
    super(object.getObjectRatio());
113
    super( object!=null ? object.getObjectRatio() : 1.0f );
114 114

  
115 115
    mPoint = new float[3];
116 116
    mCamera= new float[3];
117 117
    mTouch = new float[3];
118 118
    mObject= object;
119 119
    mPreparationDone = false;
120
    mRotAxis = object.getRotationAxis();
121
    mNumAxis = mRotAxis.length;
122 120
    mTmpAxis = new Static4D(0,0,0,0);
121

  
122
    if( object!=null )
123
      {
124
      mRotAxis = object.getRotationAxis() ;
125
      mNumAxis = mRotAxis.length;
126
      }
127
    else
128
      {
129
      mRotAxis = null;
130
      mNumAxis = 0;
131
      }
123 132
    }
124 133

  
125 134
///////////////////////////////////////////////////////////////////////////////////////////////////

Also available in: Unified diff