@@ -0,0 +1,1744 @@
+/*%0A * To change this template, choose Tools %7C Templates%0A * and open the template in the editor.%0A */%0A%0Apackage ch.unizh.ini.jaer.projects.virtualslotcar;%0Aimport javax.media.opengl.GL;%0Aimport javax.media.opengl.GLAutoDrawable;%0Aimport net.sf.jaer.chip.AEChip;%0Aimport net.sf.jaer.event.BasicEvent;%0Aimport net.sf.jaer.event.EventPacket;%0Aimport net.sf.jaer.eventprocessing.EventFilter2D;%0Aimport net.sf.jaer.graphics.FrameAnnotater;%0A/**%0A *%0A * @author tobi%0A *%0A * This is part of jAER%0A%3Ca href=%22http://jaer.wiki.sourceforge.net%22%3Ejaer.wiki.sourceforge.net%3C/a%3E,%0Alicensed under the LGPL (%3Ca href=%22http://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License%22%3Ehttp://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License%3C/a%3E.%0A */%0Apublic class TestFilterTell2010 extends EventFilter2D implements FrameAnnotater%7B%0A%0A    float x, y;%0A    private float updateRate=0.01f;%0A%0A    public TestFilterTell2010 (AEChip chip)%7B%0A        super(chip);%0A    %7D%0A%0A    @Override%0A    public EventPacket%3C?%3E filterPacket (EventPacket%3C?%3E in)%7B%0A%0A        for(BasicEvent e:in)%7B%0A            x=updateRate*e.x+(1-updateRate)*x;%0A            y=updateRate*e.y+(1-updateRate)*y;%0A        %7D%0A        System.out.println(%22x=%22+x+%22 y=%22+y);%0A        return in;%0A        %0A    %7D%0A%0A    @Override%0A    public void resetFilter ()%7B%0A    %7D%0A%0A    @Override%0A    public void initFilter ()%7B%0A    %7D%0A%0A    public void annotate (GLAutoDrawable drawable)%7B%0A        GL gl=drawable.getGL();%0A        gl.glColor3f(1,1,1);%0A        gl.glLineWidth(5);%0A%0A%0A    %7D%0A%0A    /**%0A     * @return the updateRate%0A     */%0A    public float getUpdateRate ()%7B%0A        return updateRate;%0A    %7D%0A%0A    /**%0A     * @param updateRate the updateRate to set%0A     */%0A    public void setUpdateRate (float updateRate)%7B%0A        this.updateRate = updateRate;%0A    %7D%0A%0A%7D%0A

test filter for demo purposes