CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.rubik
Class AbstractRubiksCubeGeom3D

java.lang.Object
  extended by ch.randelshofer.rubik.AbstractCube3D
      extended by ch.randelshofer.rubik.AbstractCubeGeom3D
          extended by ch.randelshofer.rubik.AbstractRubiksCubeGeom3D
All Implemented Interfaces:
Cube3D, CubeListener, java.beans.PropertyChangeListener, java.util.EventListener, javax.swing.event.ChangeListener
Direct Known Subclasses:
RubiksBarrelGeom3D, RubiksCubeGeom3D, RubiksCuboctahedronGeom3D, RubiksDiamondGeom3D

public abstract class AbstractRubiksCubeGeom3D
extends AbstractCubeGeom3D

Abstract base class for the geometrical representation of a RubiksCube using the Geom3D engine.

Version:
7.0.1 2009-01-04 Fixed rotation of side parts.
7.0 2008-01-06 Adapted to changes in AbstractCube.
6.1 2007-09-09 Use SplineInterpolator to animat twists.
6.0 2005-03-06 Reworked.
1.3.1 2003-08-04 CubeEvent's always reported a stickerIndex of 0.
1.3 2003-07-17 Method computeTransformation() must take orientation changes of the center part into account.
1.2.1 2002-12-27 Animations must not stop in the middle.
1.2 2002-06-29 RubiksCube replaced by RubiksCubeCore.
1.1.3 2002-05-18 Class EventDispatcher replaced by RunnableDispatcher. Class EventWorker replaced by RunnableWorker.
1.1.2 2002-02-07 Method FaceAction.actionPerformed mustn't call getPartFace() when the orientation attribute is -1.
1.1.1 2001-11-11 ColorModel3D was not properly initialized.
1.1 2001-09-26 Uses now the Arxon Color scheme. Edge parts are now correctly flipped.
1.0 2001-08-04 Objects are now cloneable.
0.5.1 2001-06-25 Adapted for JDK 1.3.
0.5 2000-03-04
Author:
Werner Randelshofer, Hausmatt 10, CH-6405 Immensee

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.randelshofer.rubik.AbstractCube3D
AbstractCube3D.PartAction, AbstractCube3D.SwipeAction
 
Field Summary
static double[][] CORNER_EXPLODE_TRANSLATION
           
static double[][] EDGE_EXPLODE_TRANSLATION
           
static double[][] SIDE_EXPLODE_TRANSLATION
           
 
Fields inherited from class ch.randelshofer.rubik.AbstractCubeGeom3D
centerCount, centerOffset, cornerCount, cornerOffset, edgeCount, edgeOffset, HALF_PI, identityTransforms, isInStartedPlayer, mode, partCount, PARTS_MODE, PI, scene, shapes, sideCount, sideOffset, transforms, TWIST_MODE
 
Fields inherited from class ch.randelshofer.rubik.AbstractCube3D
attributes, changeEvent, dispatcher, isAnimated, layerCount, listenerList
 
Constructor Summary
AbstractRubiksCubeGeom3D()
           
 
Method Summary
protected  void computeTransformation()
           
protected  Cube createCube()
           
 void cubeTwisted(CubeEvent evt)
           
protected  void initCenter()
           
protected  void initSides()
           
protected  void initTransforms()
           
 
Methods inherited from class ch.randelshofer.rubik.AbstractCubeGeom3D
getPart, getPartCount, getScene, init, initActions, initCorners, initEdges, isInStartedPlayer, setInStartedPlayer, setMode, setStickerBeveling, updateAlphaBeta, updateAttributes, updateCube, updateExplosionFactor, updatePartsFillColor, updatePartsOutlineColor, updatePartsVisibility, updatePartVisibility, updateScaleFactor, updateStickersFillColor, updateStickersImage, updateStickerVisibility, validateTwist
 
Methods inherited from class ch.randelshofer.rubik.AbstractCube3D
addChangeListener, addCube3DListener, createAttributes, cubeChanged, dispatch, dispose, fireActionPerformed, fireMouseEntered, fireMouseExited, fireMousePressed, fireMouseReleased, fireStateChanged, getAnimator, getAttributes, getCube, getDispatcher, getLock, getPartFaceIndexForStickerIndex, getPartIndexForStickerIndex, getStickerCount, 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
 
Methods inherited from interface ch.randelshofer.rubik.Cube3D
getKind
 

Field Detail

CORNER_EXPLODE_TRANSLATION

public static final double[][] CORNER_EXPLODE_TRANSLATION

EDGE_EXPLODE_TRANSLATION

public static final double[][] EDGE_EXPLODE_TRANSLATION

SIDE_EXPLODE_TRANSLATION

public static final double[][] SIDE_EXPLODE_TRANSLATION
Constructor Detail

AbstractRubiksCubeGeom3D

public AbstractRubiksCubeGeom3D()
Method Detail

computeTransformation

protected void computeTransformation()
Specified by:
computeTransformation in class AbstractCubeGeom3D

initSides

protected void initSides()
Specified by:
initSides in class AbstractCubeGeom3D

initCenter

protected void initCenter()
Specified by:
initCenter in class AbstractCubeGeom3D

initTransforms

protected void initTransforms()
Specified by:
initTransforms in class AbstractCubeGeom3D

createCube

protected Cube createCube()
Specified by:
createCube in class AbstractCubeGeom3D

cubeTwisted

public void cubeTwisted(CubeEvent evt)
Specified by:
cubeTwisted in interface CubeListener
Overrides:
cubeTwisted in class AbstractCube3D

(c) Werner Randelshofer.
All rights reserved.