CubeTwister 2.0alpha142 2012-02-11

ch.randelshofer.rubik
Class AbstractProfessorCubeGeom3D

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

public abstract class AbstractProfessorCubeGeom3D
extends AbstractCubeGeom3D

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

Version:
7.1.1 2009-01-04 Method computeTransformation did not properly orient side parts.
7.1 2008-08-17 Streamlined with code of class AbstractVCube7Geom3D.
7.0 2008-01-06 W. Randelshofer Adapted to changes in AbstractCube.
6.1 2007-09-09 W. Randelshofer Use SplineInterpolator for animation.
6.0 2005-03-06 W. Randelshofer reworked., 5.2 2004-08-22 W. Randelshofer: Action events receive now MouseEvents instead of plain java.awt.Event objects from the Canvas3D. Animate twists with more steps. Reduce number of faces if possible to increase drawing performance. Changed dimensions to match Rubik's Professor Cube by Oddzon: 7 x 7 x 7 cm.
5.1 2004-08-03 W. Randelshofer: Upgraded from Java 1.0 compliance to Java 1.1 compliance.
5.0 2004-07-10 M. Pirzer: Cube changed from a standard 3x3x3 Rubik's Cube to a 5x5x5 Rubik's Professor Cube.
0.5 2000-03-04 W. Randelshofer: Created.
Author:
Werner Randelshofer, Markus Pirzer

Nested Class Summary
 
Nested classes/interfaces inherited from class ch.randelshofer.rubik.AbstractCube3D
AbstractCube3D.PartAction, AbstractCube3D.SwipeAction
 
Field Summary
protected static float BEVEL_LENGTH
          The beveled edge of a cube part has a length of 1 mm.
static double[][] EXPLODE_TRANSLATIONS
           
protected static float PART_LENGTH
          A cube part has a side length of 13 mm.
 
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
AbstractProfessorCubeGeom3D()
           
 
Method Summary
protected  void computeTransformation()
           
protected  Cube createCube()
           
 void cubeTwisted(CubeEvent evt)
           
protected  float getUnitScaleFactor()
           
protected  void initTransforms()
           
 
Methods inherited from class ch.randelshofer.rubik.AbstractCubeGeom3D
getPart, getPartCount, getScene, init, initActions, initCenter, initCorners, initEdges, initSides, 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

PART_LENGTH

protected static final float PART_LENGTH
A cube part has a side length of 13 mm.

See Also:
Constant Field Values

BEVEL_LENGTH

protected static final float BEVEL_LENGTH
The beveled edge of a cube part has a length of 1 mm.

See Also:
Constant Field Values

EXPLODE_TRANSLATIONS

public static final double[][] EXPLODE_TRANSLATIONS
Constructor Detail

AbstractProfessorCubeGeom3D

public AbstractProfessorCubeGeom3D()
Method Detail

initTransforms

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

getUnitScaleFactor

protected float getUnitScaleFactor()

computeTransformation

protected void computeTransformation()
Specified by:
computeTransformation 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.