Project

General

Profile

« Previous | Next » 

Revision ecf3d6e3

Added by Leszek Koltunski over 2 years ago

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.

View differences:

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.

Also available in: Unified diff