Revision 17600407
Added by Leszek Koltunski over 8 years ago
src/main/java/org/distorted/examples/vertex3d/Vertex3DActivity.java | ||
---|---|---|
353 | 353 |
setVertexView(); |
354 | 354 |
} |
355 | 355 |
|
356 |
|
|
357 | 356 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
358 | 357 |
|
359 | 358 |
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) |
src/main/java/org/distorted/examples/vertex3d/Vertex3DRenderer.java | ||
---|---|---|
105 | 105 |
|
106 | 106 |
public void setRegion(float x, float y, float r) |
107 | 107 |
{ |
108 |
mFactorReg = mFactorObj*r/mRegion.getWidth(); |
|
108 |
mFactorReg = 2*mFactorObj*r/mRegion.getWidth();
|
|
109 | 109 |
mRegionScalePoint.set(mFactorReg,mFactorReg,mFactorReg); |
110 | 110 |
} |
111 | 111 |
|
... | ... | |
153 | 153 |
Vertex3DActivity act = (Vertex3DActivity)mView.getContext(); |
154 | 154 |
mMovePoint.set(mFactorObj*act.getCenterX(),mFactorObj*act.getCenterY(),0); |
155 | 155 |
|
156 |
mFactorReg = mFactorObj*act.getRegionR()/regionSize; |
|
156 |
mFactorReg = 2*mFactorObj*act.getRegionR()/regionSize;
|
|
157 | 157 |
mRegionScalePoint.set(mFactorReg,mFactorReg,mFactorReg); |
158 | 158 |
|
159 | 159 |
Static3D rotateObj = new Static3D(mObjWidth/2,mObjHeight/2, 0); |
Also available in: Unified diff
Vertex3D: fix region size.