ch.randelshofer.rubik
Class RubiksCuboctahedronIdx3D
java.lang.Object
ch.randelshofer.rubik.AbstractCube3D
ch.randelshofer.rubik.AbstractCubeIdx3D
ch.randelshofer.rubik.AbstractRubiksCubeIdx3D
ch.randelshofer.rubik.RubiksCuboctahedronIdx3D
- All Implemented Interfaces:
- Cube3D, CubeListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.ChangeListener
public class RubiksCuboctahedronIdx3D
- extends AbstractRubiksCubeIdx3D
Geometrical representation of a Rubik's Cuboctahedron in
three dimensions using the Idx3D engine.
- Version:
- 3.1 2010-01-30 Completed color scheme.
3.0 2009-01-02 Added support for twisting the cube by swiping over
its faces.
1.0.1 2007-09-11 Fixed broken stickerToOrientationMap.
1.0 2005-12-26 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 |
RubiksCuboctahedronIdx3D
public RubiksCuboctahedronIdx3D()
getUnitScaleFactor
protected float getUnitScaleFactor()
- Overrides:
getUnitScaleFactor in class AbstractRubiksCubeIdx3D
initCorners
protected void initCorners()
- Specified by:
initCorners in class AbstractRubiksCubeIdx3D
initEdges
protected void initEdges()
- Specified by:
initEdges in class AbstractRubiksCubeIdx3D
initSides
protected void initSides()
- Specified by:
initSides in class AbstractRubiksCubeIdx3D
getPartIndexForStickerIndex
public int getPartIndexForStickerIndex(int stickerIndex)
- Updates the fill color of the stickers.
The sticker Index is interpreted according to this
scheme:
--+--+--
/45|46|47\
+---+--+---+
| 48|49| 50|
+---+--+---+
\51|52|53/
+----------++----------++----------++----------+
\62/63\64/ \66/67\68/ \54/55\56/ \58/59\60/
+----+ +----+ +----+ +----+
\65/ \69/ \57/ \61/
\/ \/ \/ \/
--+---+-- --+---+-- --+---+-- --+---+--
/36| 37|38\ /0 | 1 | 2\ /9 | 10|11\ /27| 28|29\
+---+---+---+---+---+---+---+---+---+---+---+---+
| 39| 40| 41| 3 | 4 | 5 | 12| 13| 14| 30| 31| 32|
+---+---+---+---+---+---+---+---+---+---+---+---+
\42| 43|44/ \6 | 7 | 8/ \15| 16|17/ \33| 34|35/
--+---+-- --+---+-- --+---+-- --+---+--
/\ /\ /\ /\
/78\ /82\ /70\ /74\
+----+ +----+ +----+ +----+
/79/80\81\ /83/84\85\ /71/72\73\ /75/76\77\
+----------++----------++----------++----------+
/18|19|20\
+---+--+---+
| 21|22| 23|
+---+--+---+
\24|25|26/
--+--+--
- Specified by:
getPartIndexForStickerIndex in interface Cube3D- Specified by:
getPartIndexForStickerIndex in class AbstractRubiksCubeIdx3D
getPartFaceIndexForStickerIndex
protected int getPartFaceIndexForStickerIndex(int stickerIndex)
- Specified by:
getPartFaceIndexForStickerIndex in class AbstractRubiksCubeIdx3D
getStickerIndexForPart
protected int getStickerIndexForPart(int part,
int orientation)
- Specified by:
getStickerIndexForPart in class AbstractRubiksCubeIdx3D
getTriangleCountForStickerIndex
protected int getTriangleCountForStickerIndex(int stickerIndex)
getStickerCount
public int getStickerCount()
- Specified by:
getStickerCount in class AbstractRubiksCubeIdx3D
createAttributes
public 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 AbstractCubeIdx3D
setStickerBeveling
public void setStickerBeveling(float newValue)
- 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.