|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MovementModel
Defines the physical position, orientation and velocity for each
speck. I recommend that you extend the
CacheingMovementModel class.
| Method Summary | |
|---|---|
void |
deInit()
Called when this model is replaced as the current model |
double |
getMaxSpeed()
Gets the maximum possible speed that any Speck can move under this movement model. |
java.lang.String |
getName()
Gets the name of this model |
SpeckPosition |
getSpeckOrientation(Speck speck,
float time)
Works out the position of a given speck at a given time. |
Vector3d |
getSpeckVelocity(Speck speck,
float time)
Works out the velocity of a given speck at a given time |
SerializableState |
getState(float time)
Gets a state object from this model. |
void |
init(SpeckSim simulator)
Called when this model is set to be the current model, or when the simulator is reset. |
void |
removeSpeck(Speck speck)
Called when a speck is removed from the simulator. |
| Methods inherited from interface com.ryanm.config.Configurable |
|---|
getConfigurator |
| Method Detail |
|---|
java.lang.String getName()
void init(SpeckSim simulator)
simulator - The simulator that this model is current in.void deInit()
void removeSpeck(Speck speck)
speck -
SpeckPosition getSpeckOrientation(Speck speck,
float time)
speck - The speck to locatetime - The time at which to locate
Vector3d getSpeckVelocity(Speck speck,
float time)
speck - The speck to calculate velocity fortime - The time at which to calculate
double getMaxSpeed()
SerializableState getState(float time)
SpeckledBodyModels use it to pass the
vertices of their bodies for visualisation. Feel free to pass
null if you want to. This implementation of this method should
not assume that the init() method has been called, so return an
empty instance of the state object if this is the case
time - The time at which the state should be captured
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||