Revision ecf3d6e3
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/effects/BaseEffect.java | ||
---|---|---|
30 | 30 |
import org.distorted.objectlib.effects.solve.SolveEffect; |
31 | 31 |
import org.distorted.objectlib.effects.win.WinEffect; |
32 | 32 |
import org.distorted.objectlib.R; |
33 |
import org.distorted.objectlib.main.ObjectPreRender; |
|
33 | 34 |
|
34 | 35 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 36 |
|
... | ... | |
197 | 198 |
|
198 | 199 |
//////////////////////////////////////////////////////////////////////////////// |
199 | 200 |
|
200 |
public long startEffect(DistortedScreen screen, EffectController cont) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
|
|
201 |
public long startEffect(DistortedScreen screen, ObjectPreRender pre) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
|
|
201 | 202 |
{ |
202 | 203 |
Method method1 = mClass.getDeclaredMethod("create", int.class); |
203 | 204 |
|
204 | 205 |
Object value1 = method1.invoke(null,mCurrentType); |
205 | 206 |
BaseEffect baseEffect = (BaseEffect)value1; |
206 | 207 |
|
207 |
Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedScreen.class, EffectController.class);
|
|
208 |
Method method2 = mClass.getDeclaredMethod("start", int.class, DistortedScreen.class, ObjectPreRender.class);
|
|
208 | 209 |
|
209 | 210 |
Integer translated = translatePos(mCurrentPos)+1; |
210 |
Object value2 = method2.invoke(baseEffect,translated,screen,cont);
|
|
211 |
Object value2 = method2.invoke(baseEffect,translated,screen,pre);
|
|
211 | 212 |
return (Long)value2; |
212 | 213 |
} |
213 | 214 |
|
src/main/java/org/distorted/objectlib/effects/EffectController.java | ||
---|---|---|
1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
2 |
// Copyright 2020 Leszek Koltunski // |
|
3 |
// // |
|
4 |
// This file is part of Magic Cube. // |
|
5 |
// // |
|
6 |
// Magic Cube is free software: you can redistribute it and/or modify // |
|
7 |
// it under the terms of the GNU General Public License as published by // |
|
8 |
// the Free Software Foundation, either version 2 of the License, or // |
|
9 |
// (at your option) any later version. // |
|
10 |
// // |
|
11 |
// Magic Cube is distributed in the hope that it will be useful, // |
|
12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
|
13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
|
14 |
// GNU General Public License for more details. // |
|
15 |
// // |
|
16 |
// You should have received a copy of the GNU General Public License // |
|
17 |
// along with Magic Cube. If not, see <http://www.gnu.org/licenses/>. // |
|
18 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
19 |
|
|
20 |
package org.distorted.objectlib.effects; |
|
21 |
|
|
22 |
import org.distorted.library.message.EffectListener; |
|
23 |
import org.distorted.objectlib.main.TwistyObject; |
|
24 |
import org.distorted.objectlib.helpers.MovesFinished; |
|
25 |
|
|
26 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
27 |
|
|
28 |
public interface EffectController extends EffectListener |
|
29 |
{ |
|
30 |
void addRotation(MovesFinished listener, int axis, int rowBitmap, int angle, int millisPerDegree); |
|
31 |
TwistyObject getOldObject(); |
|
32 |
TwistyObject getObject(); |
|
33 |
int getNumScrambles(); |
|
34 |
void solveOnly(); |
|
35 |
} |
src/main/java/org/distorted/objectlib/effects/objectchange/ObjectChangeEffect.java | ||
---|---|---|
26 | 26 |
import org.distorted.library.main.DistortedScreen; |
27 | 27 |
import org.distorted.library.message.EffectListener; |
28 | 28 |
|
29 |
import org.distorted.objectlib.main.ObjectPreRender; |
|
29 | 30 |
import org.distorted.objectlib.main.TwistyObject; |
30 |
|
|
31 | 31 |
import org.distorted.objectlib.effects.BaseEffect; |
32 |
import org.distorted.objectlib.effects.EffectController; |
|
33 | 32 |
|
34 | 33 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 34 |
|
... | ... | |
68 | 67 |
} |
69 | 68 |
} |
70 | 69 |
|
71 |
private EffectController mController;
|
|
70 |
private ObjectPreRender mPre;
|
|
72 | 71 |
private int mDuration; |
73 | 72 |
private final int[] mEffectReturned; |
74 | 73 |
private final int[] mCubeEffectNumber, mNodeEffectNumber; |
... | ... | |
146 | 145 |
assignEffects(1); |
147 | 146 |
mScreen.attach(mObject[1]); |
148 | 147 |
break; |
149 |
case 1: mController.effectFinished(FAKE_EFFECT_ID);
|
|
148 |
case 1: mPre.effectFinished(FAKE_EFFECT_ID);
|
|
150 | 149 |
break; |
151 | 150 |
} |
152 | 151 |
} |
... | ... | |
226 | 225 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
227 | 226 |
|
228 | 227 |
@SuppressWarnings("unused") |
229 |
public long start(int duration, DistortedScreen screen, EffectController cont)
|
|
228 |
public long start(int duration, DistortedScreen screen, ObjectPreRender pre)
|
|
230 | 229 |
{ |
231 | 230 |
mScreen = screen; |
232 |
mObject[0] = cont.getOldObject();
|
|
233 |
mObject[1] = cont.getObject();
|
|
234 |
mController= cont;
|
|
231 |
mObject[0] = pre.getOldObject();
|
|
232 |
mObject[1] = pre.getObject();
|
|
233 |
mPre = pre;
|
|
235 | 234 |
mDuration = duration; |
236 | 235 |
|
237 | 236 |
if( mObject[0]!=null ) |
src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffect.java | ||
---|---|---|
27 | 27 |
import org.distorted.library.main.DistortedScreen; |
28 | 28 |
import org.distorted.library.message.EffectListener; |
29 | 29 |
|
30 |
import org.distorted.objectlib.main.ObjectPreRender; |
|
30 | 31 |
import org.distorted.objectlib.main.ObjectType; |
31 | 32 |
import org.distorted.objectlib.main.TwistyObject; |
32 |
|
|
33 | 33 |
import org.distorted.objectlib.effects.BaseEffect; |
34 |
import org.distorted.objectlib.effects.EffectController; |
|
35 | 34 |
import org.distorted.objectlib.helpers.MovesFinished; |
36 | 35 |
|
37 | 36 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
67 | 66 |
} |
68 | 67 |
} |
69 | 68 |
|
70 |
private EffectController mController;
|
|
69 |
private ObjectPreRender mPre;
|
|
71 | 70 |
private int mEffectReturned; |
72 | 71 |
private int mNumScramblesLeft; |
73 | 72 |
private int mDurationPerDegree; |
... | ... | |
134 | 133 |
int angle= mScrambles[mNumScrambles][2]; |
135 | 134 |
|
136 | 135 |
mNumScramblesLeft--; |
137 |
mController.addRotation(this, axis, (1<<row), angle, mDurationPerDegree);
|
|
136 |
mPre.addRotation(this, axis, (1<<row), angle, mDurationPerDegree);
|
|
138 | 137 |
mNumScrambles++; |
139 | 138 |
} |
140 | 139 |
else |
141 | 140 |
{ |
142 | 141 |
mRotReady = true; |
143 |
if( mPluginReady ) mController.effectFinished(FAKE_EFFECT_ID);
|
|
142 |
if( mPluginReady ) mPre.effectFinished(FAKE_EFFECT_ID);
|
|
144 | 143 |
} |
145 | 144 |
} |
146 | 145 |
|
... | ... | |
224 | 223 |
disassignEffects(); |
225 | 224 |
|
226 | 225 |
mPluginReady = true; |
227 |
if( mRotReady ) mController.effectFinished(FAKE_EFFECT_ID);
|
|
226 |
if( mRotReady ) mPre.effectFinished(FAKE_EFFECT_ID);
|
|
228 | 227 |
} |
229 | 228 |
} |
230 | 229 |
|
... | ... | |
258 | 257 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
259 | 258 |
|
260 | 259 |
@SuppressWarnings("unused") |
261 |
public long start(int duration, DistortedScreen screen, EffectController cont)
|
|
260 |
public long start(int duration, DistortedScreen screen, ObjectPreRender pre)
|
|
262 | 261 |
{ |
263 |
mObject = cont.getObject();
|
|
264 |
mController= cont;
|
|
262 |
mObject= pre.getObject();
|
|
263 |
mPre = pre;
|
|
265 | 264 |
|
266 | 265 |
// NOT mController.solve() !! This would be a very subtle bug. We need to do this immediately, |
267 | 266 |
// because here we are already inside the mController.preRender() function (doing 'scrambleObjectNow') |
... | ... | |
271 | 270 |
|
272 | 271 |
mBasicAngle = mObject.getBasicAngle(); |
273 | 272 |
|
274 |
int numScrambles = cont.getNumScrambles();
|
|
273 |
int numScrambles = pre.getNumScrambles();
|
|
275 | 274 |
int dura = (int)(duration*Math.pow(numScrambles,0.66f)); |
276 | 275 |
createBaseEffects(dura,numScrambles); |
277 | 276 |
createEffects (dura,numScrambles); |
src/main/java/org/distorted/objectlib/effects/solve/SolveEffect.java | ||
---|---|---|
26 | 26 |
import org.distorted.library.main.DistortedScreen; |
27 | 27 |
import org.distorted.library.message.EffectListener; |
28 | 28 |
|
29 |
import org.distorted.objectlib.main.ObjectPreRender; |
|
29 | 30 |
import org.distorted.objectlib.main.TwistyObject; |
30 | 31 |
|
31 | 32 |
import org.distorted.objectlib.effects.BaseEffect; |
32 |
import org.distorted.objectlib.effects.EffectController; |
|
33 | 33 |
|
34 | 34 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 35 |
|
... | ... | |
65 | 65 |
} |
66 | 66 |
} |
67 | 67 |
|
68 |
private EffectController mController;
|
|
68 |
private ObjectPreRender mPre;
|
|
69 | 69 |
private int mDuration; |
70 | 70 |
private int mEffectReturned; |
71 | 71 |
private final int[] mCubeEffectNumber, mNodeEffectNumber; |
... | ... | |
132 | 132 |
{ |
133 | 133 |
case 0: mEffectReturned = 0; |
134 | 134 |
mPhase = 1; |
135 |
mController.solveOnly();
|
|
135 |
mPre.solveOnly();
|
|
136 | 136 |
createEffectsPhase1(mDuration); |
137 | 137 |
assignEffects(mPhase); |
138 | 138 |
break; |
139 |
case 1: mController.effectFinished(FAKE_EFFECT_ID);
|
|
139 |
case 1: mPre.effectFinished(FAKE_EFFECT_ID);
|
|
140 | 140 |
break; |
141 | 141 |
} |
142 | 142 |
} |
... | ... | |
199 | 199 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
200 | 200 |
|
201 | 201 |
@SuppressWarnings("unused") |
202 |
public long start(int duration, DistortedScreen screen, EffectController cont)
|
|
202 |
public long start(int duration, DistortedScreen screen, ObjectPreRender pre)
|
|
203 | 203 |
{ |
204 |
mScreen = screen;
|
|
205 |
mObject = cont.getObject();
|
|
206 |
mController= cont;
|
|
207 |
mDuration = duration;
|
|
204 |
mScreen = screen; |
|
205 |
mObject = pre.getObject();
|
|
206 |
mPre = pre;
|
|
207 |
mDuration= duration; |
|
208 | 208 |
|
209 | 209 |
createEffectsPhase0(mDuration); |
210 | 210 |
assignEffects(mPhase); |
src/main/java/org/distorted/objectlib/effects/win/WinEffect.java | ||
---|---|---|
26 | 26 |
import org.distorted.library.main.DistortedScreen; |
27 | 27 |
import org.distorted.library.message.EffectListener; |
28 | 28 |
|
29 |
import org.distorted.objectlib.main.ObjectPreRender; |
|
29 | 30 |
import org.distorted.objectlib.main.TwistyObject; |
30 |
|
|
31 | 31 |
import org.distorted.objectlib.effects.BaseEffect; |
32 |
import org.distorted.objectlib.effects.EffectController; |
|
33 | 32 |
|
34 | 33 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
35 | 34 |
|
... | ... | |
64 | 63 |
} |
65 | 64 |
} |
66 | 65 |
|
67 |
private EffectController mController;
|
|
66 |
private ObjectPreRender mPre;
|
|
68 | 67 |
private int mDuration; |
69 | 68 |
private int mEffectReturned; |
70 | 69 |
private int mCubeEffectNumber, mNodeEffectNumber; |
... | ... | |
144 | 143 |
|
145 | 144 |
if( effectID == id ) |
146 | 145 |
{ |
147 |
if( ++mEffectReturned == total ) mController.effectFinished(FAKE_EFFECT_ID);
|
|
146 |
if( ++mEffectReturned == total ) mPre.effectFinished(FAKE_EFFECT_ID);
|
|
148 | 147 |
mObject.remove(id); |
149 | 148 |
return; |
150 | 149 |
} |
... | ... | |
155 | 154 |
|
156 | 155 |
if( effectID == id ) |
157 | 156 |
{ |
158 |
if( ++mEffectReturned == total ) mController.effectFinished(FAKE_EFFECT_ID);
|
|
157 |
if( ++mEffectReturned == total ) mPre.effectFinished(FAKE_EFFECT_ID);
|
|
159 | 158 |
mObject.getEffects().abortById(id); |
160 | 159 |
return; |
161 | 160 |
} |
... | ... | |
165 | 164 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
166 | 165 |
|
167 | 166 |
@SuppressWarnings("unused") |
168 |
public long start(int duration, DistortedScreen screen, EffectController cont)
|
|
167 |
public long start(int duration, DistortedScreen screen, ObjectPreRender pre)
|
|
169 | 168 |
{ |
170 |
mScreen = screen;
|
|
171 |
mObject = cont.getObject();
|
|
172 |
mController= cont;
|
|
173 |
mDuration = duration;
|
|
169 |
mScreen = screen; |
|
170 |
mObject = pre.getObject();
|
|
171 |
mPre = pre;
|
|
172 |
mDuration = duration; |
|
174 | 173 |
|
175 | 174 |
createEffects(mDuration); |
176 | 175 |
assignEffects(); |
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
26 | 26 |
|
27 | 27 |
import org.distorted.library.main.QuatHelper; |
28 | 28 |
import org.distorted.library.type.Static2D; |
29 |
import org.distorted.library.type.Static3D; |
|
29 | 30 |
import org.distorted.library.type.Static4D; |
30 | 31 |
|
31 | 32 |
import org.distorted.objectlib.helpers.BlockController; |
... | ... | |
56 | 57 |
private Movement mMovement; |
57 | 58 |
private boolean mDragging, mBeginningRotation, mContinuingRotation; |
58 | 59 |
private int mScreenWidth, mScreenHeight, mScreenMin; |
60 |
private Static3D mMove; |
|
59 | 61 |
|
60 | 62 |
private float mRotAngle, mInitDistance; |
61 | 63 |
private float mStartRotX, mStartRotY; |
... | ... | |
487 | 489 |
} |
488 | 490 |
} |
489 | 491 |
|
492 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
493 |
|
|
494 |
Static3D getMove() |
|
495 |
{ |
|
496 |
return mMove; |
|
497 |
} |
|
490 | 498 |
|
491 | 499 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
492 | 500 |
// INTERNAL API (for AutomaticControl) |
... | ... | |
528 | 536 |
|
529 | 537 |
mPreRender = new ObjectPreRender(act,this,actioner); |
530 | 538 |
mInterface = actioner; |
539 |
mMove = new Static3D(0,0,0); |
|
531 | 540 |
} |
532 | 541 |
|
533 | 542 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
540 | 549 |
mPreRender.setScreenSize(width); |
541 | 550 |
} |
542 | 551 |
|
552 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
553 |
|
|
554 |
public void setMove(int xmove, int ymove) |
|
555 |
{ |
|
556 |
mMove = new Static3D(xmove,ymove,0); |
|
557 |
} |
|
558 |
|
|
543 | 559 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
544 | 560 |
|
545 | 561 |
public void onPause() |
src/main/java/org/distorted/objectlib/main/ObjectPreRender.java | ||
---|---|---|
25 | 25 |
import android.content.SharedPreferences; |
26 | 26 |
|
27 | 27 |
import org.distorted.library.main.DistortedScreen; |
28 |
import org.distorted.library.message.EffectListener; |
|
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.helpers.ObjectLibInterface; |
30 | 31 |
import org.distorted.objectlib.effects.BaseEffect; |
31 |
import org.distorted.objectlib.effects.EffectController; |
|
32 | 32 |
import org.distorted.objectlib.effects.scramble.ScrambleEffect; |
33 | 33 |
import org.distorted.objectlib.helpers.BlockController; |
34 | 34 |
import org.distorted.objectlib.helpers.MovesFinished; |
35 | 35 |
|
36 | 36 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
37 | 37 |
|
38 |
public class ObjectPreRender implements EffectController
|
|
38 |
public class ObjectPreRender implements EffectListener
|
|
39 | 39 |
{ |
40 | 40 |
private final WeakReference<Activity> mAct; |
41 | 41 |
private final ObjectControl mController; |
... | ... | |
104 | 104 |
if( mOldObject!=null ) mOldObject.releaseResources(); |
105 | 105 |
mOldObject = mNewObject; |
106 | 106 |
|
107 |
mNewObject = object.create( mController.getQuat(), mAct.get().getResources(), mScreenWidth); |
|
107 |
mNewObject = object.create( mController.getQuat(), mController.getMove(), mAct.get().getResources(), mScreenWidth);
|
|
108 | 108 |
|
109 | 109 |
if( mNewObject!=null ) |
110 | 110 |
{ |
src/main/java/org/distorted/objectlib/main/ObjectType.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
149 | 150 |
|
150 | 151 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
151 | 152 |
|
152 |
public TwistyObject create(Static4D quat, Resources res, int scrWidth) |
|
153 |
public TwistyObject create(Static4D quat, Static3D move, Resources res, int scrWidth)
|
|
153 | 154 |
{ |
154 | 155 |
DistortedTexture texture = new DistortedTexture(); |
155 | 156 |
DistortedEffects effects = new DistortedEffects(); |
... | ... | |
163 | 164 |
case 0: |
164 | 165 |
case 1: |
165 | 166 |
case 2: |
166 |
case 3: return new TwistyCube (size, quat, texture, mesh, effects, res, scrWidth); |
|
167 |
case 4: return new TwistyJing (size, quat, texture, mesh, effects, res, scrWidth); |
|
167 |
case 3: return new TwistyCube (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
168 |
case 4: return new TwistyJing (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
168 | 169 |
case 5: |
169 | 170 |
case 6: |
170 |
case 7: return new TwistyPyraminx (size, quat, texture, mesh, effects, res, scrWidth); |
|
171 |
case 7: return new TwistyPyraminx (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
171 | 172 |
case 8: |
172 |
case 9: return new TwistyKilominx (size, quat, texture, mesh, effects, res, scrWidth); |
|
173 |
case 9: return new TwistyKilominx (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
173 | 174 |
case 10: |
174 |
case 11: return new TwistyMegaminx (size, quat, texture, mesh, effects, res, scrWidth); |
|
175 |
case 12: return new TwistyUltimate (size, quat, texture, mesh, effects, res, scrWidth); |
|
175 |
case 11: return new TwistyMegaminx (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
176 |
case 12: return new TwistyUltimate (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
176 | 177 |
case 13: |
177 | 178 |
case 14: |
178 |
case 15: return new TwistyDiamond (size, quat, texture, mesh, effects, res, scrWidth); |
|
179 |
case 16: return new TwistyDino6 (size, quat, texture, mesh, effects, res, scrWidth); |
|
180 |
case 17: return new TwistyDino4 (size, quat, texture, mesh, effects, res, scrWidth); |
|
181 |
case 18: return new TwistyRedi (size, quat, texture, mesh, effects, res, scrWidth); |
|
182 |
case 19: return new TwistyHelicopter (size, quat, texture, mesh, effects, res, scrWidth); |
|
179 |
case 15: return new TwistyDiamond (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
180 |
case 16: return new TwistyDino6 (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
181 |
case 17: return new TwistyDino4 (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
182 |
case 18: return new TwistyRedi (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
183 |
case 19: return new TwistyHelicopter (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
183 | 184 |
case 20: |
184 |
case 21: return new TwistySkewb (size, quat, texture, mesh, effects, res, scrWidth); |
|
185 |
case 22: return new TwistyIvy (size, quat, texture, mesh, effects, res, scrWidth); |
|
186 |
case 23: return new TwistyRex (size, quat, texture, mesh, effects, res, scrWidth); |
|
187 |
case 24: return new TwistyBandagedFused (size, quat, texture, mesh, effects, res, scrWidth); |
|
188 |
case 25: return new TwistyBandaged2Bar (size, quat, texture, mesh, effects, res, scrWidth); |
|
189 |
case 26: return new TwistyBandaged3Plate(size, quat, texture, mesh, effects, res, scrWidth); |
|
190 |
case 27: return new TwistyBandagedEvil (size, quat, texture, mesh, effects, res, scrWidth); |
|
191 |
case 28: return new TwistySquare1 (size, quat, texture, mesh, effects, res, scrWidth); |
|
192 |
case 29: return new TwistySquare2 (size, quat, texture, mesh, effects, res, scrWidth); |
|
185 |
case 21: return new TwistySkewb (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
186 |
case 22: return new TwistyIvy (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
187 |
case 23: return new TwistyRex (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
188 |
case 24: return new TwistyBandagedFused (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
189 |
case 25: return new TwistyBandaged2Bar (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
190 |
case 26: return new TwistyBandaged3Plate(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
191 |
case 27: return new TwistyBandagedEvil (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
192 |
case 28: return new TwistySquare1 (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
193 |
case 29: return new TwistySquare2 (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
193 | 194 |
case 30: |
194 |
case 31: return new TwistyMirror (size, quat, texture, mesh, effects, res, scrWidth); |
|
195 |
case 31: return new TwistyMirror (size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
195 | 196 |
} |
196 | 197 |
|
197 | 198 |
return null; |
src/main/java/org/distorted/objectlib/main/Twisty12.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
52 | 53 |
|
53 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 55 |
|
55 |
public Twisty12(int numLayers, int realSize, Static4D quat, DistortedTexture texture, |
|
56 |
public Twisty12(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
56 | 57 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
57 | 58 |
{ |
58 |
super(numLayers, realSize, quat, texture, mesh, effects, res, scrWidth); |
|
59 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
59 | 60 |
} |
60 | 61 |
|
61 | 62 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/Twisty4.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
38 | 39 |
|
39 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 41 |
|
41 |
public Twisty4(int numLayers, int realSize, Static4D quat, DistortedTexture texture, |
|
42 |
public Twisty4(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
42 | 43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
43 | 44 |
{ |
44 |
super(numLayers, realSize, quat, texture, mesh, effects, res, scrWidth); |
|
45 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
45 | 46 |
} |
46 | 47 |
|
47 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/Twisty6.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
39 | 40 |
|
40 | 41 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 42 |
|
42 |
public Twisty6(int numLayers, int realSize, Static4D quat, DistortedTexture texture, |
|
43 |
public Twisty6(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
43 | 44 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
44 | 45 |
{ |
45 |
super(numLayers, realSize, quat, texture, mesh, effects, res, scrWidth); |
|
46 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
46 | 47 |
} |
47 | 48 |
|
48 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/Twisty8.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
40 | 41 |
|
41 | 42 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
42 | 43 |
|
43 |
public Twisty8(int numLayers, int realSize, Static4D quat, DistortedTexture texture, |
|
44 |
public Twisty8(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
44 | 45 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
45 | 46 |
{ |
46 |
super(numLayers, realSize, quat, texture, mesh, effects, res, scrWidth); |
|
47 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
47 | 48 |
} |
48 | 49 |
|
49 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
137 | 137 |
|
138 | 138 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
139 | 139 |
|
140 |
TwistyObject(int numLayers, int realSize, Static4D quat, DistortedTexture nodeTexture, |
|
140 |
TwistyObject(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture nodeTexture,
|
|
141 | 141 |
MeshSquare nodeMesh, DistortedEffects nodeEffects, Resources res, int screenWidth) |
142 | 142 |
{ |
143 | 143 |
super(nodeTexture,nodeEffects,nodeMesh); |
... | ... | |
204 | 204 |
mObjectScale = new Static3D(scale,scale,scale); |
205 | 205 |
MatrixEffectScale scaleEffect = new MatrixEffectScale(mObjectScale); |
206 | 206 |
MatrixEffectQuaternion quatEffect = new MatrixEffectQuaternion(quat, CENTER); |
207 |
MatrixEffectMove moveEffect = new MatrixEffectMove(move); |
|
207 | 208 |
|
208 | 209 |
MatrixEffectScale nodeScaleEffect = new MatrixEffectScale(mNodeScale); |
209 | 210 |
nodeEffects.apply(nodeScaleEffect); |
... | ... | |
232 | 233 |
mEffects.apply(mRotateEffect); |
233 | 234 |
mEffects.apply(quatEffect); |
234 | 235 |
mEffects.apply(scaleEffect); |
236 |
mEffects.apply(moveEffect); |
|
235 | 237 |
|
236 | 238 |
// Now postprocessed effects (the glow when you solve an object) require component centers. In |
237 | 239 |
// order for the effect to be in front of the object, we need to set the center to be behind it. |
src/main/java/org/distorted/objectlib/objects/TwistyBandaged2Bar.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
34 | 35 |
|
35 | 36 |
public class TwistyBandaged2Bar extends TwistyBandagedAbstract |
36 | 37 |
{ |
37 |
public TwistyBandaged2Bar(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
38 |
DistortedEffects effects, Resources res, int scrWidth) |
|
38 |
public TwistyBandaged2Bar(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
39 | 40 |
{ |
40 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
41 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 | 42 |
} |
42 | 43 |
|
43 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandaged3Plate.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
34 | 35 |
|
35 | 36 |
public class TwistyBandaged3Plate extends TwistyBandagedAbstract |
36 | 37 |
{ |
37 |
public TwistyBandaged3Plate(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
38 |
DistortedEffects effects, Resources res, int scrWidth) |
|
38 |
public TwistyBandaged3Plate(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
39 | 40 |
{ |
40 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
41 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 | 42 |
} |
42 | 43 |
|
43 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java | ||
---|---|---|
79 | 79 |
|
80 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
81 | 81 |
|
82 |
TwistyBandagedAbstract(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
83 |
DistortedEffects effects, Resources res, int scrWidth) |
|
82 |
TwistyBandagedAbstract(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
83 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
84 | 84 |
{ |
85 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
85 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
86 | 86 |
} |
87 | 87 |
|
88 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedEvil.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
34 | 35 |
|
35 | 36 |
public class TwistyBandagedEvil extends TwistyBandagedAbstract |
36 | 37 |
{ |
37 |
public TwistyBandagedEvil(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh, |
|
38 |
public TwistyBandagedEvil(int size, Static4D quat, Static3D move, DistortedTexture texture, MeshSquare mesh,
|
|
38 | 39 |
DistortedEffects effects, Resources res, int scrWidth) |
39 | 40 |
{ |
40 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
41 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 | 42 |
} |
42 | 43 |
|
43 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedFused.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
34 | 35 |
|
35 | 36 |
public class TwistyBandagedFused extends TwistyBandagedAbstract |
36 | 37 |
{ |
37 |
public TwistyBandagedFused(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
38 |
DistortedEffects effects, Resources res, int scrWidth) |
|
38 |
public TwistyBandagedFused(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
39 | 40 |
{ |
40 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
41 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 | 42 |
} |
42 | 43 |
|
43 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyCube.java | ||
---|---|---|
64 | 64 |
|
65 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 66 |
|
67 |
public TwistyCube(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
68 |
DistortedEffects effects, Resources res, int scrWidth) |
|
67 |
public TwistyCube(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
68 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
69 | 69 |
{ |
70 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
70 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java | ||
---|---|---|
68 | 68 |
|
69 | 69 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
70 | 70 |
|
71 |
public TwistyDiamond(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
72 |
DistortedEffects effects, Resources res, int scrWidth) |
|
71 |
public TwistyDiamond(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
72 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
73 | 73 |
{ |
74 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
74 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
75 | 75 |
} |
76 | 76 |
|
77 | 77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino.java | ||
---|---|---|
71 | 71 |
|
72 | 72 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
73 | 73 |
|
74 |
TwistyDino(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
75 |
DistortedEffects effects, Resources res, int scrWidth) |
|
74 |
TwistyDino(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
75 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
76 | 76 |
{ |
77 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
77 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
78 | 78 |
} |
79 | 79 |
|
80 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino4.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
38 | 39 |
|
39 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 41 |
|
41 |
public TwistyDino4(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
42 |
DistortedEffects effects, Resources res, int scrWidth) |
|
42 |
public TwistyDino4(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
43 | 44 |
{ |
44 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
45 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
45 | 46 |
} |
46 | 47 |
|
47 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino6.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
38 | 39 |
|
39 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
40 | 41 |
|
41 |
public TwistyDino6(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
42 |
DistortedEffects effects, Resources res, int scrWidth) |
|
42 |
public TwistyDino6(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
43 | 44 |
{ |
44 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
45 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
45 | 46 |
} |
46 | 47 |
|
47 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java | ||
---|---|---|
76 | 76 |
|
77 | 77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
78 | 78 |
|
79 |
public TwistyHelicopter(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
80 |
DistortedEffects effects, Resources res, int scrWidth) |
|
79 |
public TwistyHelicopter(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
80 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
81 | 81 |
{ |
82 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
82 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyIvy.java | ||
---|---|---|
75 | 75 |
|
76 | 76 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
77 | 77 |
|
78 |
public TwistyIvy(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
79 |
DistortedEffects effects, Resources res, int scrWidth) |
|
78 |
public TwistyIvy(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
79 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
80 | 80 |
{ |
81 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
81 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
82 | 82 |
} |
83 | 83 |
|
84 | 84 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyJing.java | ||
---|---|---|
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
74 | 74 |
|
75 |
public TwistyJing(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
76 |
DistortedEffects effects, Resources res, int scrWidth) |
|
75 |
public TwistyJing(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
76 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
77 | 77 |
{ |
78 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
78 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java | ||
---|---|---|
27 | 27 |
import org.distorted.library.main.DistortedEffects; |
28 | 28 |
import org.distorted.library.main.DistortedTexture; |
29 | 29 |
import org.distorted.library.mesh.MeshSquare; |
30 |
import org.distorted.library.type.Static3D; |
|
30 | 31 |
import org.distorted.library.type.Static4D; |
31 | 32 |
import org.distorted.library.main.QuatHelper; |
32 | 33 |
|
... | ... | |
43 | 44 |
|
44 | 45 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
45 | 46 |
|
46 |
public TwistyKilominx(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
47 |
DistortedEffects effects, Resources res, int scrWidth) |
|
47 |
public TwistyKilominx(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
48 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
48 | 49 |
{ |
49 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
50 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
50 | 51 |
} |
51 | 52 |
|
52 | 53 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java | ||
---|---|---|
27 | 27 |
import org.distorted.library.main.DistortedEffects; |
28 | 28 |
import org.distorted.library.main.DistortedTexture; |
29 | 29 |
import org.distorted.library.mesh.MeshSquare; |
30 |
import org.distorted.library.type.Static3D; |
|
30 | 31 |
import org.distorted.library.type.Static4D; |
31 | 32 |
import org.distorted.library.main.QuatHelper; |
32 | 33 |
|
... | ... | |
44 | 45 |
|
45 | 46 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
46 | 47 |
|
47 |
public TwistyMegaminx(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
48 |
DistortedEffects effects, Resources res, int scrWidth) |
|
48 |
public TwistyMegaminx(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
49 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
49 | 50 |
{ |
50 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
51 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
51 | 52 |
} |
52 | 53 |
|
53 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyMinx.java | ||
---|---|---|
96 | 96 |
|
97 | 97 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 98 |
|
99 |
TwistyMinx(int numLayers, int realSize, Static4D quat, DistortedTexture texture, |
|
99 |
TwistyMinx(int numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
100 | 100 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth) |
101 | 101 |
{ |
102 |
super(numLayers, realSize, quat, texture, mesh, effects, res, scrWidth); |
|
102 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
103 | 103 |
} |
104 | 104 |
|
105 | 105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyMirror.java | ||
---|---|---|
86 | 86 |
|
87 | 87 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
88 | 88 |
|
89 |
public TwistyMirror(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
90 |
DistortedEffects effects, Resources res, int scrWidth) |
|
89 |
public TwistyMirror(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
90 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
91 | 91 |
{ |
92 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
92 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
93 | 93 |
} |
94 | 94 |
|
95 | 95 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
65 | 65 |
|
66 | 66 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | 67 |
|
68 |
public TwistyPyraminx(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
69 |
DistortedEffects effects, Resources res, int scrWidth) |
|
68 |
public TwistyPyraminx(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
69 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
70 | 70 |
{ |
71 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
71 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
72 | 72 |
} |
73 | 73 |
|
74 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyRedi.java | ||
---|---|---|
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
74 | 74 |
|
75 |
public TwistyRedi(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
76 |
DistortedEffects effects, Resources res, int scrWidth) |
|
75 |
public TwistyRedi(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
76 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
77 | 77 |
{ |
78 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
78 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyRex.java | ||
---|---|---|
73 | 73 |
|
74 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
75 | 75 |
|
76 |
public TwistyRex(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
77 |
DistortedEffects effects, Resources res, int scrWidth) |
|
76 |
public TwistyRex(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
77 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
78 | 78 |
{ |
79 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
79 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySkewb.java | ||
---|---|---|
71 | 71 |
|
72 | 72 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
73 | 73 |
|
74 |
public TwistySkewb(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
75 |
DistortedEffects effects, Resources res, int scrWidth) |
|
74 |
public TwistySkewb(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
75 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
76 | 76 |
{ |
77 |
super(size, 2*size-2, quat, texture, mesh, effects, res, scrWidth); |
|
77 |
super(size, 2*size-2, quat, move, texture, mesh, effects, res, scrWidth);
|
|
78 | 78 |
} |
79 | 79 |
|
80 | 80 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare.java | ||
---|---|---|
64 | 64 |
|
65 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 66 |
|
67 |
TwistySquare(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
68 |
DistortedEffects effects, Resources res, int scrWidth) |
|
67 |
TwistySquare(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
68 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
69 | 69 |
{ |
70 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
70 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
47 | 48 |
|
48 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
49 | 50 |
|
50 |
public TwistySquare1(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
51 |
DistortedEffects effects, Resources res, int scrWidth) |
|
51 |
public TwistySquare1(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
52 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
52 | 53 |
{ |
53 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
54 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
54 | 55 |
} |
55 | 56 |
|
56 | 57 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare2.java | ||
---|---|---|
24 | 24 |
import org.distorted.library.main.DistortedEffects; |
25 | 25 |
import org.distorted.library.main.DistortedTexture; |
26 | 26 |
import org.distorted.library.mesh.MeshSquare; |
27 |
import org.distorted.library.type.Static3D; |
|
27 | 28 |
import org.distorted.library.type.Static4D; |
28 | 29 |
|
29 | 30 |
import org.distorted.objectlib.R; |
... | ... | |
47 | 48 |
|
48 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
49 | 50 |
|
50 |
public TwistySquare2(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
51 |
DistortedEffects effects, Resources res, int scrWidth) |
|
51 |
public TwistySquare2(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
52 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
52 | 53 |
{ |
53 |
super(size, quat, texture, mesh, effects, res, scrWidth); |
|
54 |
super(size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
54 | 55 |
} |
55 | 56 |
|
56 | 57 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java | ||
---|---|---|
76 | 76 |
|
77 | 77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
78 | 78 |
|
79 |
public TwistyUltimate(int size, Static4D quat, DistortedTexture texture, MeshSquare mesh,
|
|
80 |
DistortedEffects effects, Resources res, int scrWidth) |
|
79 |
public TwistyUltimate(int size, Static4D quat, Static3D move, DistortedTexture texture,
|
|
80 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
81 | 81 |
{ |
82 |
super(size, size, quat, texture, mesh, effects, res, scrWidth); |
|
82 |
super(size, size, quat, move, texture, mesh, effects, res, scrWidth);
|
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
1) introduce possibility to move objects, i.e. display them not in the middle of the screen (not fully functional yet)
2) do away with unneeded any more interface 'EffectController' - since ObjectPreRender is the only implementation now.