Revision eb507734
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java | ||
---|---|---|
88 | 88 |
|
89 | 89 |
mSinkAssociation = 0; |
90 | 90 |
mSink = new VertexEffectSink( sink, center, new Static4D(0,0,0,0.75f) ); |
91 |
mSink.setMeshAssociation(-1,mSinkAssociation);
|
|
91 |
mSink.setMeshAssociation(mSinkAssociation,-1);
|
|
92 | 92 |
|
93 | 93 |
mEffects = new DistortedEffects(); |
94 | 94 |
mEffects.apply( new MatrixEffectQuaternion(quatInt2, center) ); |
... | ... | |
151 | 151 |
if( checked ) mSinkAssociation |= n; |
152 | 152 |
else mSinkAssociation &= (15-n); |
153 | 153 |
|
154 |
mSink.setMeshAssociation(-1,mSinkAssociation);
|
|
154 |
mSink.setMeshAssociation(mSinkAssociation,-1);
|
|
155 | 155 |
} |
156 | 156 |
|
157 | 157 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
209 | 209 |
final float angleFaces = (float)((180/Math.PI)*(2*Math.asin(SQ3/3))); // angle between two faces of a tetrahedron |
210 | 210 |
final int MESHES=4; |
211 | 211 |
|
212 |
int association = 1;
|
|
212 |
int andAssoc = 1;
|
|
213 | 213 |
MeshBase[] meshes = new MeshTriangles[MESHES]; |
214 | 214 |
|
215 | 215 |
for(int i=0; i<MESHES; i++) |
216 | 216 |
{ |
217 | 217 |
meshes[i] = new MeshTriangles(5); |
218 |
meshes[i].setEffectAssociation(0,association);
|
|
219 |
association <<= 1;
|
|
218 |
meshes[i].setEffectAssociation(0,andAssoc,0);
|
|
219 |
andAssoc <<= 1;
|
|
220 | 220 |
} |
221 | 221 |
|
222 | 222 |
Static4D[] textureMaps = new Static4D[MESHES]; |
... | ... | |
267 | 267 |
VertexEffectDeform effect10= new VertexEffectDeform(dVec2, dRad, dCen2, dReg); |
268 | 268 |
VertexEffectDeform effect11= new VertexEffectDeform(dVec3, dRad, dCen3, dReg); |
269 | 269 |
|
270 |
effect4.setMeshAssociation(-1,14); // apply to mesh[1], [2] and [3]
|
|
271 |
effect5.setMeshAssociation(-1, 2); // apply only to mesh[1]
|
|
272 |
effect6.setMeshAssociation(-1, 4); // apply only to mesh[2]
|
|
273 |
effect7.setMeshAssociation(-1, 8); // apply only to mesh[3]
|
|
270 |
effect4.setMeshAssociation(14,-1); // apply to mesh[1], [2] and [3]
|
|
271 |
effect5.setMeshAssociation( 2,-1); // apply only to mesh[1]
|
|
272 |
effect6.setMeshAssociation( 4,-1); // apply only to mesh[2]
|
|
273 |
effect7.setMeshAssociation( 8,-1); // apply only to mesh[3]
|
|
274 | 274 |
|
275 | 275 |
result.apply(effect1); |
276 | 276 |
result.apply(effect2); |
Also available in: Unified diff
Update Myanmar flag.