org.placelab.particlefilter
Class ParticleFilterVisualizer

java.lang.Object
  extended byorg.placelab.util.swt.Glyph
      extended byorg.placelab.particlefilter.ParticleFilterVisualizer
All Implemented Interfaces:
EstimateListener

public class ParticleFilterVisualizer
extends Glyph
implements EstimateListener


Field Summary
protected  org.eclipse.swt.graphics.Color color
           
protected  org.eclipse.swt.graphics.Color color2
           
protected  org.eclipse.swt.graphics.Rectangle particleBounds
           
protected  Tracker tracker
           
protected  MapView view
           
protected  boolean visible
           
protected  boolean weightedVisualization
           
 
Fields inherited from class org.placelab.util.swt.Glyph
ANCHOR_C, ANCHOR_E, ANCHOR_N, ANCHOR_NE, ANCHOR_NW, ANCHOR_S, ANCHOR_SE, ANCHOR_SW, ANCHOR_W, DISPOSED, IGNORE_TRANSPARENCY, MOUSE_EVENTS, needsTransformRedraw, NONE, transform, transformedImage, transparency, VISIBLE, zoom
 
Constructor Summary
ParticleFilterVisualizer(GlyphComposite parent, int style)
           
ParticleFilterVisualizer(GlyphHolder holder, int style)
           
 
Method Summary
 void estimateUpdated(Tracker t, Estimate e, Measurement m)
          Implement this method to respond to updates from the Tracker(s) you are registered with.
 org.eclipse.swt.graphics.Rectangle getBoundsImpl()
           
protected  java.util.Vector getParticleList()
           
 org.eclipse.swt.graphics.Point getParticlePixels(PositionParticle particle)
           
 boolean getVisible()
           
 boolean getWeightedVisualization()
           
 boolean isOpened()
           
 void open(MapView view, Tracker t)
           
 void paintImpl(org.eclipse.swt.events.PaintEvent e, GlyphGC gc)
          Implement this if you don't want to worry about AffineTransforms.
 boolean pointInsideImpl(int x, int y)
          Return if the point is inside your glyph without the AffineTransform applied
 void setForeground(org.eclipse.swt.graphics.Color c)
           
 void setVisible(boolean v)
           
 void setWeightedVisualization(boolean flag)
           
 void setWeightedVisualizationColors(org.eclipse.swt.graphics.Color zero, org.eclipse.swt.graphics.Color one)
           
 
Methods inherited from class org.placelab.util.swt.Glyph
addListener, addMouseListener, addPaintListener, areMouseEventsEnabled, dispose, enableMouseEvents, enter, getBounds, getCloseEnough, getFlag, getHolder, getLocation, getMaskColor, getNeedsTransformRedraw, getOriginalLocation, getParent, getTransform, getTransparency, getZoom, handleMouseEvent, isDisposed, isVisible, leave, moveAbove, moveBelow, notifyListeners, paint, pickGlyphAt, pointInside, pointInside, redraw, removeListener, resetFlag, setCloseEnough, setCursor, setFlag, setLocation, setNeedsTransformRedraw, setTransform, setTransparency, setZoom
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

protected MapView view

tracker

protected Tracker tracker

color

protected org.eclipse.swt.graphics.Color color

color2

protected org.eclipse.swt.graphics.Color color2

visible

protected boolean visible

weightedVisualization

protected boolean weightedVisualization

particleBounds

protected org.eclipse.swt.graphics.Rectangle particleBounds
Constructor Detail

ParticleFilterVisualizer

public ParticleFilterVisualizer(GlyphComposite parent,
                                int style)

ParticleFilterVisualizer

public ParticleFilterVisualizer(GlyphHolder holder,
                                int style)
Method Detail

open

public void open(MapView view,
                 Tracker t)

setForeground

public void setForeground(org.eclipse.swt.graphics.Color c)

setWeightedVisualizationColors

public void setWeightedVisualizationColors(org.eclipse.swt.graphics.Color zero,
                                           org.eclipse.swt.graphics.Color one)

setWeightedVisualization

public void setWeightedVisualization(boolean flag)

getWeightedVisualization

public boolean getWeightedVisualization()

isOpened

public boolean isOpened()

getParticleList

protected java.util.Vector getParticleList()

getParticlePixels

public org.eclipse.swt.graphics.Point getParticlePixels(PositionParticle particle)

estimateUpdated

public void estimateUpdated(Tracker t,
                            Estimate e,
                            Measurement m)
Description copied from interface: EstimateListener
Implement this method to respond to updates from the Tracker(s) you are registered with.

Specified by:
estimateUpdated in interface EstimateListener
Parameters:
t - the Tracker producing the Estimate
e - the Estimate produced by the Tracker
m - the latest Measurement used by the Tracker to produce the Estimate

getBoundsImpl

public org.eclipse.swt.graphics.Rectangle getBoundsImpl()
Specified by:
getBoundsImpl in class Glyph
Returns:
your bounds without having the AffineTransform applied to them

pointInsideImpl

public boolean pointInsideImpl(int x,
                               int y)
Description copied from class: Glyph
Return if the point is inside your glyph without the AffineTransform applied

Specified by:
pointInsideImpl in class Glyph

paintImpl

public void paintImpl(org.eclipse.swt.events.PaintEvent e,
                      GlyphGC gc)
Description copied from class: Glyph
Implement this if you don't want to worry about AffineTransforms. Your graphics will be rasterized and have an AffineTransform applied to them

Overrides:
paintImpl in class Glyph

setVisible

public void setVisible(boolean v)
Overrides:
setVisible in class Glyph

getVisible

public boolean getVisible()