|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ryanm.glvisualiser.GLVisualiser
com.speckled.specksim.gui.visualiser.SpeckVisualiser
public class SpeckVisualiser
Visualises a field of specks.
| Field Summary |
|---|
| Fields inherited from class com.ryanm.glvisualiser.GLVisualiser |
|---|
camera, capture, lighting |
| Constructor Summary | |
|---|---|
SpeckVisualiser(SpeckSim simulator,
StateSink stateSink,
SimGUI gui)
Standard constructor. |
|
| Method Summary | |
|---|---|
static void |
apply(javax.media.opengl.GL gl,
SpeckPosition orientation)
Applies the supplied orientation to the gl context |
void |
constructObjectTypes(javax.media.opengl.GLAutoDrawable drawable)
Should be overridden by subclasses. |
StateRenderer |
getRenderer(java.lang.String className)
Gets the registered StateRenderer with the specified classname |
int[] |
getSelectedId()
Gets the name stack of the object that was last clicked on |
Configurator |
getSpeckConfigurator()
Gets the SpeckVisualiser-specific options. |
StateSink |
getState()
Gets the state to render |
StatsPlotter |
getStatsPlotter()
Gets the statistics plotter |
static boolean |
loadRenderer(java.lang.String className)
Tries to register a StateRenderer class. |
static boolean |
loadSelectionListener(java.lang.String className)
Attempts to load the GLSelectionListener with the supplied class name |
void |
mouseClicked(java.awt.event.MouseEvent me)
|
void |
mouseDragged(java.awt.event.MouseEvent e)
|
void |
mouseEntered(java.awt.event.MouseEvent e)
|
void |
mouseExited(java.awt.event.MouseEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent e)
|
void |
mousePressed(java.awt.event.MouseEvent e)
|
void |
mouseReleased(java.awt.event.MouseEvent e)
|
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e)
|
void |
render(javax.media.opengl.GLAutoDrawable drawable)
This should be overridden to perform your drawing operations. |
void |
stateRefreshed()
Called when the associated state is refreshed |
void |
update()
Override this method to perform animation and so on |
| Methods inherited from class com.ryanm.glvisualiser.GLVisualiser |
|---|
addFrameListener, addPostConstructionTask, addPostFrameTask, display, displayChanged, enablePicking, getBackgroundColour, getCamera, getCanvas, getCapture, getConfigurator, getFPS, getGLInfo, getLighting, getLineColour, getLineWidth, getLineWidthRange, getNameStackUnderMouse, getTargetFPS, init, isAxesDrawing, isBoundaryDrawing, isEnabled, isLazyMode, isPicking, refresh, removeFrameListener, reshape, setAxesDrawing, setBackgroundColour, setBoundaryDrawing, setEnabled, setLazyMode, setLineColour, setLineWidth, setTargetFPS, setXaxisText, setYaxisText, setZaxisText, start, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SpeckVisualiser(SpeckSim simulator,
StateSink stateSink,
SimGUI gui)
simulator - The simulator to visualisestateSink - The source of state informationgui - The simulator interface| Method Detail |
|---|
public void constructObjectTypes(javax.media.opengl.GLAutoDrawable drawable)
GLVisualiserGLObjects, compile display lists and so on.
constructObjectTypes in class GLVisualiserdrawable - The GLAutoDrawable to usepublic void update()
GLVisualiser
update in class GLVisualiserpublic void render(javax.media.opengl.GLAutoDrawable drawable)
GLVisualiser
render in class GLVisualiserdrawable - The OpenGL context, should you want to do any
freelance drawing.public Configurator getSpeckConfigurator()
SpeckVisualiser-specific options. Will include
the general GLVisualiser options as a subconfigurator
Configuratorpublic void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class GLVisualiserpublic void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered in interface java.awt.event.MouseListenermouseEntered in class GLVisualiserpublic void mouseExited(java.awt.event.MouseEvent e)
mouseExited in interface java.awt.event.MouseListenermouseExited in class GLVisualiserpublic void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class GLVisualiserpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class GLVisualiserpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenerpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenerpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerpublic void stateRefreshed()
StateListener
stateRefreshed in interface StateListenerpublic int[] getSelectedId()
public static void apply(javax.media.opengl.GL gl,
SpeckPosition orientation)
gl - The GL contextorientation - The orientation to applypublic static boolean loadSelectionListener(java.lang.String className)
className - The class name of the GLSelectionListener
public static boolean loadRenderer(java.lang.String className)
className - The name of the renderer class
public StateRenderer getRenderer(java.lang.String className)
className - The classname of the desired renderer
public StateSink getState()
public StatsPlotter getStatsPlotter()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||