Revision 37a25788
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/object/RubikPyraminxMovement.java | ||
---|---|---|
30 | 30 |
|
31 | 31 |
RubikPyraminxMovement() |
32 | 32 |
{ |
33 |
super(4,1); |
|
34 |
} |
|
35 |
|
|
36 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
37 |
|
|
38 |
boolean faceIsVisible(int axis, int lr) |
|
39 |
{ |
|
40 |
return mCamera[axis] < -SQ2*SQ3/12; |
|
41 |
} |
|
42 |
|
|
43 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
44 |
// TODO |
|
45 |
|
|
46 |
void castTouchPointOntoFace(int axis, int lr, float[] output) |
|
47 |
{ |
|
48 |
/* |
|
49 |
float diff = mPoint[axis]-mCamera[axis]; |
|
50 |
float ratio= diff!=0.0f ? ((lr-0.5f)-mCamera[axis])/diff : 0.0f; |
|
51 |
|
|
52 |
output[0] = (mPoint[0]-mCamera[0])*ratio + mCamera[0]; |
|
53 |
output[1] = (mPoint[1]-mCamera[1])*ratio + mCamera[1]; |
|
54 |
output[2] = (mPoint[2]-mCamera[2])*ratio + mCamera[2]; |
|
55 |
*/ |
|
33 |
super(RubikPyraminx.AXIS,1,SQ2*SQ3/12); |
|
56 | 34 |
} |
57 | 35 |
|
58 | 36 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Progress with object Movement.