Revision 5974d2ae
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/object/Cubit.java | ||
---|---|---|
160 | 160 |
float z = position.get2(); |
161 | 161 |
|
162 | 162 |
float nc = parent.mSize*0.5f; |
163 |
int TS = RubikObject.TEXTURE_SIZE; |
|
164 |
Static3D vector = new Static3D(TS*(x-nc), TS*(y-nc), TS*(z-nc)); |
|
163 |
Static3D vector = new Static3D(x-nc, y-nc, z-nc); |
|
165 | 164 |
|
166 | 165 |
mParent = parent; |
167 | 166 |
mMesh = mesh; |
... | ... | |
172 | 171 |
mCurrentPosition = position; |
173 | 172 |
mRotateEffect = new MatrixEffectRotate(mRotationAngle, mRotationAxis, matrCenter); |
174 | 173 |
|
175 |
mEffect = new DistortedEffects(); |
|
174 |
mEffect = new DistortedEffects(1);
|
|
176 | 175 |
mEffect.apply(mParent.mSinkEffect); |
177 | 176 |
mEffect.apply( new MatrixEffectMove(vector) ); |
178 | 177 |
mEffect.apply( new MatrixEffectQuaternion(mQuatScramble, matrCenter)); |
Also available in: Unified diff
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)