|
CubeTwister 2.0alpha141 2011-10-13 | ||||||||
| 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.AbstractCubeGeom3D
public abstract class AbstractCubeGeom3D
Abstract base class for the geometrical representation of a Cube
using the Geom3D engine.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
AbstractCube3D.PartAction, AbstractCube3D.SwipeAction |
| Field Summary | |
|---|---|
protected int |
centerCount
|
protected int |
centerOffset
|
protected int |
cornerCount
|
protected int |
cornerOffset
|
protected int |
edgeCount
|
protected int |
edgeOffset
|
protected static double |
HALF_PI
|
protected Transform3D[] |
identityTransforms
|
protected boolean |
isInStartedPlayer
|
protected int |
mode
|
protected int |
partCount
|
static int |
PARTS_MODE
|
protected double |
PI
|
protected Scene3D |
scene
|
protected Shape3D[] |
shapes
|
protected int |
sideCount
|
protected int |
sideOffset
|
protected TransformNode3D[] |
transforms
|
static int |
TWIST_MODE
|
| Fields inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
attributes, changeEvent, dispatcher, isAnimated, layerCount, listenerList |
| Constructor Summary | |
|---|---|
AbstractCubeGeom3D(int layerCount,
int cornerCount,
int edgeCount,
int sideCount,
int centerCount)
Creates a new instance. |
|
| Method Summary | |
|---|---|
protected abstract void |
computeTransformation()
|
protected abstract Cube |
createCube()
|
protected Shape3D |
getPart(int partIndex)
|
int |
getPartCount()
|
java.lang.Object |
getScene()
Returns the 3D scene of the cube. |
protected void |
init()
|
protected abstract void |
initActions()
|
protected abstract void |
initCenter()
|
protected abstract void |
initCorners()
|
protected abstract void |
initEdges()
|
protected abstract void |
initSides()
|
protected abstract void |
initTransforms()
|
boolean |
isInStartedPlayer()
Returns true if the cube is in a started script player. |
void |
setInStartedPlayer(boolean newValue)
This is set to true by the script player if it is started. |
void |
setMode(int mode)
|
void |
setStickerBeveling(float newValue)
|
protected void |
updateAlphaBeta()
|
void |
updateAttributes()
|
void |
updateCube()
|
protected void |
updateExplosionFactor(float factor)
|
protected abstract void |
updatePartsFillColor()
Updates the fill color of the parts. |
protected abstract void |
updatePartsOutlineColor()
Updates the outline color of the parts. |
protected void |
updatePartsVisibility()
Updates the visible state of the parts. |
protected void |
updatePartVisibility(int index,
float alpha)
Updates the fill color of a part. |
protected void |
updateScaleFactor(float factor)
|
void |
updateStickersFillColor()
Updates the fill color of the stickers. |
protected void |
updateStickersImage()
Updates the sticker imagery. |
protected void |
updateStickerVisibility(int index,
float alpha)
|
protected void |
validateTwist(int[] partIndices,
int[] locations,
int[] orientations,
int length,
int axis,
int angle,
float alpha)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ch.randelshofer.rubik.Cube3D |
|---|
getKind |
| Field Detail |
|---|
protected int cornerCount
protected int edgeCount
protected int sideCount
protected int centerCount
protected int partCount
protected int cornerOffset
protected int edgeOffset
protected int sideOffset
protected int centerOffset
protected static final double HALF_PI
protected final double PI
protected Shape3D[] shapes
protected Transform3D[] identityTransforms
protected TransformNode3D[] transforms
protected Scene3D scene
protected boolean isInStartedPlayer
public static final int TWIST_MODE
public static final int PARTS_MODE
protected int mode
| Constructor Detail |
|---|
public AbstractCubeGeom3D(int layerCount,
int cornerCount,
int edgeCount,
int sideCount,
int centerCount)
| Method Detail |
|---|
protected final void init()
protected abstract Cube createCube()
protected abstract void initCorners()
protected abstract void initEdges()
protected abstract void initSides()
protected abstract void initCenter()
protected abstract void initTransforms()
protected abstract void initActions()
public java.lang.Object getScene()
AbstractCube3D
getScene in interface Cube3DgetScene in class AbstractCube3Dprotected Shape3D getPart(int partIndex)
public int getPartCount()
public void updateCube()
updateCube in class AbstractCube3Dprotected abstract void computeTransformation()
protected void updateExplosionFactor(float factor)
updateExplosionFactor in class AbstractCube3Dprotected void updateScaleFactor(float factor)
updateScaleFactor in class AbstractCube3Dpublic final void updateAttributes()
updateAttributes in class AbstractCube3Dprotected abstract void updatePartsFillColor()
protected abstract void updatePartsOutlineColor()
public final void updateStickersFillColor()
protected final void updatePartsVisibility()
protected final void updatePartVisibility(int index,
float alpha)
updatePartVisibility in class AbstractCube3D
protected final void updateStickerVisibility(int index,
float alpha)
updateStickerVisibility in class AbstractCube3Dprotected final void updateStickersImage()
AbstractCube3D
updateStickersImage in class AbstractCube3Dpublic final void setMode(int mode)
protected void updateAlphaBeta()
updateAlphaBeta in class AbstractCube3D
protected void validateTwist(int[] partIndices,
int[] locations,
int[] orientations,
int length,
int axis,
int angle,
float alpha)
public void setStickerBeveling(float newValue)
public void setInStartedPlayer(boolean newValue)
Cube3D
public boolean isInStartedPlayer()
Cube3D
|
(c) Werner Randelshofer. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||