Revision 50ec342b
Added by Leszek Koltunski about 2 years ago
src/main/java/org/distorted/bandaged/BandagedCreatorView.java | ||
---|---|---|
93 | 93 |
} |
94 | 94 |
} |
95 | 95 |
|
96 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
97 |
|
|
98 |
public BandagedCreatorRenderer getRenderer() |
|
99 |
{ |
|
100 |
return mRenderer; |
|
101 |
} |
|
102 |
|
|
96 | 103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
97 | 104 |
|
98 | 105 |
public void setScreenSize(int width, int height) |
... | ... | |
116 | 123 |
case MotionEvent.ACTION_DOWN: float x1 = (x - mScreenWidth*0.5f)/mScreenMin; |
117 | 124 |
float y1 = (mScreenHeight*0.5f - y)/mScreenMin; |
118 | 125 |
|
119 |
int index = mTouchControl.cubitTouched(x1,y1,mRenderer.getQuat2() );
|
|
126 |
int index = mTouchControl.cubitTouched(x1,y1,mRenderer.getQuatAccu() );
|
|
120 | 127 |
|
121 | 128 |
if( index<0 ) |
122 | 129 |
{ |
... | ... | |
162 | 169 |
float cosA = (float)Math.cos(plen*3.14f/mScreenMin); |
163 | 170 |
float sinA = (float)Math.sqrt(1-cosA*cosA); |
164 | 171 |
|
165 |
mRenderer.setQuat1(px*sinA, py*sinA, pz*sinA, cosA);
|
|
172 |
mRenderer.setQuatTemp(px*sinA, py*sinA, pz*sinA, cosA);
|
|
166 | 173 |
} |
167 | 174 |
} |
168 | 175 |
if( (mX-x)*(mX-x) + (mY-y)*(mY-y) > mScreenMin*mScreenMin/(DIRECTION_SENSITIVITY*DIRECTION_SENSITIVITY) ) |
Also available in: Unified diff
Cleanups.