Revision 470820a7
Added by Leszek Koltunski almost 4 years ago
src/main/java/org/distorted/objects/RubikPyraminx.java | ||
---|---|---|
225 | 225 |
meshes[i].setEffectAssociation(0,association,0); |
226 | 226 |
} |
227 | 227 |
|
228 |
Static4D[] textureMaps = new Static4D[MESHES]; |
|
229 |
for(int i=0; i<MESHES; i++) textureMaps[i] = new Static4D(i*0.25f,0.0f,0.25f,1.0f); |
|
230 | 228 |
MeshBase result = new MeshJoined(meshes); |
231 |
result.setTextureMap(textureMaps); |
|
232 | 229 |
|
233 | 230 |
Static3D a0 = new Static3D( 0, 1, 0 ); |
234 | 231 |
Static3D a1 = new Static3D( 0, -1.0f/3, 2*SQ2/3 ); |
... | ... | |
301 | 298 |
result.apply( ROTATION[mRotArray[cubit]] ); |
302 | 299 |
} |
303 | 300 |
|
301 |
result.mergeEffComponents(); |
|
302 |
|
|
304 | 303 |
return result; |
305 | 304 |
} |
306 | 305 |
|
... | ... | |
313 | 312 |
if( kind>=0 ) |
314 | 313 |
{ |
315 | 314 |
if( mMeshRotated[kind]==null ) mMeshRotated[kind] = createStaticMesh(cubit); |
316 |
return mMeshRotated[kind].copy(false);
|
|
315 |
return mMeshRotated[kind].copy(true);
|
|
317 | 316 |
} |
318 | 317 |
else |
319 | 318 |
{ |
320 | 319 |
if( mMesh==null ) mMesh = createStaticMesh(cubit); |
321 |
return mMesh.copy(false);
|
|
320 |
return mMesh.copy(true);
|
|
322 | 321 |
} |
323 | 322 |
} |
324 | 323 |
|
Also available in: Unified diff
Begin porting RubikCube to the new SingleMesh library. This will make rendering much faster - e.g. in case of Cube 5, instead of 98 renders of individual Cubits, there will be one render of the whole Mesh.