63 |
63 |
@Override
|
64 |
64 |
public int getInternalColor()
|
65 |
65 |
{
|
66 |
|
return 0xff333333;
|
|
66 |
return 0xff222222;
|
67 |
67 |
}
|
68 |
68 |
|
69 |
69 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
... | ... | |
159 |
159 |
}
|
160 |
160 |
|
161 |
161 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
162 |
|
// TODO
|
163 |
162 |
|
164 |
163 |
public float[][] getCubitPositions(int[] numLayers)
|
165 |
164 |
{
|
... | ... | |
167 |
166 |
{
|
168 |
167 |
mCenters = new float[][]
|
169 |
168 |
{
|
170 |
|
{0,0,0}
|
|
169 |
{ 1.50f, 1.50f, 0.75f},
|
|
170 |
{-0.75f, 1.50f,-1.50f},
|
|
171 |
{ 1.50f,-0.75f,-1.50f},
|
|
172 |
{-1.50f, 0.75f, 1.50f},
|
|
173 |
{ 0.75f,-1.50f, 1.50f},
|
|
174 |
{-1.50f,-1.50f,-0.75f},
|
|
175 |
|
|
176 |
{0.375f, 1.50f,-0.375f},
|
|
177 |
{0.375f,0.375f,-1.50f },
|
|
178 |
{ 1.50f,0.375f,-0.375f},
|
|
179 |
{-0.375f,-0.375f,1.50f},
|
|
180 |
{-0.375f,-1.50f,0.375f},
|
|
181 |
{-1.50f,-0.375f,0.375f},
|
|
182 |
|
|
183 |
{ 0.00f, 1.50f, 1.50f},
|
|
184 |
{-1.50f, 0.00f,-1.50f},
|
|
185 |
{ 1.50f,-1.50f, 0.00f},
|
|
186 |
|
|
187 |
{-1.50f, 1.50f, 0.00f},
|
|
188 |
{ 0.00f,-1.50f,-1.50f},
|
|
189 |
{ 1.50f, 0.00f, 1.50f},
|
|
190 |
|
|
191 |
{ 1.50f, 1.50f,-1.50f},
|
|
192 |
{-1.50f,-1.50f, 1.50f},
|
|
193 |
|
|
194 |
{-0.5f, 1.5f, 0.5f},
|
|
195 |
{ 0.5f,-1.5f,-0.5f},
|
|
196 |
{ 1.5f,-0.5f, 0.5f},
|
|
197 |
{-1.5f, 0.5f,-0.5f},
|
|
198 |
{ 0.5f, 0.5f, 1.5f},
|
|
199 |
{-0.5f,-0.5f,-1.5f},
|
171 |
200 |
};
|
172 |
201 |
}
|
173 |
202 |
|
... | ... | |
175 |
204 |
}
|
176 |
205 |
|
177 |
206 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
178 |
|
// TODO
|
179 |
207 |
|
180 |
208 |
public Static4D getCubitQuats(int cubit, int[] numLayers)
|
181 |
209 |
{
|
182 |
|
return mObjectQuats[0];
|
|
210 |
if( mQuatIndex==null ) mQuatIndex = new int[] {0,22,10,17,14,19, 0,22,10,17,14,19, 0,22,10, 0,22,10, 0,14, 0,14,10,19,17,22 };
|
|
211 |
return mObjectQuats[mQuatIndex[cubit]];
|
183 |
212 |
}
|
184 |
213 |
|
185 |
214 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
... | ... | |
219 |
248 |
{
|
220 |
249 |
float[][] vertices =
|
221 |
250 |
{
|
222 |
|
{-0.50f, 0.00f, -1.25f },
|
223 |
|
{ 1.00f, 0.00f, 0.25f },
|
224 |
|
{-1.00f, 0.00f, -0.25f },
|
225 |
|
{ 0.00f, 0.00f, 0.75f },
|
226 |
|
{ -2*T, -2*T, 1.25f*T},
|
227 |
|
{ 0.00f,-1.00f, -0.25f }
|
|
251 |
{-0.375f , 0.0f, -1.125f },
|
|
252 |
{ 1.125f , 0.0f, 0.375f },
|
|
253 |
{-0.875f , 0.0f, -0.125f },
|
|
254 |
{ 0.125f , 0.0f, 0.875f },
|
|
255 |
{-1.625f*T, -2*T, 1.625f*T},
|
|
256 |
{ 0.125f ,-1.0f, -0.125f }
|
228 |
257 |
};
|
229 |
258 |
|
230 |
259 |
int[][] indices =
|
... | ... | |
337 |
366 |
{
|
338 |
367 |
if( variant==0 )
|
339 |
368 |
{
|
340 |
|
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
|
|
369 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.005f,20,0.2f,0.4f,5,1,0} };
|
341 |
370 |
int[] bandIndices = { 0,0,1,1,1,1,1 };
|
342 |
371 |
float[][] corners = { {0.04f,0.09f} };
|
343 |
372 |
int[] indices = { 0,0,0,0,-1,-1,-1,-1 };
|
... | ... | |
346 |
375 |
}
|
347 |
376 |
else if( variant==1 )
|
348 |
377 |
{
|
349 |
|
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
|
|
378 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.005f,20,0.2f,0.4f,5,1,0} };
|
350 |
379 |
int[] bandIndices = { 0,1,1,1,1 };
|
351 |
380 |
float[][] corners = { {0.04f,0.09f} };
|
352 |
381 |
int[] indices = { 0,0,0,0,-1,-1 };
|
353 |
|
float[][] centers = { {-1.0f/6, -5.0f/12, 1.0f/24 } };
|
|
382 |
float[][] centers = { { -5.0f/24, -5.0f/6, 5.0f/24} };
|
354 |
383 |
return new ObjectFaceShape(bands,bandIndices,corners,indices,centers,indices,null);
|
355 |
384 |
}
|
356 |
385 |
else if( variant==2 )
|
357 |
386 |
{
|
358 |
|
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
|
|
387 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.005f,20,0.2f,0.4f,5,1,0} };
|
359 |
388 |
int[] bandIndices = { 0,0,1,1,1,1 };
|
360 |
389 |
float[][] corners = { {0.04f,0.09f} };
|
361 |
390 |
int[] indices = { 0,0,0,0,-1,-1 };
|
... | ... | |
364 |
393 |
}
|
365 |
394 |
else if( variant==3 )
|
366 |
395 |
{
|
367 |
|
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
|
|
396 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.005f,20,0.2f,0.4f,5,1,0} };
|
368 |
397 |
int[] bandIndices = { 0,0,1,1,1,1 };
|
369 |
398 |
float[][] corners = { {0.04f,0.09f} };
|
370 |
399 |
int[] indices = { 0,0,0,0,-1,-1 };
|
... | ... | |
373 |
402 |
}
|
374 |
403 |
else if( variant==4 )
|
375 |
404 |
{
|
376 |
|
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.01f,20,0.2f,0.4f,5,1,0} };
|
|
405 |
float[][] bands = { {0.025f,20,0.2f,0.4f,5,1,0}, {0.005f,20,0.2f,0.4f,5,1,0} };
|
377 |
406 |
int[] bandIndices = { 0,0,0,1,1,1 };
|
378 |
407 |
float[][] corners = { {0.03f,0.08f} };
|
379 |
408 |
int[] indices = { 0,0,0,0,-1 };
|
... | ... | |
399 |
428 |
}
|
400 |
429 |
|
401 |
430 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
402 |
|
// TODO
|
403 |
431 |
|
404 |
432 |
public int getCubitVariant(int cubit, int[] numLayers)
|
405 |
433 |
{
|
406 |
|
return cubit<12 ? 0 : (cubit<24 ? 1:2);
|
|
434 |
if( cubit<6 ) return 0;
|
|
435 |
if( cubit<12) return 1;
|
|
436 |
if( cubit<15) return 2;
|
|
437 |
if( cubit<18) return 3;
|
|
438 |
if( cubit<20) return 4;
|
|
439 |
|
|
440 |
return 5;
|
407 |
441 |
}
|
408 |
442 |
|
409 |
443 |
///////////////////////////////////////////////////////////////////////////////////////////////////
|
Axis Cube: finish implementation