jAER project on SourceForge

net.sf.jaer.graphics
Class DisplayMethod

java.lang.Object
  extended by net.sf.jaer.graphics.DisplayMethod
Direct Known Subclasses:
ChipRendererDisplayMethod, CochleaGramDisplayMethod, Histogram3dDisplayMethod, OpticalFlowDisplayMethod, RollingCochleaGramDisplayMethod, ShammaMapDisplayMethod, SpaceTimeEventDisplayMethod, UioFoveatedImagerDisplayMethod

public abstract class DisplayMethod
extends java.lang.Object

A abstract class that displays AE data in a ChipCanvas using OpenGL.

Author:
tobi

Field Summary
protected  Chip2D chip
           
protected  ChipCanvas chipCanvas
           
protected  javax.media.opengl.glu.GLU glu
           
protected  com.sun.opengl.util.GLUT glut
           
protected  java.util.logging.Logger log
           
protected  ChipCanvas.Zoom zoom
           
 
Constructor Summary
DisplayMethod(ChipCanvas parent)
          Creates a new instance of DisplayMethod
 
Method Summary
 void addAnnotator(FrameAnnotater annotator)
          add an annotator to the drawn canvas.
abstract  void display(javax.media.opengl.GLAutoDrawable drawable)
          subclasses implmeent this display method to actually render.
 java.util.ArrayList<FrameAnnotater> getAnnotators()
           
 java.lang.String getDescription()
           
 javax.swing.JMenuItem getMenuItem()
           
 Chip2DRenderer getRenderer()
           
 void removeAllAnnotators()
          removes all annotators
 void removeAnnotator(FrameAnnotater annotator)
          removes an annotator to the drawn canvas.
 void setAnnotators(java.util.ArrayList<FrameAnnotater> annotators)
           
 void setMenuItem(javax.swing.JMenuItem menuItem)
           
 void setRenderer(Chip2DRenderer renderer)
           
 javax.media.opengl.GL setupGL(javax.media.opengl.GLAutoDrawable drawable)
          This utility method sets up the gl context for rendering.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

chipCanvas

protected ChipCanvas chipCanvas

glut

protected com.sun.opengl.util.GLUT glut

glu

protected javax.media.opengl.glu.GLU glu

chip

protected Chip2D chip

zoom

protected ChipCanvas.Zoom zoom

log

protected java.util.logging.Logger log
Constructor Detail

DisplayMethod

public DisplayMethod(ChipCanvas parent)
Creates a new instance of DisplayMethod

Parameters:
parent - the containing ChipCanvas
Method Detail

setupGL

public javax.media.opengl.GL setupGL(javax.media.opengl.GLAutoDrawable drawable)
This utility method sets up the gl context for rendering. It is called at the the start of most of the DisplayMethods. It scales x,y,z in chip pixels (address by 1 increments), and sets the origin to the lower left corner of the screen with coordinates increase upwards and to right.

Parameters:
drawable - the drawable passed in.
Returns:
the context to draw in.

display

public abstract void display(javax.media.opengl.GLAutoDrawable drawable)
subclasses implmeent this display method to actually render. Typically they also call GL gl=setupGL(drawable) right after entry.

Parameters:
drawable - the GL context

getDescription

public java.lang.String getDescription()

getMenuItem

public javax.swing.JMenuItem getMenuItem()

setMenuItem

public void setMenuItem(javax.swing.JMenuItem menuItem)

getRenderer

public Chip2DRenderer getRenderer()

setRenderer

public void setRenderer(Chip2DRenderer renderer)

getAnnotators

public java.util.ArrayList<FrameAnnotater> getAnnotators()

setAnnotators

public void setAnnotators(java.util.ArrayList<FrameAnnotater> annotators)

addAnnotator

public void addAnnotator(FrameAnnotater annotator)
add an annotator to the drawn canvas. This is one way to annotate the drawn data; the other way is to annotate the histogram frame data.

Parameters:
annotator - the object that will annotate the frame data

removeAnnotator

public void removeAnnotator(FrameAnnotater annotator)
removes an annotator to the drawn canvas.

Parameters:
annotator - the object that will annotate the displayed data

removeAllAnnotators

public void removeAllAnnotators()
removes all annotators


jAER project on SourceForge