Revision 7289fd6c
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/object/RubikCube.java | ||
---|---|---|
83 | 83 |
super(size, 60, quatCur,quatAcc,texture,mesh,effects,moves, RubikObjectList.CUBE); |
84 | 84 |
} |
85 | 85 |
|
86 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
87 |
// paint the square with upper-right cornder at (left,top) and side length 'side' with texture |
|
88 |
// for face 'face'. |
|
89 |
|
|
90 |
void createFaceTexture(Canvas canvas, Paint paint, int face, int left, int top, int side) |
|
91 |
{ |
|
92 |
final float R = side*0.10f; |
|
93 |
final float M = side*0.05f; |
|
94 |
|
|
95 |
paint.setColor(FACE_COLORS[face]); |
|
96 |
canvas.drawRoundRect( left+M, top+M, left+side-M, top+side-M, R, R, paint); |
|
97 |
} |
|
98 |
|
|
86 | 99 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
87 | 100 |
|
88 | 101 |
Static3D[] getCubitPositions(int size) |
... | ... | |
145 | 158 |
return new VertexEffectSink( new Static1D(strength), center, region ); |
146 | 159 |
} |
147 | 160 |
|
148 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
149 |
// paint only the square with lower-left corner at (face*TEX_H,0) and side length TEX_H |
|
150 |
|
|
151 |
void createFaceTexture(Canvas canvas, Paint paint, int face) |
|
152 |
{ |
|
153 |
final int S = TEXTURE_HEIGHT; |
|
154 |
final int R = TEXTURE_HEIGHT/10; |
|
155 |
final int M = TEXTURE_HEIGHT/20; |
|
156 |
|
|
157 |
paint.setColor(FACE_COLORS[face]); |
|
158 |
canvas.drawRoundRect( (face*S+M), M, (face*S+M) + (S-2*M), M + (S-2*M), R, R, paint); |
|
159 |
} |
|
160 |
|
|
161 | 161 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
162 | 162 |
|
163 | 163 |
MeshBase createCubitMesh(int cubit, int vertices) |
Also available in: Unified diff
Beginnings of support for the 3x3x3 Solver.