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/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