ch.randelshofer.rubik
Class RevengeCubeIdx3D
java.lang.Object
ch.randelshofer.rubik.AbstractCube3D
ch.randelshofer.rubik.AbstractCubeIdx3D
ch.randelshofer.rubik.AbstractRevengeCubeIdx3D
ch.randelshofer.rubik.RevengeCubeIdx3D
- All Implemented Interfaces:
- Cube3D, CubeListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.ChangeListener
public class RevengeCubeIdx3D
- extends AbstractRevengeCubeIdx3D
RevengeCubeIdx3D.
- Version:
- 1.4 2010-08-18 Adds missing back faces to parts.
1.3.1 2010-04-05 Removed debugging code.
1.3 2010-04-04 Added swipe actions to edges adjacent to stickers.
1.2.1 2008-12-19 Fixed UV-Values for the right-down edges.
1.2 2008-08-17 Streamlined with code of class VCube6Idx3D.
1.1.1 2008-01-05 Fixed sticker to part map.
1.1 2007-12-28 Adapted to changes in AbstractCube.
1.0 2006-01-01 Created.
- Author:
- Werner Randelshofer
| 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 |
| Methods inherited from class ch.randelshofer.rubik.AbstractCubeIdx3D |
dispose, getLock, getPart, getPartCount, getScene, isInStartedPlayer, setInStartedPlayer, updateAlphaBeta, updateAttributes, updateCube, updateExplosionFactor, updateExplosionFactor, updatePartFillColor, updatePartOutlineColor, updatePartsFillColor, updatePartsVisibility, updatePartVisibility, updateScaleFactor, updateScaleFactor, updateStickerFillColor, updateStickersFillColor, updateStickersImage, updateStickerVisibility, validateAlphaBeta, validateAttributes, validateCube, validateScaleFactor, validateStickersImage |
| 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 |
RevengeCubeIdx3D
public RevengeCubeIdx3D()
init
public void init()
- Overrides:
init in class AbstractRevengeCubeIdx3D
initCorners
protected void initCorners()
- Specified by:
initCorners in class AbstractRevengeCubeIdx3D
initCornerUVMap
protected void initCornerUVMap()
- Initalizes the Corner UV Map.
0 1 2 3 4 5 6 7 8 9 10 11 12
0 +---+---+---+---+
|4.0| |2.0|
1 +---+ +---+
| |
2 + u +
| |
3 +---+ +---+
ufl|6.0| |0.0|urf
4 +---+---+---+---+---+---+---+---+---+---+---+---+...............+
|4.1| |6.2|6.1| |0.2|0.1| |2.2| .
5 +---+ +---+---+ +---+---+ +---+ .
| | | | .
6 + l + f + r + b .
| | | | .
7 +---+ +---+---+ +---+---+ +---+ .
|5.2| |7.1|7.2| |1.1|1.2| |3.1| .
8 +---+---+---+---+---+---+---+---+---+---+---+---+...............+
dlf|7.0| |1.0|2.1| |4.2| |
9 +---+ +---+---+ +---+ |
| | | |
10 + d + b + <--+
| | |
11 +---+ +---+---+ +---+
|5.0| |3.0|3.2| |5.1|
12 +---+---+---+---+---+---+---+---+
initEdges
protected void initEdges()
- Specified by:
initEdges in class AbstractRevengeCubeIdx3D
initEdgeUVMap
protected void initEdgeUVMap()
- Initializes the Edge UV Map.
0 1 2 3 4 5 6 7 8 9 10 11 12
0 +---+---+---+---+
| |3.1|15 | |
1 +---+---+---+---+
|6.0| |0.0|
2 +---+ u +---+
|18 | |12 |
3 +---+---+---+---+
| |9.1|21 | |
4 +---+---+---+---+---+---*---+---+---+---+---+---+...............+
| |6.1|18 | | |9.0|21 | | |12 |0.1| | '
5 +---+---+---+---+---+---+---+---+---+---+---+---+ '
|19 | |22 |22 | |13 |13 | |16 | '
6 +---+ l +---+---+ f +---+---+ r +---+ b '
|7.0| 10.0|10.1 |1.1|1.0| |4.0| '
7 +---+---+---+---+---+---+---+---+---+---+---+---+ '
| |8.1|20 | | 11.0|23 | | |14 |2.1| | '
8 +---+---+---+---+---+---+---+---+---+---+---+---+...............+
| 11.1|23 | | |15 |3.0| | |
9 +---+---+---+---+---+---+---+---+ |
|20 | |14 |16 | |19 | |
10 +---+ d +---+---+ b +---+ <--+
|8.0| |2.0|4.1| |7.1|
11 +---+---+---+---+---+---+---+---+
| |5.1|17 | | |17 |5.0| |
12 +---+---+---+---+---+---+---+---+
initSides
protected void initSides()
- Specified by:
initSides in class AbstractRevengeCubeIdx3D
initSideUVMap
protected void initSideUVMap()
- Initializes the UV coordinates for the side parts.
0 1 2 3 4 5 6 7 8 9 10 11 12
0 +---+-----------+
| |
1 | +---+ + |
| | 1 | u |
2 | +---+ |
| |
3 | + + |
| |
4 +---------------+---------------+---------------+...............+
| | | | '
5 | + +---+ | + + | + + | '
| | 3 |l | f | r | '
6 | +---+ | +---+ | +---+ | b '
| | | 2 | | | 0 | | '
7 | + + | +---+ + | + +---+ | '
| | | | '
8 +---------------+---+-----------+---------------+...............+
| | | |
9 | + +---+ | +---+ + | |
| | 4 |d | | 5 | b | |
10 | +---+ | +---+ | <--+
| | |
11 | + + | + + |
| | |
12 +---+-----------+---------------+
Whereas each area marked by the + symbols contains side parts with the
following placements:
+---+---+
| 1 2 |
+ +
| 0 3 |
+---+---+
getPartIndexForStickerIndex
public int getPartIndexForStickerIndex(int stickerIndex)
- Specified by:
getPartIndexForStickerIndex in interface Cube3D- Specified by:
getPartIndexForStickerIndex in class AbstractCube3D
getPartFaceIndexForStickerIndex
protected int getPartFaceIndexForStickerIndex(int stickerIndex)
- Specified by:
getPartFaceIndexForStickerIndex in class AbstractCube3D
getStickerIndexForPart
protected int getStickerIndexForPart(int part,
int orientation)
getStickerCount
protected int getStickerCount()
- Specified by:
getStickerCount in class AbstractCube3D
createAttributes
protected CubeAttributes createAttributes()
- Description copied from class:
AbstractCube3D
- Creates cube attributes (e.g. colors, sticker pictures, ...).
- Specified by:
createAttributes in class AbstractCube3D
initActions
protected void initActions(idx3d_Scene scene)
- Specified by:
initActions in class AbstractRevengeCubeIdx3D
setStickerBeveling
public void setStickerBeveling(float newValue)
- Specifies how many pixels are cut off from the stickers image
for each sticker.
- Specified by:
setStickerBeveling in interface Cube3D- Specified by:
setStickerBeveling in class AbstractCubeIdx3D
getKind
public CubeKind getKind()
- Description copied from interface:
Cube3D
- Gets the kind of the cube.