Revision f86c9fb5
Added by Leszek Koltunski almost 6 years ago
src/main/java/org/distorted/examples/effects3d/Effects3DActivity2.java | ||
---|---|---|
93 | 93 |
mBitmapID = b.getInt("bitmap"); |
94 | 94 |
mString = b.getString("string"); |
95 | 95 |
|
96 |
mShowCenter = true;
|
|
97 |
mShowRegion = true;
|
|
98 |
mShowNormal = true;
|
|
96 |
mShowCenter = false;
|
|
97 |
mShowRegion = false;
|
|
98 |
mShowNormal = false;
|
|
99 | 99 |
mUseOIT = false; |
100 | 100 |
|
101 | 101 |
DistortedEffects.setMax(EffectType.VERTEX ,10); // those have to be called before |
src/main/java/org/distorted/examples/effects3d/Effects3DRenderer.java | ||
---|---|---|
47 | 47 |
|
48 | 48 |
class Effects3DRenderer implements GLSurfaceView.Renderer |
49 | 49 |
{ |
50 |
private static final float FOV = 70.0f;
|
|
50 |
private static final float FOV = 30.0f;
|
|
51 | 51 |
private static final float NEAR = 0.1f; |
52 | 52 |
|
53 | 53 |
private GLSurfaceView mView; |
... | ... | |
237 | 237 |
|
238 | 238 |
if( width*mObjHeight > height*mObjWidth ) // screen is more 'horizontal' than the Object |
239 | 239 |
{ |
240 |
mFactorObj = (0.80f*height)/mObjHeight;
|
|
240 |
mFactorObj = (0.70f*height)/mObjHeight;
|
|
241 | 241 |
factorCen = (0.08f*height)/centerSize; |
242 | 242 |
} |
243 | 243 |
else |
244 | 244 |
{ |
245 |
mFactorObj = (0.80f*width)/mObjWidth;
|
|
245 |
mFactorObj = (0.70f*width)/mObjWidth;
|
|
246 | 246 |
factorCen = (0.08f*width)/centerSize; |
247 | 247 |
} |
248 | 248 |
|
src/main/res/layout/effects3dlayout.xml | ||
---|---|---|
21 | 21 |
android:layout_width="wrap_content" |
22 | 22 |
android:layout_height="wrap_content" |
23 | 23 |
android:layout_weight="1" |
24 |
android:checked="true"
|
|
24 |
android:checked="false"
|
|
25 | 25 |
android:onClick="showCenter" |
26 | 26 |
android:text="@string/show_center" |
27 | 27 |
android:textSize="12sp"/> |
... | ... | |
31 | 31 |
android:layout_width="wrap_content" |
32 | 32 |
android:layout_height="wrap_content" |
33 | 33 |
android:layout_weight="1" |
34 |
android:checked="true"
|
|
34 |
android:checked="false"
|
|
35 | 35 |
android:onClick="showRegion" |
36 | 36 |
android:text="@string/show_region" |
37 | 37 |
android:textSize="12sp"/> |
... | ... | |
41 | 41 |
android:layout_width="wrap_content" |
42 | 42 |
android:layout_height="wrap_content" |
43 | 43 |
android:layout_weight="1" |
44 |
android:checked="true"
|
|
44 |
android:checked="false"
|
|
45 | 45 |
android:onClick="showNormal" |
46 | 46 |
android:text="@string/show_normal" |
47 | 47 |
android:textSize="12sp"/> |
Also available in: Unified diff
Make the Effects3D app a bit more user-friendly.