55 |
55 |
private static final int RESET_DURATION = 1000;
|
56 |
56 |
private static final float MAX_SIZE_CHANGE = 1.70f;
|
57 |
57 |
private static final float MIN_SIZE_CHANGE = 0.50f;
|
58 |
|
private static final float INIT_RATIO = 0.5f;
|
59 |
58 |
|
60 |
59 |
private final BandagedCreatorView mView;
|
61 |
60 |
private final Resources mResources;
|
... | ... | |
63 |
62 |
private final Static3D mScale;
|
64 |
63 |
private final Static4D mQuatT, mQuatA;
|
65 |
64 |
private final BandagedObject mObject;
|
|
65 |
private final float mInitRatio;
|
66 |
66 |
|
67 |
67 |
private boolean mInitialPhase;
|
68 |
68 |
private long mStartTime;
|
... | ... | |
94 |
94 |
mCreatingCubits = false;
|
95 |
95 |
mRescaling = false;
|
96 |
96 |
|
97 |
|
mObjectScreenRatio= INIT_RATIO;
|
98 |
97 |
mSaveIcon = -1;
|
99 |
98 |
|
100 |
99 |
mScreen = new DistortedScreen();
|
101 |
100 |
mScreen.glClearColor(BRIGHTNESS, BRIGHTNESS, BRIGHTNESS, 1.0f);
|
102 |
101 |
mScale = new Static3D(1,1,1);
|
103 |
102 |
mObject = new BandagedObjectPyraminx(mScreen);
|
|
103 |
|
|
104 |
mInitRatio = mObject.getScreenRatio();
|
|
105 |
mObjectScreenRatio= mInitRatio;
|
104 |
106 |
}
|
105 |
107 |
|
106 |
108 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
... | ... | |
416 |
418 |
{
|
417 |
419 |
mObjectScreenRatio *= ratio;
|
418 |
420 |
|
419 |
|
if( mObjectScreenRatio>MAX_SIZE_CHANGE*INIT_RATIO) mObjectScreenRatio = MAX_SIZE_CHANGE*INIT_RATIO;
|
420 |
|
if( mObjectScreenRatio<MIN_SIZE_CHANGE*INIT_RATIO) mObjectScreenRatio = MIN_SIZE_CHANGE*INIT_RATIO;
|
|
421 |
if( mObjectScreenRatio>MAX_SIZE_CHANGE*mInitRatio) mObjectScreenRatio = MAX_SIZE_CHANGE*mInitRatio;
|
|
422 |
if( mObjectScreenRatio<MIN_SIZE_CHANGE*mInitRatio) mObjectScreenRatio = MIN_SIZE_CHANGE*mInitRatio;
|
421 |
423 |
|
422 |
424 |
mRescaling = true;
|
423 |
425 |
}
|
Introduce individual ScreenRatios for each BandagedObject.