Revision 4e9f2df5
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyMegaminx.java | ||
---|---|---|
258 | 258 |
float Y = width*SIN18; |
259 | 259 |
float Z = width*COS18*COS_HALFD; |
260 | 260 |
|
261 |
float[][] vertices = new float[][]
|
|
261 |
float[][] vertices = |
|
262 | 262 |
{ |
263 | 263 |
{ 0, 0 , 0 }, |
264 | 264 |
{ X, Y , -Z }, |
... | ... | |
270 | 270 |
{ -X, Y-width, -Z }, |
271 | 271 |
}; |
272 | 272 |
|
273 |
int[][] vertIndexes = new int[][]
|
|
273 |
int[][] indices =
|
|
274 | 274 |
{ |
275 | 275 |
{4,5,1,0}, |
276 | 276 |
{7,4,0,3}, |
... | ... | |
280 | 280 |
{7,6,2,3} |
281 | 281 |
}; |
282 | 282 |
|
283 |
return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),3);
|
|
283 |
return new ObjectShape(vertices, indices, getNumCubitFaces(), 3);
|
|
284 | 284 |
} |
285 | 285 |
if( variant<numVariants-1 ) |
286 | 286 |
{ |
... | ... | |
293 | 293 |
float Y = height*SIN18/COS18; |
294 | 294 |
float Z = height*COS_HALFD; |
295 | 295 |
|
296 |
float[][] vertices = new float[][]
|
|
296 |
float[][] vertices = |
|
297 | 297 |
{ |
298 | 298 |
{ 0, W , 0 }, |
299 | 299 |
{ X, W+Y , -Z }, |
... | ... | |
305 | 305 |
{ -X,-W-Y , -Z }, |
306 | 306 |
}; |
307 | 307 |
|
308 |
int[][] vertIndexes = new int[][]
|
|
308 |
int[][] indices =
|
|
309 | 309 |
{ |
310 | 310 |
{4,5,1,0}, |
311 | 311 |
{7,4,0,3}, |
... | ... | |
315 | 315 |
{4,5,6,7} |
316 | 316 |
}; |
317 | 317 |
|
318 |
return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),2);
|
|
318 |
return new ObjectShape(vertices, indices, getNumCubitFaces(), 2);
|
|
319 | 319 |
} |
320 | 320 |
else |
321 | 321 |
{ |
... | ... | |
330 | 330 |
float X2 = R*COS18; |
331 | 331 |
float Y2 = R*SIN18; |
332 | 332 |
|
333 |
float[][] vertices = new float[][]
|
|
333 |
float[][] vertices = |
|
334 | 334 |
{ |
335 | 335 |
{-X1,+Y1*sinA, Y1*cosA}, |
336 | 336 |
{-X2,-Y2*sinA,-Y2*cosA}, |
... | ... | |
340 | 340 |
{ 0 , R*cosA ,-R*sinA } |
341 | 341 |
}; |
342 | 342 |
|
343 |
int[][] vertIndexes = new int[][]
|
|
343 |
int[][] indices =
|
|
344 | 344 |
{ |
345 | 345 |
{0,1,2,3,4}, |
346 | 346 |
{0,1,5}, |
... | ... | |
350 | 350 |
{4,0,5} |
351 | 351 |
}; |
352 | 352 |
|
353 |
return new ObjectShape(vertices,vertIndexes,getNumCubitFaces(),1);
|
|
353 |
return new ObjectShape(vertices, indices, getNumCubitFaces(), 1);
|
|
354 | 354 |
} |
355 | 355 |
} |
356 | 356 |
|
Also available in: Unified diff
Simplify.