Project

General

Profile

« Previous | Next » 

Revision dae661e9

Added by Leszek Koltunski about 5 years ago

Invert the order of Matrix Effects. Now, just as in the other queues, the first matrix effect is actually the first to act on the object - not the other way around!

View differences:

src/main/java/org/distorted/examples/olimpic/OlimpicRenderer.java
100 100
      mScale= new Static3D(1,1,1);
101 101

  
102 102
      DistortedEffects effects = new DistortedEffects();
103
      effects.apply(new MatrixEffectMove(mMove));
104 103
      effects.apply(new MatrixEffectScale(mScale));
104
      effects.apply(new MatrixEffectMove(mMove));
105 105

  
106 106
      mScreenW = 9*LEAF_SIZE;
107 107
      mScreenH = 9*LEAF_SIZE;
......
122 122
      for(int j=0; j<NUM_LEAVES; j++)
123 123
        {
124 124
        mEffects[j] = new DistortedEffects();
125
        mEffects[j].apply( new MatrixEffectRotate(new Static1D(j*(360/NUM_LEAVES)), axis, center) );
126 125
        mEffects[j].apply(new MatrixEffectMove(moveVector));
126
        mEffects[j].apply( new MatrixEffectRotate(new Static1D(j*(360/NUM_LEAVES)), axis, center) );
127 127
        }
128 128

  
129 129
      for(int i=0; i<NUM_CIRCLES; i++)
130 130
        {
131 131
        effects = new DistortedEffects();
132
        effects.apply( new MatrixEffectMove(new Static3D(positions[2*i], positions[2*i+1], 0)) );
133 132
        effects.apply( new MatrixEffectRotate(rot, axis, center) );
133
        effects.apply( new MatrixEffectMove(new Static3D(positions[2*i], positions[2*i+1], 0)) );
134 134
        effects.apply( new FragmentEffectChroma(new Static1D(0.5f), new Static3D(colors[3*i],colors[3*i+1], colors[3*i+2])) );
135 135

  
136 136
        mCircleNode[i] = new DistortedNode( surface, effects, mMesh);

Also available in: Unified diff