snakeprogram3d.display3d
Class ThreeDSnake

java.lang.Object
  extended by snakeprogram3d.display3d.ThreeDSnake

public class ThreeDSnake
extends java.lang.Object

For display snakes in a Volume view of the image.


Constructor Summary
ThreeDSnake(java.awt.GraphicsConfiguration gc)
           
 
Method Summary
 void addSnake(Snake s)
           
 void addSnakeListener(SnakeModel sm)
           
 void deleteSnake(Snake s)
           
 java.awt.Component getComponent()
           
 void refreshImages()
           
 void reset(SnakeBufferedImages sbi)
          Anytime the image might have changed this is called.
 void setSelected(Snake s)
           
 void synchronizeSnakes(MultipleSnakesStore ss)
          Removes all snakes and displays the snakes in ss.
 void updateCursor(double x, double y, double z)
          Moves the 'cursor', which is a sphere.
 void updatePick(com.sun.j3d.utils.picking.PickResult[] results, java.awt.event.MouseEvent evt, boolean clicked)
          Find the coordinates of an intersection for a mouse event and a displayed object.
 void updateSnakePositions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreeDSnake

public ThreeDSnake(java.awt.GraphicsConfiguration gc)
Method Detail

getComponent

public java.awt.Component getComponent()

addSnake

public void addSnake(Snake s)

updateSnakePositions

public void updateSnakePositions()

deleteSnake

public void deleteSnake(Snake s)

synchronizeSnakes

public void synchronizeSnakes(MultipleSnakesStore ss)
Removes all snakes and displays the snakes in ss.

Parameters:
ss - the snakes to be display, should be callled by the snake model.

updateCursor

public void updateCursor(double x,
                         double y,
                         double z)
Moves the 'cursor', which is a sphere.

Parameters:
x - position
y - ''
z - ''

reset

public void reset(SnakeBufferedImages sbi)
Anytime the image might have changed this is called.

Parameters:
sbi - Volume data.

refreshImages

public void refreshImages()

addSnakeListener

public void addSnakeListener(SnakeModel sm)

setSelected

public void setSelected(Snake s)

updatePick

public void updatePick(com.sun.j3d.utils.picking.PickResult[] results,
                       java.awt.event.MouseEvent evt,
                       boolean clicked)
Find the coordinates of an intersection for a mouse event and a displayed object. for the ThreeDSnake the only interactions are with the selected snake.

Parameters:
results - all of the intersections with a mouse event
evt - the event that generated the intersections.
clicked - whether it was generated by a click.