|
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.AbstractCubeIdx3D
public abstract class AbstractCubeIdx3D
Abstract base class for the geometrical representation of a Cube
using the Idx3D engine.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
AbstractCube3D.PartAction, AbstractCube3D.SwipeAction |
| Field Summary | |
|---|---|
protected idx3d_Group |
alphaBetaTransform
|
protected java.awt.Image |
cachedStickersImage
|
protected int |
centerCount
|
protected int |
centerOffset
|
protected int |
cornerCount
|
protected int |
cornerOffset
|
protected int |
edgeCount
|
protected int |
edgeOffset
|
protected float |
explosion
|
protected float |
explosionShift
|
protected idx3d_Group[] |
explosionTransforms
Holds the explosionTransforms of the parts in the sequence: corners, edges, sides and center. |
protected static float |
HALF_PI
|
protected idx3d_Matrix[] |
identityNormalMatrix
|
protected idx3d_Matrix[] |
identityVertexMatrix
Holds the identity locationTransforms of the parts. |
protected boolean |
isInStartedPlayer
|
protected idx3d_Group[] |
locationTransforms
Holds the locationTransforms of the parts in the sequence: corners, edges, sides and center. |
protected int |
partCount
|
protected idx3d_Object[] |
parts
Holds the parts in the sequence: corners, edges, sides and center. |
protected float |
PI
|
protected idx3d_Group |
scaleTransform
|
protected idx3d_Scene |
scene
|
protected static idx3d_Lightmap |
sharedLightmap
|
protected int |
sideCount
|
protected int |
sideOffset
|
protected idx3d_Texture |
stickersTexture
|
| Fields inherited from class ch.randelshofer.rubik.AbstractCube3D |
|---|
attributes, changeEvent, dispatcher, isAnimated, layerCount, listenerList |
| Constructor Summary | |
|---|---|
AbstractCubeIdx3D(int layerCount,
int cornerCount,
int edgeCount,
int sideCount,
int centerCount)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
dispose()
Frees resources used by the 3D cube. |
java.lang.Object |
getLock()
Returns the lock object used for synchronizing model and view changes. |
protected idx3d_Object |
getPart(int partIndex)
|
int |
getPartCount()
|
java.lang.Object |
getScene()
Returns the 3D scene of the cube. |
protected float |
getUnitScaleFactor()
|
protected abstract void |
initActions(idx3d_Scene scene)
|
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. |
abstract void |
setStickerBeveling(float newValue)
|
protected void |
updateAlphaBeta()
|
protected void |
updateAttributes()
|
protected void |
updateCube()
|
protected void |
updateExplosionFactor()
|
protected void |
updateExplosionFactor(float factor)
|
protected void |
updatePartFillColor(int index,
java.awt.Color c)
Updates the fill color of a part. |
protected void |
updatePartOutlineColor(int index,
java.awt.Color c)
|
protected void |
updatePartsFillColor()
Updates the fill color of the parts. |
protected void |
updatePartsVisibility()
Updates the visible state of the parts. |
protected void |
updatePartVisibility(int index,
float alpha)
Updates the visibility of a part. |
protected void |
updateScaleFactor()
|
protected void |
updateScaleFactor(float factor)
|
protected void |
updateStickerFillColor(int index,
java.awt.Color c)
|
protected void |
updateStickersFillColor()
Updates the stickers color of the parts. |
protected void |
updateStickersImage()
Updates the sticker imagery. |
protected void |
updateStickerVisibility(int index,
float alpha)
Updates the visibility of a sticker. |
protected void |
validateAlphaBeta()
|
protected void |
validateAttributes()
|
protected void |
validateCube()
|
protected void |
validateScaleFactor()
|
protected void |
validateStickersImage()
|
protected abstract 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 idx3d_Lightmap sharedLightmap
protected idx3d_Scene scene
protected idx3d_Group alphaBetaTransform
protected idx3d_Group scaleTransform
protected java.awt.Image cachedStickersImage
protected idx3d_Texture stickersTexture
protected static final float HALF_PI
protected final float PI
protected float explosionShift
protected idx3d_Object[] parts
protected idx3d_Matrix[] identityVertexMatrix
protected idx3d_Matrix[] identityNormalMatrix
protected idx3d_Group[] locationTransforms
protected idx3d_Group[] explosionTransforms
protected float explosion
protected boolean isInStartedPlayer
| Constructor Detail |
|---|
public AbstractCubeIdx3D(int layerCount,
int cornerCount,
int edgeCount,
int sideCount,
int centerCount)
| Method Detail |
|---|
public java.lang.Object getScene()
AbstractCube3D
getScene in interface Cube3DgetScene in class AbstractCube3Dpublic java.lang.Object getLock()
AbstractCube3D
getLock in interface Cube3DgetLock in class AbstractCube3Dpublic int getPartCount()
protected abstract void initActions(idx3d_Scene scene)
protected void updateAttributes()
updateAttributes in class AbstractCube3Dprotected void validateAttributes()
protected void updatePartFillColor(int index,
java.awt.Color c)
protected void updatePartOutlineColor(int index,
java.awt.Color c)
protected void updateStickerFillColor(int index,
java.awt.Color c)
protected void updateStickerVisibility(int index,
float alpha)
updateStickerVisibility in class AbstractCube3Dprotected void validateScaleFactor()
protected void updateScaleFactor()
protected float getUnitScaleFactor()
protected void updateScaleFactor(float factor)
updateScaleFactor in class AbstractCube3Dprotected void updateExplosionFactor()
protected void updateExplosionFactor(float factor)
updateExplosionFactor in class AbstractCube3Dprotected void updateAlphaBeta()
updateAlphaBeta in class AbstractCube3Dprotected void validateAlphaBeta()
protected idx3d_Object getPart(int partIndex)
protected void updateStickersImage()
AbstractCube3D
updateStickersImage in class AbstractCube3Dprotected void validateStickersImage()
public void dispose()
dispose in interface Cube3Ddispose in class AbstractCube3Dprotected void updateCube()
updateCube in class AbstractCube3Dprotected void validateCube()
protected abstract void validateTwist(int[] partIndices,
int[] locations,
int[] orientations,
int length,
int axis,
int angle,
float alpha)
protected void updatePartVisibility(int index,
float alpha)
updatePartVisibility in class AbstractCube3Dprotected final void updatePartsVisibility()
protected final void updatePartsFillColor()
protected final void updateStickersFillColor()
public abstract 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 | ||||||||