Revision 9123760e
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/objectlib/objects/TwistyMirrorPyraminx.java | ||
---|---|---|
40 | 40 |
}; |
41 | 41 |
|
42 | 42 |
private static final int[] FACE_COLORS = new int[] { COLOR_WHITE }; |
43 |
private static final float[] MIRROR_VEC = { 0.0f, 0.0f, 0.0f };
|
|
43 |
private static final float[] MIRROR_VEC = { 0.06f, 0.08f, 0.10f };
|
|
44 | 44 |
|
45 | 45 |
private int[][] mEdges; |
46 | 46 |
private int[][] mBasicAngle; |
... | ... | |
148 | 148 |
{ |
149 | 149 |
if( mCuts==null ) |
150 | 150 |
{ |
151 |
float[] c = { SQ6/12, 5*SQ6/12 }; // ??
|
|
151 |
float[] c = { SQ6/12, 5*SQ6/12 }; |
|
152 | 152 |
mCuts = new float[][] {c,c,c,c}; |
153 | 153 |
} |
154 | 154 |
|
... | ... | |
201 | 201 |
{ |
202 | 202 |
Static3D ax = axis[a]; |
203 | 203 |
float d = ax.get0()*DX + ax.get1()*DY + ax.get2()*DZ; |
204 |
mDist[a] = SQ6/6 + d;
|
|
204 |
mDist[a] = SQ6/4 + d;
|
|
205 | 205 |
} |
206 | 206 |
} |
207 | 207 |
|
... | ... | |
343 | 343 |
private float[] internalPoint(int variant) |
344 | 344 |
{ |
345 | 345 |
float[][] pos = getPositions(); |
346 |
float[] position = pos[variant]; |
|
347 |
float[][] center = computeVertexEffectCenter(variant); |
|
348 |
float[] cent = center[0]; |
|
349 |
|
|
350 |
float[] ret = new float[3]; |
|
351 |
|
|
352 |
float A = 0.0f; |
|
353 |
|
|
354 |
ret[0] = position[0] + A*cent[0]; |
|
355 |
ret[1] = position[1] + A*cent[1]; |
|
356 |
ret[2] = position[2] + A*cent[2]; |
|
357 |
|
|
358 |
return ret; |
|
346 |
float[] p = pos[variant]; |
|
347 |
return new float[] { p[0],p[1],p[2] }; |
|
359 | 348 |
} |
360 | 349 |
|
361 | 350 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
413 | 402 |
|
414 | 403 |
private float[][] computeVertexEffectCenter(int variant) |
415 | 404 |
{ |
416 |
float A = variant<4 ? 0.5f : 1.0f;
|
|
405 |
float A = variant<4 ? -0.5f : -1.0f;
|
|
417 | 406 |
|
418 | 407 |
float[][] positions = getPositions(); |
419 | 408 |
float[] p = positions[variant]; |
Also available in: Unified diff
Progress with Pyraminx, works now, but there is still some bug in FactoryShape.