|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.World
public class World
A world is the container for dynamic interactions. This will be the first class users typically instanciate. Once a world is create it is populated by creating bodies and joints (passing the world as a parameter) A world operates in descrete timesteps, call step or quickstep to move the world forward in time. Step is more accurate than quickstep. Quickstep allows joints to be violated severly so do not use if joint integrity is important.
The world object supports an event system. Event listeners can listen to the world to recieve notification of world level events, such as new joints and bodies being added to the system and world step events.
Created on 14-Oct-2005
Body,
Joint,
Serialized Form| Field Summary | |
|---|---|
java.util.List<Body> |
bodies
bodies in world |
ContactParameters |
contactp
allows configuration of general contact parameters |
java.lang.Object |
data
a storage field for user specific data |
java.util.List<Force> |
forces
forces TODO: remove functionality |
float |
global_cfm
See ODE docs for an exact definition global costraint force mixing parameter hardness of constraints Value of 0 denotes the hardest constraint type |
float |
global_erp
See ODE docs for an exact definition |
java.util.Vector<Joint> |
joints
joints in world |
| Constructor Summary | |
|---|---|
World()
creates an empty world |
|
World(java.lang.Object data)
creates a new world and stores data in its data storage area |
|
| Method Summary | |
|---|---|
void |
addBody(Body body)
Normally this method is not needed for user use, as bodies add themselves to a world in their constructor. |
void |
addBodyListener(WorldBodyListener listener)
|
void |
addForce(Force force)
do not call directly, only gravities are implemented TODO: remove force functionality |
void |
addJoint(Joint joint)
Normally this method is not needed for user use, as joints add themselves to a world in their constructor. |
void |
addJointListener(WorldJointListener listener)
|
void |
addStepListener(WorldStepListener listener)
|
void |
addWorldListener(WorldListener listener)
|
World |
cloneState(ClonedReferences clones)
creates a replica of the world state. |
void |
quickStep(float stepsize)
steps the world forward stepsize seconds. |
void |
removeBody(Body body)
|
void |
removeBodyListener(WorldBodyListener listener)
|
void |
removeForce(Force force)
do not calldirectly, destroy the force instead TODO: remove force functionality |
void |
removeJoint(Joint joint)
|
void |
removeJointContacts()
Since the majority of adds and removes of joints per-frame are for collision contacts, this method will speed the process by removing all contacts at once |
void |
removeJointListener(WorldJointListener listener)
|
void |
removeStepListener(WorldStepListener listener)
|
void |
removeWorldListener(WorldListener listener)
|
void |
step(float stepsize)
steps the world forward stepsize seconds, using Euler intergration. |
void |
stepFast()
Calls quickStep(float) with a value of 0.1f. |
void |
stepMidPoint(float stepsize)
steps the world forward stepsize seconds, using mid point method for intergration. |
void |
stepRungeKutter(float stepsize)
steps the world forward stepsize seconds, using Runge-Kutter of order 4 intergration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public java.util.List<Body> bodies
public java.util.Vector<Joint> joints
public java.util.List<Force> forces
public java.lang.Object data
public float global_erp
See ODE docs for an exact definition
global error reduction parameter [0..1] value of one is perfect error reduction value of 0 is no error reduction, default is .2
public float global_cfm
public ContactParameters contactp
| Constructor Detail |
|---|
public World(java.lang.Object data)
data - public World()
| Method Detail |
|---|
public void addBody(Body body)
body - public void removeBody(Body body)
public void addJoint(Joint joint)
public void removeJoint(Joint joint)
public void removeJointContacts()
public void addForce(Force force)
public void removeForce(Force force)
public void step(float stepsize)
stepsize - public void stepMidPoint(float stepsize)
stepsize - public void stepRungeKutter(float stepsize)
stepsize - public void quickStep(float stepsize)
stepsize - public void stepFast()
quickStep(float) with a value of 0.1f. In API to match ODEJava interface
public World cloneState(ClonedReferences clones)
cloneState in interface SimStateclones - instanciate a new one if top level cloningSimStatepublic void addBodyListener(WorldBodyListener listener)
public void removeBodyListener(WorldBodyListener listener)
public void addJointListener(WorldJointListener listener)
public void removeJointListener(WorldJointListener listener)
public void addStepListener(WorldStepListener listener)
public void removeStepListener(WorldStepListener listener)
public void addWorldListener(WorldListener listener)
public void removeWorldListener(WorldListener listener)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||