net.pacbell.jfai.toh.ui
Class DiskView3D

java.lang.Object
  extended by net.pacbell.jfai.toh.ui.DiskView3D

public class DiskView3D
extends Object

A visual 3D representation of a disk.

Author:
Jürgen Failenschmid

Constructor Summary
DiskView3D(int size, int numberOfDisks, float radius, float height, BranchGroup animationGroup)
          Creates an instance with the given arguments.
 
Method Summary
 void disappear()
          Removes the visual from the scene.
 BranchGroup getGroup()
          Gets the branch group.
 Point3f getPosition()
          Answers the position.
 TransformGroup getTransformGroup()
          Gets the transform group.
 void setPosition(Point3f newPosition)
          Sets the position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiskView3D

public DiskView3D(int size,
                  int numberOfDisks,
                  float radius,
                  float height,
                  BranchGroup animationGroup)
Creates an instance with the given arguments.

Parameters:
size - The disk size. See Disk.getSize()
numberOfDisks - the number of disks of the puzzle
radius - the radius of the disk
height - the height of the disk
animationGroup - the BranchGroup containing the animation behavior
Method Detail

disappear

public void disappear()
Removes the visual from the scene.


getGroup

public BranchGroup getGroup()
Gets the branch group.

Returns:
the BranchGroup

getPosition

public Point3f getPosition()
Answers the position.

Returns:
the absolute coordinates of the disk's center

getTransformGroup

public TransformGroup getTransformGroup()
Gets the transform group.

Returns:
the TransformGroup

setPosition

public void setPosition(Point3f newPosition)
Sets the position.

Parameters:
newPosition - the absolute coordinates of the disk's center