Revision e7daa161
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/effects/objectchange/ObjectChangeEffectRound.java | ||
---|---|---|
32 | 32 |
{ |
33 | 33 |
public int createEffectsPhase0(int duration) |
34 | 34 |
{ |
35 |
float X = mObject[0].getNodeSize()/3.0f;
|
|
35 |
float X = mObject[0].getNodeWidth()/3.0f;
|
|
36 | 36 |
|
37 | 37 |
mCubeEffectPosition[0] = new int[] {2,3}; |
38 | 38 |
mCubeEffects[0] = new Effect[mCubeEffectPosition[0].length]; |
... | ... | |
56 | 56 |
|
57 | 57 |
public int createEffectsPhase1(int duration) |
58 | 58 |
{ |
59 |
float X = mObject[0].getNodeSize()/3.0f;
|
|
59 |
float X = mObject[0].getNodeWidth()/3.0f;
|
|
60 | 60 |
|
61 | 61 |
mCubeEffectPosition[1] = new int[] {2,3}; |
62 | 62 |
mCubeEffects[1] = new Effect[mCubeEffectPosition[1].length]; |
src/main/java/org/distorted/objectlib/effects/scramble/ScrambleEffectRotations.java | ||
---|---|---|
76 | 76 |
|
77 | 77 |
mCubeEffects[0] = new MatrixEffectQuaternion(dq, new Static3D(0,0,0)); |
78 | 78 |
|
79 |
float Z = mObject.getNodeSize()/3.0f;
|
|
79 |
float Z = mObject.getNodeWidth()/3.0f;
|
|
80 | 80 |
|
81 | 81 |
Dynamic3D d0 = new Dynamic3D(duration, 0.5f); |
82 | 82 |
d0.setMode(Dynamic.MODE_PATH); |
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
565 | 565 |
{ |
566 | 566 |
mScreenWidth = width; |
567 | 567 |
mScreenHeight= height; |
568 |
mScreenMin = Math.min(width, height);
|
|
569 |
mPreRender.setScreenSize(width); |
|
568 |
mScreenMin = Math.min(width,height); |
|
569 |
mPreRender.setScreenSize(width,height);
|
|
570 | 570 |
} |
571 | 571 |
|
572 | 572 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/ObjectPreRender.java | ||
---|---|---|
55 | 55 |
private boolean mUIBlocked, mTouchBlocked, mIsSolved; |
56 | 56 |
private long mRotationFinishedID; |
57 | 57 |
private final long[] mEffectID; |
58 |
private int mScreenWidth; |
|
58 |
private int mScreenWidth, mScreenHeight;
|
|
59 | 59 |
private int[][] mNextMoves; |
60 | 60 |
private int mScrambleObjectNum; |
61 | 61 |
private int mAddRotationAxis, mAddRotationRowBitmap, mAddRotationAngle; |
... | ... | |
89 | 89 |
|
90 | 90 |
mDebug = ""; |
91 | 91 |
|
92 |
mScreenWidth = 0; |
|
92 |
mScreenWidth = 0; |
|
93 |
mScreenHeight = 0; |
|
93 | 94 |
mScrambleObjectNum = 0; |
94 | 95 |
|
95 | 96 |
mEffectID = new long[BaseEffect.Type.LENGTH]; |
... | ... | |
108 | 109 |
mOldObject = mNewObject; |
109 | 110 |
Static3D move = new Static3D(mMoveX,mMoveY,0); |
110 | 111 |
|
111 |
mNewObject = object.create( mController.getQuat(), move, mAct.get().getResources(), mScreenWidth); |
|
112 |
mNewObject = object.create( mController.getQuat(), move, mAct.get().getResources(), mScreenWidth, mScreenHeight);
|
|
112 | 113 |
|
113 | 114 |
if( mNewObject!=null ) |
114 | 115 |
{ |
... | ... | |
373 | 374 |
// PUBLIC API |
374 | 375 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
375 | 376 |
|
376 |
public void setScreenSize(int width) |
|
377 |
public void setScreenSize(int width, int height)
|
|
377 | 378 |
{ |
378 | 379 |
if( mNewObject!=null ) |
379 | 380 |
{ |
380 | 381 |
mNewObject.createTexture(); |
381 |
mNewObject.recomputeScaleFactor(width); |
|
382 |
mNewObject.recomputeScaleFactor(width,height);
|
|
382 | 383 |
} |
383 | 384 |
mScreenWidth = width; |
385 |
mScreenHeight= height; |
|
384 | 386 |
} |
385 | 387 |
|
386 | 388 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/ObjectType.java | ||
---|---|---|
163 | 163 |
|
164 | 164 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
165 | 165 |
|
166 |
public TwistyObject create(Static4D quat, Static3D move, Resources res, int scrWidth)
|
|
166 |
public TwistyObject create(Static4D quat, Static3D move, Resources res, int surfaceW, int surfaceH)
|
|
167 | 167 |
{ |
168 | 168 |
DistortedTexture texture = new DistortedTexture(); |
169 | 169 |
DistortedEffects effects = new DistortedEffects(); |
... | ... | |
184 | 184 |
case 0: |
185 | 185 |
case 1: |
186 | 186 |
case 2: |
187 |
case 3: return new TwistyCube (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
188 |
case 4: return new TwistyJing (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
187 |
case 3: return new TwistyCube (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
188 |
case 4: return new TwistyJing (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
189 | 189 |
case 5: |
190 | 190 |
case 6: |
191 |
case 7: return new TwistyPyraminx (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
191 |
case 7: return new TwistyPyraminx (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
192 | 192 |
case 8: |
193 |
case 9: return new TwistyKilominx (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
193 |
case 9: return new TwistyKilominx (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
194 | 194 |
case 10: |
195 |
case 11: return new TwistyMegaminx (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
196 |
case 12: return new TwistyUltimate (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
195 |
case 11: return new TwistyMegaminx (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
196 |
case 12: return new TwistyUltimate (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
197 | 197 |
case 13: |
198 | 198 |
case 14: |
199 |
case 15: return new TwistyDiamond (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
200 |
case 16: return new TwistyDino6 (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
201 |
case 17: return new TwistyDino4 (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
202 |
case 18: return new TwistyRedi (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
203 |
case 19: return new TwistyHelicopter (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
199 |
case 15: return new TwistyDiamond (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
200 |
case 16: return new TwistyDino6 (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
201 |
case 17: return new TwistyDino4 (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
202 |
case 18: return new TwistyRedi (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
203 |
case 19: return new TwistyHelicopter (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
204 | 204 |
case 20: |
205 |
case 21: return new TwistySkewb (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
206 |
case 22: return new TwistyIvy (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
207 |
case 23: return new TwistyRex (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
208 |
case 24: return new TwistyBandagedFused (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
209 |
case 25: return new TwistyBandaged2Bar (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
210 |
case 26: return new TwistyBandaged3Plate(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
211 |
case 27: return new TwistyBandagedEvil (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
212 |
case 28: return new TwistySquare1 (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
213 |
case 29: return new TwistySquare2 (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
205 |
case 21: return new TwistySkewb (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
206 |
case 22: return new TwistyIvy (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
207 |
case 23: return new TwistyRex (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
208 |
case 24: return new TwistyBandagedFused (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
209 |
case 25: return new TwistyBandaged2Bar (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
210 |
case 26: return new TwistyBandaged3Plate(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
211 |
case 27: return new TwistyBandagedEvil (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
212 |
case 28: return new TwistySquare1 (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
213 |
case 29: return new TwistySquare2 (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
214 | 214 |
case 30: |
215 |
case 31: return new TwistyMirror (numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
215 |
case 31: return new TwistyMirror (numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
216 | 216 |
} |
217 | 217 |
|
218 | 218 |
return null; |
src/main/java/org/distorted/objectlib/main/Twisty12.java | ||
---|---|---|
53 | 53 |
|
54 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 55 |
|
56 |
public Twisty12(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
57 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
56 |
public Twisty12(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
57 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
58 | 58 |
{ |
59 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
59 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
60 | 60 |
} |
61 | 61 |
|
62 | 62 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/Twisty4.java | ||
---|---|---|
39 | 39 |
|
40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 41 |
|
42 |
public Twisty4(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
42 |
public Twisty4(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
44 | 44 |
{ |
45 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
45 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/Twisty6.java | ||
---|---|---|
40 | 40 |
|
41 | 41 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
42 | 42 |
|
43 |
public Twisty6(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
44 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
43 |
public Twisty6(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
44 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
45 | 45 |
{ |
46 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
46 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
47 | 47 |
} |
48 | 48 |
|
49 | 49 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/Twisty8.java | ||
---|---|---|
41 | 41 |
|
42 | 42 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
43 | 43 |
|
44 |
public Twisty8(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
45 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
44 |
public Twisty8(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture texture,
|
|
45 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
46 | 46 |
{ |
47 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, scrWidth);
|
|
47 |
super(numLayers, realSize, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
48 | 48 |
} |
49 | 49 |
|
50 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
82 | 82 |
public static final float SQ5 = (float)Math.sqrt(5); |
83 | 83 |
public static final float SQ6 = (float)Math.sqrt(6); |
84 | 84 |
|
85 |
private static final float NODE_RATIO = 1.60f; |
|
86 | 85 |
private static final float MAX_SIZE_CHANGE = 1.35f; |
87 | 86 |
private static final float MIN_SIZE_CHANGE = 0.75f; |
88 | 87 |
|
... | ... | |
103 | 102 |
private final Static3D[] mAxis; |
104 | 103 |
private final float[][] mCuts; |
105 | 104 |
private final int[] mNumCuts; |
106 |
private final int mNodeSize;
|
|
105 |
private final int mNodeW, mNodeH;
|
|
107 | 106 |
private final float[][] mOrigPos; |
108 | 107 |
private final Static3D mNodeScale; |
109 | 108 |
private final Static4D mQuat; |
110 | 109 |
private final int[] mNumLayers; |
111 |
private final int mRealSize;
|
|
110 |
private final float mRealSize;
|
|
112 | 111 |
private final DistortedEffects mEffects; |
113 | 112 |
private final VertexEffectRotate mRotateEffect; |
114 | 113 |
private final Dynamic1D mRotationAngle; |
... | ... | |
139 | 138 |
|
140 | 139 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
141 | 140 |
|
142 |
TwistyObject(int[] numLayers, int realSize, Static4D quat, Static3D move, DistortedTexture nodeTexture,
|
|
143 |
MeshSquare nodeMesh, DistortedEffects nodeEffects, Resources res, int screenWidth)
|
|
141 |
TwistyObject(int[] numLayers, float realSize, Static4D quat, Static3D move, DistortedTexture nodeTexture,
|
|
142 |
MeshSquare nodeMesh, DistortedEffects nodeEffects, Resources res, int surfaceW, int surfaceH)
|
|
144 | 143 |
{ |
145 | 144 |
super(nodeTexture,nodeEffects,nodeMesh); |
146 | 145 |
|
147 |
mNodeSize = screenWidth; |
|
146 |
mNodeW = surfaceW; |
|
147 |
mNodeH = surfaceH; |
|
148 | 148 |
|
149 |
resizeFBO(mNodeSize, (int)(NODE_RATIO*mNodeSize));
|
|
149 |
resizeFBO(mNodeW,mNodeH);
|
|
150 | 150 |
|
151 | 151 |
mNumLayers = numLayers; |
152 | 152 |
mRealSize = realSize; |
153 | 153 |
mOrigPos = getCubitPositions(mNumLayers); |
154 | 154 |
mAxis = getRotationAxis(); |
155 | 155 |
mInitScreenRatio = getScreenRatio(); |
156 |
mObjectScreenRatio = 1.0f; |
|
157 | 156 |
mNumCubitFaces = getNumCubitFaces(); |
158 | 157 |
mSolvedFunctionIndex = getSolvedFunctionIndex(); |
159 | 158 |
|
... | ... | |
190 | 189 |
|
191 | 190 |
mQuatDebug = new int[NUM_CUBITS]; |
192 | 191 |
|
193 |
if( mObjectScreenRatio>MAX_SIZE_CHANGE) mObjectScreenRatio = MAX_SIZE_CHANGE; |
|
194 |
if( mObjectScreenRatio<MIN_SIZE_CHANGE) mObjectScreenRatio = MIN_SIZE_CHANGE; |
|
195 |
|
|
196 |
mNodeScale= new Static3D(screenWidth,NODE_RATIO*screenWidth,screenWidth); |
|
192 |
mNodeScale= new Static3D(surfaceW,surfaceH,surfaceW); |
|
197 | 193 |
mQuat = quat; |
198 | 194 |
|
199 | 195 |
mRotationAngle= new Dynamic1D(); |
... | ... | |
204 | 200 |
mRotationAngleMiddle = new Static1D(0); |
205 | 201 |
mRotationAngleFinal = new Static1D(0); |
206 | 202 |
|
207 |
float scale = mObjectScreenRatio*mInitScreenRatio*mNodeSize/mRealSize; |
|
208 |
mObjectScale = new Static3D(scale,scale,scale); |
|
203 |
mObjectScale = new Static3D(1,1,1); |
|
204 |
setObjectRatioNow(1.0f); |
|
205 |
|
|
209 | 206 |
MatrixEffectScale scaleEffect = new MatrixEffectScale(mObjectScale); |
210 | 207 |
MatrixEffectQuaternion quatEffect = new MatrixEffectQuaternion(quat, CENTER); |
211 | 208 |
MatrixEffectMove moveEffect = new MatrixEffectMove(move); |
... | ... | |
247 | 244 |
|
248 | 245 |
float fov = getFOV(); |
249 | 246 |
double halfFOV = fov * (Math.PI/360); |
250 |
mCameraDist = 0.5f*NODE_RATIO / (float)Math.tan(halfFOV);
|
|
247 |
mCameraDist = (0.5f*mNodeH) / ((float)Math.tan(halfFOV)*mNodeW);
|
|
251 | 248 |
|
252 | 249 |
setProjection( fov, 0.1f); |
253 | 250 |
} |
... | ... | |
1098 | 1095 |
|
1099 | 1096 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1100 | 1097 |
|
1101 |
void recomputeScaleFactor(int scrWidth)
|
|
1098 |
void recomputeScaleFactor(int surfaceW, int surfaceH)
|
|
1102 | 1099 |
{ |
1103 |
mNodeScale.set(scrWidth,NODE_RATIO*scrWidth,scrWidth);
|
|
1100 |
mNodeScale.set(surfaceW,surfaceH,surfaceW);
|
|
1104 | 1101 |
} |
1105 | 1102 |
|
1106 | 1103 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
1146 | 1143 |
void setObjectRatioNow(float sc) |
1147 | 1144 |
{ |
1148 | 1145 |
mObjectScreenRatio = sc; |
1149 |
float scale = mObjectScreenRatio*mInitScreenRatio*mNodeSize/mRealSize; |
|
1146 |
int nodeMinSize = Math.min(mNodeW,mNodeH); |
|
1147 |
float scale = mObjectScreenRatio*mInitScreenRatio*nodeMinSize/mRealSize; |
|
1150 | 1148 |
mObjectScale.set(scale,scale,scale); |
1151 | 1149 |
} |
1152 | 1150 |
|
... | ... | |
1159 | 1157 |
if( mObjectScreenRatio>MAX_SIZE_CHANGE) mObjectScreenRatio = MAX_SIZE_CHANGE; |
1160 | 1158 |
if( mObjectScreenRatio<MIN_SIZE_CHANGE) mObjectScreenRatio = MIN_SIZE_CHANGE; |
1161 | 1159 |
|
1162 |
float scale = mObjectScreenRatio*mInitScreenRatio*mNodeSize/mRealSize; |
|
1163 |
mObjectScale.set(scale,scale,scale); |
|
1160 |
setObjectRatioNow(mObjectScreenRatio); |
|
1164 | 1161 |
} |
1165 | 1162 |
|
1166 | 1163 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
1250 | 1247 |
|
1251 | 1248 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1252 | 1249 |
|
1253 |
public int getNodeSize()
|
|
1250 |
public int getNodeWidth()
|
|
1254 | 1251 |
{ |
1255 |
return mNodeSize;
|
|
1252 |
return mNodeW;
|
|
1256 | 1253 |
} |
1257 | 1254 |
|
1258 | 1255 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandaged2Bar.java | ||
---|---|---|
36 | 36 |
public class TwistyBandaged2Bar extends TwistyBandagedAbstract |
37 | 37 |
{ |
38 | 38 |
public TwistyBandaged2Bar(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
40 | 40 |
{ |
41 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
42 | 42 |
} |
43 | 43 |
|
44 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandaged3Plate.java | ||
---|---|---|
36 | 36 |
public class TwistyBandaged3Plate extends TwistyBandagedAbstract |
37 | 37 |
{ |
38 | 38 |
public TwistyBandaged3Plate(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
40 | 40 |
{ |
41 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
42 | 42 |
} |
43 | 43 |
|
44 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedAbstract.java | ||
---|---|---|
81 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
82 | 82 |
|
83 | 83 |
TwistyBandagedAbstract(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
84 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
84 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
85 | 85 |
{ |
86 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
86 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
87 | 87 |
} |
88 | 88 |
|
89 | 89 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedEvil.java | ||
---|---|---|
36 | 36 |
public class TwistyBandagedEvil extends TwistyBandagedAbstract |
37 | 37 |
{ |
38 | 38 |
public TwistyBandagedEvil(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, MeshSquare mesh, |
39 |
DistortedEffects effects, Resources res, int scrWidth)
|
|
39 |
DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
40 | 40 |
{ |
41 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
42 | 42 |
} |
43 | 43 |
|
44 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyBandagedFused.java | ||
---|---|---|
36 | 36 |
public class TwistyBandagedFused extends TwistyBandagedAbstract |
37 | 37 |
{ |
38 | 38 |
public TwistyBandagedFused(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
39 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
40 | 40 |
{ |
41 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
41 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
42 | 42 |
} |
43 | 43 |
|
44 | 44 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyCube.java | ||
---|---|---|
66 | 66 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
67 | 67 |
|
68 | 68 |
public TwistyCube(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
69 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
69 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
70 | 70 |
{ |
71 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
71 |
super(numL, (numL[0]+numL[1]+numL[2])/3.0f, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
72 | 72 |
} |
73 | 73 |
|
74 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDiamond.java | ||
---|---|---|
70 | 70 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
71 | 71 |
|
72 | 72 |
public TwistyDiamond(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
73 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
73 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
74 | 74 |
{ |
75 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
75 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
76 | 76 |
} |
77 | 77 |
|
78 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino.java | ||
---|---|---|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
74 | 74 |
|
75 | 75 |
TwistyDino(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
76 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
76 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
77 | 77 |
{ |
78 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
78 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino4.java | ||
---|---|---|
40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 41 |
|
42 | 42 |
public TwistyDino4(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
44 | 44 |
{ |
45 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
45 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyDino6.java | ||
---|---|---|
40 | 40 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 41 |
|
42 | 42 |
public TwistyDino6(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
43 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
44 | 44 |
{ |
45 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
45 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyHelicopter.java | ||
---|---|---|
78 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
79 | 79 |
|
80 | 80 |
public TwistyHelicopter(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
81 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
81 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
82 | 82 |
{ |
83 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
83 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyIvy.java | ||
---|---|---|
77 | 77 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
78 | 78 |
|
79 | 79 |
public TwistyIvy(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
80 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
80 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
81 | 81 |
{ |
82 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
82 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
83 | 83 |
} |
84 | 84 |
|
85 | 85 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyJing.java | ||
---|---|---|
74 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
75 | 75 |
|
76 | 76 |
public TwistyJing(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
77 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
77 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
78 | 78 |
{ |
79 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
79 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyKilominx.java | ||
---|---|---|
46 | 46 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
47 | 47 |
|
48 | 48 |
public TwistyKilominx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
49 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
49 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
50 | 50 |
{ |
51 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
51 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
52 | 52 |
} |
53 | 53 |
|
54 | 54 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java | ||
---|---|---|
47 | 47 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
48 | 48 |
|
49 | 49 |
public TwistyMegaminx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
50 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
50 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
51 | 51 |
{ |
52 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
52 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
53 | 53 |
} |
54 | 54 |
|
55 | 55 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyMinx.java | ||
---|---|---|
97 | 97 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
98 | 98 |
|
99 | 99 |
TwistyMinx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
100 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
100 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
101 | 101 |
{ |
102 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
102 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
103 | 103 |
} |
104 | 104 |
|
105 | 105 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyMirror.java | ||
---|---|---|
88 | 88 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
89 | 89 |
|
90 | 90 |
public TwistyMirror(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
91 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
91 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
92 | 92 |
{ |
93 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
93 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
94 | 94 |
} |
95 | 95 |
|
96 | 96 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyPyraminx.java | ||
---|---|---|
67 | 67 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
68 | 68 |
|
69 | 69 |
public TwistyPyraminx(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
70 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
70 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
71 | 71 |
{ |
72 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
72 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
73 | 73 |
} |
74 | 74 |
|
75 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyRedi.java | ||
---|---|---|
74 | 74 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
75 | 75 |
|
76 | 76 |
public TwistyRedi(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
77 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
77 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
78 | 78 |
{ |
79 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
79 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
80 | 80 |
} |
81 | 81 |
|
82 | 82 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyRex.java | ||
---|---|---|
75 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
76 | 76 |
|
77 | 77 |
public TwistyRex(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
78 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
78 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
79 | 79 |
{ |
80 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
80 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
81 | 81 |
} |
82 | 82 |
|
83 | 83 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySkewb.java | ||
---|---|---|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
74 | 74 |
|
75 | 75 |
public TwistySkewb(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
76 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
76 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
77 | 77 |
{ |
78 |
super(numL, 2*numL[0]-2, quat, move, texture, mesh, effects, res, scrWidth);
|
|
78 |
super(numL, 2*numL[0]-2, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare.java | ||
---|---|---|
65 | 65 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
66 | 66 |
|
67 | 67 |
TwistySquare(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
68 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
68 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
69 | 69 |
{ |
70 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
70 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
71 | 71 |
} |
72 | 72 |
|
73 | 73 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare1.java | ||
---|---|---|
50 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
51 | 51 |
|
52 | 52 |
public TwistySquare1(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
53 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
53 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
54 | 54 |
{ |
55 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
55 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistySquare2.java | ||
---|---|---|
50 | 50 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
51 | 51 |
|
52 | 52 |
public TwistySquare2(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
53 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
53 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
54 | 54 |
{ |
55 |
super(numL, quat, move, texture, mesh, effects, res, scrWidth);
|
|
55 |
super(numL, quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
56 | 56 |
} |
57 | 57 |
|
58 | 58 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/objects/TwistyUltimate.java | ||
---|---|---|
78 | 78 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
79 | 79 |
|
80 | 80 |
public TwistyUltimate(int[] numL, Static4D quat, Static3D move, DistortedTexture texture, |
81 |
MeshSquare mesh, DistortedEffects effects, Resources res, int scrWidth)
|
|
81 |
MeshSquare mesh, DistortedEffects effects, Resources res, int surfaceW, int surfaceH)
|
|
82 | 82 |
{ |
83 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, scrWidth);
|
|
83 |
super(numL, numL[0], quat, move, texture, mesh, effects, res, surfaceW, surfaceH);
|
|
84 | 84 |
} |
85 | 85 |
|
86 | 86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
- remove the retarded NODE_RATIO from TwistyObject
- more correctly estimate Cuboid's 'realSize' as an average of their 3 sizes.