Revision eb507734
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/deferredjob/DeferredJobRenderer.java | ||
---|---|---|
148 | 148 |
|
149 | 149 |
void apply(int number) |
150 | 150 |
{ |
151 |
mRotate.setMeshAssociation(number,0);
|
|
151 |
mRotate.setMeshAssociation(0,number);
|
|
152 | 152 |
mAngle.set(360); |
153 | 153 |
mAngleDyn.resetToBeginning(); |
154 | 154 |
} |
... | ... | |
184 | 184 |
MeshBase[] meshes = new MeshRectangles[MESHES]; |
185 | 185 |
|
186 | 186 |
meshes[0] = new MeshRectangles(1,1); |
187 |
meshes[0].setEffectAssociation(0,1,0); |
|
187 | 188 |
|
188 | 189 |
for(int i=1; i<MESHES; i++) |
189 | 190 |
{ |
190 | 191 |
meshes[i] = meshes[0].copy(true); |
192 |
meshes[i].setEffectAssociation(0,1,i); |
|
191 | 193 |
} |
192 | 194 |
|
193 | 195 |
Static4D[] lTextureMaps = new Static4D[MESHES]; |
... | ... | |
207 | 209 |
VertexEffectMove effect0 = new VertexEffectMove ( new Static3D(0,0,0.5f) ); |
208 | 210 |
VertexEffectRotate effect1 = new VertexEffectRotate( new Static1D(180), new Static3D(1,0,0), new Static3D(0,0,0) ); |
209 | 211 |
|
210 |
effect1.setMeshAssociation(1,0); // apply only to mesh[1] |
|
212 |
effect0.setMeshAssociation(1,0); // apply only to Components whose andAssoc has the least significant bit set, i.e. |
|
213 |
// to both meshes[0] and meshes[1] |
|
214 |
effect1.setMeshAssociation(0,1); // apply only to Components whose equAssoc is equal to 1, i.e. only to mesh[1] |
|
211 | 215 |
|
212 | 216 |
tmp[0].apply(effect0); |
213 | 217 |
tmp[0].apply(effect1); |
... | ... | |
218 | 222 |
tmp[0].mergeComponents(); |
219 | 223 |
tmp[1].mergeComponents(); |
220 | 224 |
|
225 |
tmp[0].setEffectAssociation(0,0,0); // set the equAssoc of the 0th (the only) component to 0 |
|
226 |
tmp[1].setEffectAssociation(0,0,1); // set the equAssoc of the 0th (the only) component to 1 |
|
227 |
|
|
221 | 228 |
MeshBase combined = new MeshJoined(tmp); |
222 | 229 |
|
223 | 230 |
VertexEffectMove moveL = new VertexEffectMove ( new Static3D(-0.6f,0,0) ); |
224 | 231 |
VertexEffectMove moveR = new VertexEffectMove ( new Static3D(+0.6f,0,0) ); |
225 | 232 |
|
226 |
moveL.setMeshAssociation(0,0); |
|
227 |
moveR.setMeshAssociation(1,0);
|
|
233 |
moveL.setMeshAssociation(0,0); // apply only to tmp[0]
|
|
234 |
moveR.setMeshAssociation(0,1); // apply only to tmp[1]
|
|
228 | 235 |
|
229 | 236 |
combined.apply(moveL); |
230 | 237 |
combined.apply(moveR); |
Also available in: Unified diff
Update Myanmar flag.