Package org.jbox2d.testbed.tests
Class DynamicTreeTest
- java.lang.Object
-
- org.jbox2d.testbed.framework.TestbedTest
-
- org.jbox2d.testbed.tests.DynamicTreeTest
-
- All Implemented Interfaces:
ContactListener,TreeCallback,TreeRayCastCallback,JbDeserializer.ObjectListener,JbSerializer.ObjectSigner,UnsupportedListener
public class DynamicTreeTest extends TestbedTest implements TreeCallback, TreeRayCastCallback
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDynamicTreeTest.Actor
-
Field Summary
Fields Modifier and Type Field Description (package private) inte_actorCount(package private) DynamicTreeTest.Actor[]m_actors(package private) booleanm_automated(package private) floatm_proxyExtent(package private) AABBm_queryAABB(package private) DynamicTreeTest.Actorm_rayActor(package private) RayCastInputm_rayCastInput(package private) RayCastOutputm_rayCastOutput(package private) intm_stepCount(package private) BroadPhaseStrategym_tree(package private) java.util.Randomrandprivate Vec2ArrayvecPool(package private) floatworldExtent-
Fields inherited from class org.jbox2d.testbed.framework.TestbedTest
BOMB_TAG, destructionListener, GROUND_BODY_TAG, groundBody, m_textLine, m_world, MAX_CONTACT_POINTS, MOUSE_JOINT_TAG, points
-
-
Constructor Summary
Constructors Constructor Description DynamicTreeTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAction()voidCreateProxy()voidDestroyProxy()voidGetRandomAABB(AABB aabb)java.lang.StringgetTestName()The name of the testvoidinitTest(boolean argDeserialized)Initializes the current testvoidkeyPressed(char argKeyChar, int argKeyCode)voidMoveAABB(AABB aabb)voidMoveProxy()voidQuery()voidRayCast()floatraycastCallback(RayCastInput input, int proxyId)voidstep(TestbedSettings settings)booleantreeCallback(int proxyId)Callback from a query request.-
Methods inherited from class org.jbox2d.testbed.framework.TestbedTest
_load, _reset, _save, addTextLine, beginContact, completeBombSpawn, endContact, exit, getBomb, getCachedCameraPos, getCachedCameraScale, getContactPoints, getDebugDraw, getDefaultCameraPos, getDefaultCameraScale, getFilename, getGroundBody, getModel, getPointCount, getStepCount, getTag, getTag, getTag, getTag, getTag, getWorld, getWorldMouse, init, init, isDialogOnSaveLoadErrors, isHasCachedCamera, isSaveLoadEnabled, isUnsupported, jointDestroyed, keyReleased, lanchBomb, launchBomb, load, mouseDown, mouseMove, mouseUp, postSolve, preSolve, processBody, processFixture, processJoint, processShape, processWorld, queueKeyPressed, queueKeyReleased, queueMouseDown, queueMouseMove, queueMouseUp, queueShiftMouseDown, reset, save, setCachedCameraPos, setCachedCameraScale, setCamera, setCamera, setDialogOnSaveLoadErrors, setHasCachedCamera, setTitle, shiftMouseDown, spawnBomb, update
-
-
-
-
Field Detail
-
e_actorCount
int e_actorCount
-
worldExtent
float worldExtent
-
m_proxyExtent
float m_proxyExtent
-
m_tree
BroadPhaseStrategy m_tree
-
m_queryAABB
AABB m_queryAABB
-
m_rayCastInput
RayCastInput m_rayCastInput
-
m_rayCastOutput
RayCastOutput m_rayCastOutput
-
m_rayActor
DynamicTreeTest.Actor m_rayActor
-
m_actors
DynamicTreeTest.Actor[] m_actors
-
m_stepCount
int m_stepCount
-
m_automated
boolean m_automated
-
rand
java.util.Random rand
-
vecPool
private Vec2Array vecPool
-
-
Method Detail
-
initTest
public void initTest(boolean argDeserialized)
Description copied from class:TestbedTestInitializes the current test- Specified by:
initTestin classTestbedTest
-
keyPressed
public void keyPressed(char argKeyChar, int argKeyCode)- Overrides:
keyPressedin classTestbedTest
-
step
public void step(TestbedSettings settings)
- Overrides:
stepin classTestbedTest
-
treeCallback
public boolean treeCallback(int proxyId)
Description copied from interface:TreeCallbackCallback from a query request.- Specified by:
treeCallbackin interfaceTreeCallback- Parameters:
proxyId- the id of the proxy- Returns:
- if the query should be continued
-
raycastCallback
public float raycastCallback(RayCastInput input, int proxyId)
- Specified by:
raycastCallbackin interfaceTreeRayCastCallback- Returns:
- the fraction to the node
-
GetRandomAABB
public void GetRandomAABB(AABB aabb)
-
MoveAABB
public void MoveAABB(AABB aabb)
-
CreateProxy
public void CreateProxy()
-
DestroyProxy
public void DestroyProxy()
-
MoveProxy
public void MoveProxy()
-
Action
public void Action()
-
Query
public void Query()
-
RayCast
public void RayCast()
-
getTestName
public java.lang.String getTestName()
Description copied from class:TestbedTestThe name of the test- Specified by:
getTestNamein classTestbedTest- Returns:
-
-