org.jbox2d.testbed.tests
Class DistanceTest

java.lang.Object
  extended by org.jbox2d.testbed.AbstractExample
      extended by org.jbox2d.testbed.tests.DistanceTest

public class DistanceTest
extends AbstractExample


Field Summary
 
Fields inherited from class org.jbox2d.testbed.AbstractExample
black, blue, bombSpawning, bombSpawnPoint, boundImages, cachedCamScale, cachedCamX, cachedCamY, gray, green, hasCachedCamera, instructionString, keyDown, m_bomb, m_boundaryListener, m_contactListener, m_debugDraw, m_destructionListener, m_mouseJoint, m_pointCount, m_points, m_textLine, m_world, m_worldAABB, memFree, mouseScreen, mouseWorld, needsReset, newKeyDown, parent, pmousePressed, pmouseScreen, red, settings, textLineHeight, white
 
Constructor Summary
DistanceTest(TestbedMain _parent)
           
 
Method Summary
 void create()
          Create the world geometry for each test.
 String getName()
           
 void keyPressed(int key)
          Set keyDown and newKeyDown arrays when we get a keypress.
 void step()
          Take a physics step.
 
Methods inherited from class org.jbox2d.testbed.AbstractExample
bindImage, boundaryViolated, completeBombSpawn, createWorld, getExampleInstructions, initialize, jointDestroyed, keyReleased, launchBomb, launchBomb, mouseDown, mouseMove, mouseUp, postStep, preStep, printInstructions, setCamera, spawnBomb
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistanceTest

public DistanceTest(TestbedMain _parent)
Method Detail

create

public void create()
Description copied from class: AbstractExample
Create the world geometry for each test. Any custom initialization for a test should go here. Called immediately after initialize(), which handles generic test initialization and should usually not be overloaded.

Specified by:
create in class AbstractExample

step

public void step()
Description copied from class: AbstractExample
Take a physics step. This is the guts of the simulation loop. When creating your own game, the most important thing to have in your step method is the m_world.step() call.

Overrides:
step in class AbstractExample

keyPressed

public void keyPressed(int key)
Description copied from class: AbstractExample
Set keyDown and newKeyDown arrays when we get a keypress.

Overrides:
keyPressed in class AbstractExample
Parameters:
key - The key pressed.

getName

public String getName()
Specified by:
getName in class AbstractExample
Returns:
Title of example.