|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnakeprogram3d.display3d.InteractiveView
public class InteractiveView
Shows 3 perpendicular planes, that can be clicked on during certain times.
Constructor Summary | |
---|---|
InteractiveView(java.awt.GraphicsConfiguration gc)
Interactive view displays 3 perpendicular planes used for interacting with the 3d scene. |
Method Summary | |
---|---|
void |
addMarker(java.lang.String name)
Add a marker with a name |
void |
addSnake(Snake s)
Add a Snake by creating a poly linea polyline that is backed by the added snake. |
void |
addSnakeListener(SnakeModel sm)
This is how the 3D clicks are transfered to the snake model. |
void |
clearMarkers()
Remove all markers |
javax.media.j3d.TexCoordGeneration |
createTexCoordinteGeneration(float x,
float y,
float z)
Uses the vectors x,y,z to scale the volume texture to the proper coordinates. |
void |
deleteSnake(Snake s)
deletes the chosen snake by removing it from the scene and from the list of stored snakes |
void |
drawRawSnake(java.util.ArrayList<double[]> raw)
Snakes are stored as an array list of double[] when they are being initialized. |
void |
followCursor(double x,
double y,
double z)
During initialization this follows the cursor with a polyline |
java.awt.Component |
getComponent()
Gets the component that this is being drawn on.] |
void |
moveDown()
|
void |
moveUp()
|
void |
placeMarker(java.lang.String name,
double[] pt)
move marker to the position pt |
void |
refreshImages()
Refreshes the texture being displayed w/out changing the geometry |
void |
reset(SnakeBufferedImages sbi)
Resets the current display, clears all snakes, planes and bounding boxes resets the scale, creates new planes and bounding boxes then applies the threed texture |
void |
setInitializing(boolean v)
While initializing a line is drawn to the cursor. |
void |
setSelected(Snake s)
There is a selected snake, it is red and clickable. |
void |
synchronizeSnakes(MultipleSnakesStore ss)
Removes all old snakes and adds any snakes that need to be displayed in this frame. |
void |
updateCursor(double x,
double y,
double z)
Recieves a coordinate in image space and coverts it to the scene space,moves the cursor to that location. |
void |
updateDisplay(int cur)
Updates the XY plane displayed |
void |
updatePick(com.sun.j3d.utils.picking.PickResult[] results,
java.awt.event.MouseEvent evt,
boolean clicked)
Use the PickResults to find the point on the plane that the pick result occured over. |
void |
updateSnakePositions()
The polylines are backed by a snake but their geometry is based on a different object so they need to be updated after the snake deforms. |
void |
updateYZPosition()
Updates the position of the yz plane according to the current index. |
void |
updateZXPosition()
Updates the position of the zx plane according to the current index. |
void |
wipeDown()
|
void |
wipeUp()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InteractiveView(java.awt.GraphicsConfiguration gc)
gc
- used for getting the best graphics configuration.Method Detail |
---|
public java.awt.Component getComponent()
public void addSnake(Snake s)
s
- snake that will be drawn on 3d section viewpublic void updateSnakePositions()
public void deleteSnake(Snake s)
s
- the snake that will be removedpublic void updateCursor(double x, double y, double z)
x
- image or 'real' space coordinate.y
- image or 'real' space coordinate.z
- image or 'real' space coordinate.public void followCursor(double x, double y, double z)
x
- coordinatey
- coordinatez
- coordinatepublic void updatePick(com.sun.j3d.utils.picking.PickResult[] results, java.awt.event.MouseEvent evt, boolean clicked)
results
- sorted list of PickResultsevt
- the moust event that generated the pickclicked
- if it was a clickpublic void reset(SnakeBufferedImages sbi)
sbi
- contains the dimensions and the volume texturepublic javax.media.j3d.TexCoordGeneration createTexCoordinteGeneration(float x, float y, float z)
x
- coordinate scaled to principle axisy
- coordinate scaled to principle axisz
- coordinate scaled to principle axis
public void updateDisplay(int cur)
cur
- checks if this index is in range, cur is in reference to
z-slices so its index begins at 1.public void moveUp()
public void moveDown()
public void updateYZPosition()
public void wipeDown()
public void wipeUp()
public void updateZXPosition()
public void refreshImages()
public void synchronizeSnakes(MultipleSnakesStore ss)
ss
- contains snakes.public void addSnakeListener(SnakeModel sm)
sm
- runs the show.public void drawRawSnake(java.util.ArrayList<double[]> raw)
raw
- coordinates representing the snake being initialized.public void addMarker(java.lang.String name)
name
- of the marker for further accesspublic void placeMarker(java.lang.String name, double[] pt)
name
- name of the marker being movedpt
- position (in image coordinates) of where to put the marker.public void clearMarkers()
public void setSelected(Snake s)
s
- public void setInitializing(boolean v)
v
- whether or not the snake is actually initializing.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |