|
CubeTwister 2.0alpha142 2012-02-11 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectch.randelshofer.rubik.AbstractCube3D
ch.randelshofer.rubik.AbstractCubeIdx3D
ch.randelshofer.rubik.AbstractCube6Idx3D
ch.randelshofer.rubik.VCube6Idx3D
public class VCube6Idx3D
Geometrical representation of Cube6 as a V-Cube 6 in three dimensions.
In a V-Cube 6, the edge parts are rectangular, and the corner parts are bigger than the side parts.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
AbstractCube3D.PartAction, AbstractCube3D.SwipeAction |
| Field Summary |
|---|
| Fields inherited from class ch.randelshofer.rubik.AbstractCube6Idx3D |
|---|
BEVEL_LENGTH, PART_LENGTH |
| Fields inherited from class ch.randelshofer.rubik.AbstractCubeIdx3D |
|---|
alphaBetaTransform, cachedStickersImage, centerCount, centerOffset, cornerCount, cornerOffset, edgeCount, edgeOffset, explosion, explosionShift, explosionTransforms, HALF_PI, identityNormalMatrix, identityVertexMatrix, isInStartedPlayer, locationTransforms, partCount, parts, PI, scaleTransform, scene, sharedLightmap, sideCount, sideOffset, stickersTexture |
| Fields inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
attributes, changeEvent, dispatcher, isAnimated, layerCount, listenerList |
| Constructor Summary | |
|---|---|
VCube6Idx3D()
|
|
| Method Summary | |
|---|---|
protected CubeAttributes |
createAttributes()
Creates cube attributes (e.g. |
CubeKind |
getKind()
Gets the kind of the cube. |
protected int |
getPartFaceIndexForStickerIndex(int stickerIndex)
|
int |
getPartIndexForStickerIndex(int stickerIndex)
|
protected int |
getStickerCount()
|
protected int |
getStickerIndexForPart(int part,
int orientation)
|
protected float |
getUnitScaleFactor()
|
void |
init()
|
protected void |
initActions(idx3d_Scene scene)
|
protected void |
initCorners()
|
protected void |
initCornerUVMap()
Initalizes the Corner UV Map. |
protected void |
initEdges()
|
protected void |
initEdgeUVMap()
Initializes the Edge UV Map. |
protected void |
initSides()
|
protected void |
initSideUVMap()
Initializes the UV coordinates for the side parts. |
void |
setStickerBeveling(float newValue)
Specifies how many pixels are cut off from the stickers image for each sticker. |
| Methods inherited from class ch.randelshofer.rubik.AbstractCube6Idx3D |
|---|
cubeTwisted, initCenter, initTransforms, validateTwist |
| Methods inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
addChangeListener, addCube3DListener, cubeChanged, dispatch, fireActionPerformed, fireMouseEntered, fireMouseExited, fireMousePressed, fireMouseReleased, fireStateChanged, getAnimator, getAttributes, getCube, getDispatcher, isAdjusting, isAnimated, isAnimating, isShowGhostParts, propertyChange, removeChangeListener, removeCube3DListener, setAnimated, setAnimator, setAttributes, setCube, setDispatcher, setLock, setShowGhostParts, stateChanged, stopAnimation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VCube6Idx3D()
| Method Detail |
|---|
protected float getUnitScaleFactor()
getUnitScaleFactor in class AbstractCube6Idx3Dpublic void init()
init in class AbstractCube6Idx3Dprotected void initCorners()
initCorners in class AbstractCube6Idx3Dprotected void initCornerUVMap()
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
0 +---+---+---+---+---+---+
|4.0| |2.0|
1 +---+ +---+
| |
2 + +
| |
3 + u +
| |
4 + +
| |
5 +---+ +---+
ufl|6.0| |0.0|urf
6 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+.......................+
|4.1| |6.2|6.1| |0.2|0.1| |2.2| .
7 +---+ +---+---+ +---+---+ +---+ .
| | | | .
8 + + + + .
| | | | .
9 + l + f + r + b .
| | | | .
10 + + + + .
| | | | .
11 +---+ +---+---+ +---+---+ +---+ .
|5.2| |7.1|7.2| |1.1|1.2| |3.1| .
12 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+.......................+
dlf|7.0| |1.0|2.1| |4.2| |
13 +---+ +---+---+ +---+ |
| | | |
14 + + + |
| | | |
15 + d + b + <--+
| | |
16 + + +
| | |
17 +---+ +---+---+ +---+
|5.0| |3.0|3.2| |5.1|
18 +---+---+---+---+---+---+---+---+---+---+---+---+
protected void initEdges()
initEdges in class AbstractCube6Idx3Dprotected void initEdgeUVMap()
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
0 +---+---+---+---+---+---+
| | |3.1|15 | | |
1 +---+---+---+---+---+---+
| | | |
2 +---+ +---+
|6.0| |0.0|
3 +---+ u +---+
|18 | |12 |
4 +---+ +---+
| | | |
5 +---+---+---+---+---+---+
| | |9.1|21 | | |
6 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+.......................+
| | |6.1|18 | | | | |9.0|21 | | | | |12 |0.1| | | '
7 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ '
| | | | | | | | | | '
8 +---+ +---+---+ +---+---+ +---+ '
|19 | |22 |22 | |13 |13 | |16 | '
9 +---+ l +---+---+ f +---+---+ r +---+ b '
|7.0| 10.0|10.1 |1.1|1.0| |4.0| '
10 +---+ +---+---+ +---+---+ +---+ '
| | | | | | | | | | '
11 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ '
| | |8.1|20 | | | | 11.0|23 | | | | |14 |2.1| | | '
12 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+.......................+
| | 11.1|23 | | | | |15 |3.0| | | |
13 +---+---+---+---+---+---+---+---+---+---+---+---+ |
| | | | | | | |
14 +---+ +---+---+ +---+ |
|20 | |14 |16 | |19 | |
15 +---+ d +---+---+ b +---+ <--+
|8.0| |2.0|4.1| |7.1|
16 +---+ +---+---+ +---+
| | | | | | |
17 +---+---+---+---+---+---+---+---+---+---+---+---+
| | |5.1|17 | | | | |17 |5.0| | |
18 +---+---+---+---+---+---+---+---+---+---+---+---+
protected void initSides()
initSides in class AbstractCube6Idx3Dprotected void initSideUVMap()
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
0 +-------+---------------+
| |
1 + + + |
| |
2 + + +---+ |
| | 1 | u |
3 | +---+ |
| |
4 | |
| |
5 | + + |
| |
6 +-----------------------+-------+---------------+---+---+---+---+---+---+.......................+
| | | | '
7 | + + | + + | + + | '
| | | | '
8 | +---+ | | | '
| | 3 |l | f | r | '
9 | +---+ | +---+ | +---+ | b '
| | | 2 | | | 0 | | '
10 | | +---+ | +---+ | '
| | | | '
11 | + + | + + | + + | '
| | | | '
12 +-----------------------+-------+---------------+---+---+---+---+---+---+.......................+
| | | |
13 | + + | + + | |
| | | |
14 + +---+ + +---+ | |
| | 4 |d | | 5 | b | |
15 + +---+ + +---+ | <--+
| | |
16 | | |
| | |
17 | + + | + + |
| | |
18 +-------+---------------+-----------------------+
Whereas each area marked by the + symbols contains side parts with the
following placements:
+---+---+---+---+
| 5 14 10 6 |
+ +
| 9 1 2 15 |
+ +
|13 0 3 11 |
+ +
| 4 8 12 7 |
+---+---+---+---+
public int getPartIndexForStickerIndex(int stickerIndex)
getPartIndexForStickerIndex in interface Cube3DgetPartIndexForStickerIndex in class AbstractCube3Dprotected int getPartFaceIndexForStickerIndex(int stickerIndex)
getPartFaceIndexForStickerIndex in class AbstractCube3D
protected int getStickerIndexForPart(int part,
int orientation)
protected int getStickerCount()
getStickerCount in class AbstractCube3Dprotected CubeAttributes createAttributes()
AbstractCube3D
createAttributes in class AbstractCube3Dprotected void initActions(idx3d_Scene scene)
initActions in class AbstractCube6Idx3Dpublic void setStickerBeveling(float newValue)
setStickerBeveling in interface Cube3DsetStickerBeveling in class AbstractCubeIdx3Dpublic CubeKind getKind()
Cube3D
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||