Revision a919e8dc
Added by Leszek Koltunski almost 5 years ago
src/main/java/org/distorted/examples/meshjoin/MeshJoinRenderer.java | ||
---|---|---|
216 | 216 |
|
217 | 217 |
MeshJoined result = new MeshJoined(meshes); |
218 | 218 |
|
219 |
float[][] maps = new float[MESHES][4]; |
|
220 |
|
|
221 |
maps[0][0] = 3.0f/8; maps[0][1] = 3.0f/8; maps[0][2] = 1.0f/8; maps[0][3] = 2.0f/8; |
|
222 |
maps[1][0] = 5.0f/8; maps[1][1] = 3.0f/8; maps[1][2] = 1.0f/8; maps[1][3] = 2.0f/8; |
|
223 |
maps[2][0] = 3.0f/8; maps[2][1] = 5.0f/8; maps[2][2] = 1.0f/8; maps[2][3] = 2.0f/8; |
|
224 |
maps[3][0] = 1.0f/8; maps[3][1] = 5.0f/8; maps[3][2] = 1.0f/8; maps[3][3] = 2.0f/8; |
|
225 |
maps[4][0] = 5.0f/8; maps[4][1] = 1.0f/8; maps[4][2] = 1.0f/8; maps[4][3] = 2.0f/8; |
|
226 |
maps[5][0] = 5.0f/8; maps[5][1] = 5.0f/8; maps[5][2] = 1.0f/8; maps[5][3] = 2.0f/8; |
|
219 |
Static4D[] maps = new Static4D[MESHES]; |
|
220 |
maps[0] = new Static4D(3.0f/8, 3.0f/8, 1.0f/8, 2.0f/8); |
|
221 |
maps[1] = new Static4D(5.0f/8, 3.0f/8, 1.0f/8, 2.0f/8); |
|
222 |
maps[2] = new Static4D(3.0f/8, 5.0f/8, 1.0f/8, 2.0f/8); |
|
223 |
maps[3] = new Static4D(1.0f/8, 5.0f/8, 1.0f/8, 2.0f/8); |
|
224 |
maps[4] = new Static4D(5.0f/8, 1.0f/8, 1.0f/8, 2.0f/8); |
|
225 |
maps[5] = new Static4D(5.0f/8, 5.0f/8, 1.0f/8, 2.0f/8); |
|
227 | 226 |
|
228 | 227 |
result.setTextureMap(maps); |
229 | 228 |
|
230 |
maps[0][0] = 3.0f/8; maps[0][1] = 3.0f/8; maps[0][2] = 2.0f/8; maps[0][3] = 2.0f/8;
|
|
231 |
maps[1][0] = 5.0f/8; maps[1][1] = 1.0f/8; maps[1][2] = 2.0f/8; maps[1][3] = 2.0f/8;
|
|
232 |
maps[2][0] = 1.0f/8; maps[2][1] = 5.0f/8; maps[2][2] = 2.0f/8; maps[2][3] = 2.0f/8;
|
|
233 |
maps[3][0] = 1.0f/8; maps[3][1] = 3.0f/8; maps[3][2] = 2.0f/8; maps[3][3] = 2.0f/8;
|
|
234 |
maps[4][0] = 3.0f/8; maps[4][1] = 1.0f/8; maps[4][2] = 2.0f/8; maps[4][3] = 2.0f/8;
|
|
235 |
maps[5][0] = 1.0f/8; maps[5][1] = 1.0f/8; maps[5][2] = 2.0f/8; maps[5][3] = 2.0f/8;
|
|
229 |
maps[0] = new Static4D(3.0f/8, 3.0f/8, 2.0f/8, 2.0f/8);
|
|
230 |
maps[1] = new Static4D(5.0f/8, 1.0f/8, 2.0f/8, 2.0f/8);
|
|
231 |
maps[2] = new Static4D(1.0f/8, 5.0f/8, 2.0f/8, 2.0f/8);
|
|
232 |
maps[3] = new Static4D(1.0f/8, 3.0f/8, 2.0f/8, 2.0f/8);
|
|
233 |
maps[4] = new Static4D(3.0f/8, 1.0f/8, 2.0f/8, 2.0f/8);
|
|
234 |
maps[5] = new Static4D(1.0f/8, 1.0f/8, 2.0f/8, 2.0f/8);
|
|
236 | 235 |
|
237 | 236 |
result.setTextureMap(maps); |
238 | 237 |
return result; |
Also available in: Unified diff
Improve setTextureMap.