|
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.AbstractRubiksCubeIdx3D
ch.randelshofer.rubik.RubiksCubeIdx3D
public class RubiksCubeIdx3D
A 3D model of a Rubik's Cube for the Idx3D rendering engine.
| 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.AbstractRubiksCubeIdx3D |
|---|
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 | |
|---|---|
RubiksCubeIdx3D()
|
|
| Method Summary | |
|---|---|
CubeAttributes |
createAttributes()
Creates cube attributes (e.g. |
CubeKind |
getKind()
Gets the kind of the cube. |
protected int |
getPartFaceIndexForStickerIndex(int stickerIndex)
|
int |
getPartIndexForStickerIndex(int stickerIndex)
Gets the part which holds the indicated sticker. |
protected int |
getStickerCount()
|
protected int |
getStickerIndexForPart(int part,
int orientation)
|
protected void |
init()
|
protected void |
initActions(idx3d_Scene scene)
|
protected void |
initCorners()
|
protected void |
initCornerUVMap()
Initializes the UV Map for the corner parts. |
protected void |
initEdges()
|
protected void |
initEdgeUVMap()
Initializes the UV Map for the edge parts. |
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.AbstractRubiksCubeIdx3D |
|---|
cubeTwisted, getUnitScaleFactor, 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 RubiksCubeIdx3D()
| Method Detail |
|---|
protected void init()
init in class AbstractRubiksCubeIdx3Dpublic void setStickerBeveling(float newValue)
setStickerBeveling in interface Cube3DsetStickerBeveling in class AbstractCubeIdx3Dprotected void initCorners()
initCorners in class AbstractRubiksCubeIdx3Dprotected void initCornerUVMap()
0 1 2 3 4 5 6 7 8 9
0 +---+---+---+
|4.0| |2.0|
1 +---+ +---+
| u |
2 +---+ +---+
|6.0| |0.0|
3 +---+---+---+---+---+---+---+---+---+...........+
|4.1| |6.2|6.1| |0.2|0.1| |2.2| '
4 +---+ +---+---+ +---+---+ +---+ '
| l | f | r | b '
5 +---+ +---+---+ +---+---+ +---+ '
|5.2| |7.1|7.2| |1.1|1.2| |3.1| '
6 +---+---+---+---+---+---+---+---+---+...........+
|7.0| |1.0|2.1| |4.2| |
7 +---+ +---+---+ +---+ |
| d | b | <--+
8 +---+ +---+---+ +---+
|5.0| |3.0|3.2| |5.1|
9 +---+---+---+---+---+---+
protected void initEdges()
initEdges in class AbstractRubiksCubeIdx3Dprotected void initEdgeUVMap()
0 1 2 3 4 5 6 7 8 9
0 +---+---+---+
| |3.1| |
1 +--- --- ---+
|6.0| u |0.0|
2 +--- --- ---+
| |9.1| |
3 +---+---+---+---+---+---+---+---+---+...........+
| |6.1| | |9.0| | |0.1| | '
4 +--- --- ---+--- --- ---+--- --- ---+ '
|7.0| l 10.0|10.1 f |1.1|1.0| r |4.0| b '
5 +--- --- ---+--- --- ---+--- --- ---+ '
| |8.1| | |11.0 | |2.1| | '
6 +---+---+---+---+---+---+---+---+---+...........+
| |11.1 | |3.0| | |
7 +--- --- ---+--- --- ---+ |
|8.0| d |2.0|4.1| b |7.1| <--+
8 +--- --- ---+--- --- ---+
| |5.1| | |5.0| |
9 +---+---+---+---+---+---+
protected void initSides()
initSides in class AbstractRubiksCubeIdx3Dprotected void initSideUVMap()
0 1 2 3 4 5 6 7 8 9
0 +-----------+
| |
1 | +---+ u |
| | 1 | |
2 | +---+ |
| |
3 +-----------+-----------+-----------+...........+
| | | | '
4 | +---+ l | +---+ f | +---+ r | '
| | 3 | | | 2 | | | 0 | | b '
5 | +---+ | +---+ | +---+ | '
| | | | '
6 +-----------+-----------+-----------+...........+
| | | |
7 | +---+ d | +---+ b | |
| | 4 | | | 5 | | <--+
8 | +---+ | +---+ |
| | |
9 +-----------+-----------+
public int getPartIndexForStickerIndex(int stickerIndex)
+---+---+---+
| 9 | 10| 11|
+---+---+---+
| 12| 13| 14|
+---+---+---+
| 15| 16| 17|
+---+---+---+---+---+---+---+---+---+---+---+---+
| 27| 28| 29| 18| 19| 20| 0 | 1 | 2 | 45| 46| 47|
+---+---+---+---+---+---+---+---+---+---+---+---+
| 30| 31| 32| 21| 22| 23| 3 | 4 | 5 | 48| 49| 50|
+---+---+---+---+---+---+---+---+---+---+---+---+
| 33| 34| 35| 24| 25| 26| 6 | 7 | 8 | 51| 52| 53|
+---+---+---+---+---+---+---+---+---+---+---+---+
| 36| 37| 38|
+---+---+---+
| 39| 40| 41|
+---+---+---+
| 42| 43| 44|
+---+---+---+
getPartIndexForStickerIndex in interface Cube3DgetPartIndexForStickerIndex in class AbstractRubiksCubeIdx3Dprotected int getPartFaceIndexForStickerIndex(int stickerIndex)
getPartFaceIndexForStickerIndex in class AbstractRubiksCubeIdx3D
protected int getStickerIndexForPart(int part,
int orientation)
getStickerIndexForPart in class AbstractRubiksCubeIdx3Dprotected int getStickerCount()
getStickerCount in class AbstractRubiksCubeIdx3Dpublic CubeAttributes createAttributes()
AbstractCube3D
createAttributes in class AbstractCube3Dprotected void initActions(idx3d_Scene scene)
initActions 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 | ||||||||