net.java.dev.joode.graphics2D
Class Graphics2DManager

java.lang.Object
  extended by net.java.dev.joode.graphics2D.Graphics2DManager
All Implemented Interfaces:
Drawable2D, GeomListener, WorldJointListener

public class Graphics2DManager
extends java.lang.Object
implements Drawable2D, GeomListener, WorldJointListener

Automatically adds new geoms to the graphics manager, and paints them also uses the collision library to perform picking operations

Author:
tom.larkworthy

Field Summary
static net.java.dev.joode.graphics2D.Graphics2DManager.Picker picker
           
 
Constructor Summary
Graphics2DManager(Converter2D converter, World world, Space space)
          Create a fully configured manager
 
Method Summary
 void draw(java.awt.Graphics2D g)
           
 void geomAdded(Space space, Geom g)
           
 void geomRemoved(Space space, Geom g)
           
 void jointAdded(World w, Joint j)
           
 void jointRemoved(World w, Joint j)
           
 java.util.List<Geom> pick(float x, float y)
          uses the collision library to detect what geoms intersect with the point
 void setup(World world, Space space)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

picker

public static final net.java.dev.joode.graphics2D.Graphics2DManager.Picker picker
Constructor Detail

Graphics2DManager

public Graphics2DManager(Converter2D converter,
                         World world,
                         Space space)
Create a fully configured manager

Parameters:
converter -
world -
space -
Method Detail

setup

public void setup(World world,
                  Space space)

draw

public void draw(java.awt.Graphics2D g)
Specified by:
draw in interface Drawable2D

geomAdded

public void geomAdded(Space space,
                      Geom g)
Specified by:
geomAdded in interface GeomListener

geomRemoved

public void geomRemoved(Space space,
                        Geom g)
Specified by:
geomRemoved in interface GeomListener

jointAdded

public void jointAdded(World w,
                       Joint j)
Specified by:
jointAdded in interface WorldJointListener

jointRemoved

public void jointRemoved(World w,
                         Joint j)
Specified by:
jointRemoved in interface WorldJointListener

pick

public java.util.List<Geom> pick(float x,
                                 float y)
uses the collision library to detect what geoms intersect with the point

Parameters:
x -
y -
Returns: