|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttesting.physicsEngine.guiTest.AbstractTestEnvironment
testing.physicsEngine.guiTest.SeesawTest
public class SeesawTest
A demo that shows how a rotating system is implemented using the physics engine. The rotational damping can be tweaked from the view, and gravity can be turned on or off.
Field Summary |
---|
Fields inherited from class testing.physicsEngine.guiTest.AbstractTestEnvironment |
---|
DISPLAY_HEIGHT, DISPLAY_WIDTH, loopCount, myNewBodies, needsReset, recentUserActivity |
Constructor Summary | |
---|---|
SeesawTest()
|
Method Summary | |
---|---|
protected void |
drawGUItext(java.awt.Graphics2D g)
Demo customisable GUI render |
(package private) java.util.List<PhysicalParameters> |
initBodies()
This method must be implemented by extending classes, it returns the list of PhysicalParameters representing each of the bodies in the world, set to their initial positions. |
(package private) PhysicsEngine |
initEngine()
This method must be implemented by extending classes, and returns the PhysicsEngine properly initialized. |
protected void |
keyHit(char c)
Notification that a key was pressed |
static void |
main(java.lang.String[] args)
|
protected void |
mouseClick(java.awt.Point p)
Notification that the mouse was clicked |
Methods inherited from class testing.physicsEngine.guiTest.AbstractTestEnvironment |
---|
createWalls, run, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SeesawTest()
Method Detail |
---|
java.util.List<PhysicalParameters> initBodies()
AbstractTestEnvironment
initBodies
in class AbstractTestEnvironment
PhysicsEngine initEngine()
AbstractTestEnvironment
initEngine
in class AbstractTestEnvironment
protected void mouseClick(java.awt.Point p)
AbstractTestEnvironment
mouseClick
in class AbstractTestEnvironment
p
- The point at which the mouse was clickedprotected void keyHit(char c)
AbstractTestEnvironment
keyHit
in class AbstractTestEnvironment
c
- The character of key hitprotected void drawGUItext(java.awt.Graphics2D g)
AbstractTestEnvironment
drawGUItext
in class AbstractTestEnvironment
g
- The graphics context to use for rendering herepublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |