|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.imp.motion.CacheingMovementModel
public abstract class CacheingMovementModel
Override this class to add cacheing behaviour to your movement model. MovementModels are often asked to locate the same speck at the same time more than once. Cacheing the results will obviously improve performance
| Constructor Summary | |
|---|---|
CacheingMovementModel()
|
|
| Method Summary | |
|---|---|
protected void |
clearCache()
Clears the cache. |
protected abstract SpeckPosition |
computeLocation(Speck speck,
float time)
Override this to compute a speck's location |
protected abstract Vector3d |
computeVelocity(Speck speck,
float time)
Override this to compute a speck's velocity |
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.speckled.specksim.MovementModel |
|---|
deInit, getMaxSpeed, getName, getState, init, removeSpeck |
| Methods inherited from interface com.ryanm.config.Configurable |
|---|
getConfigurator |
| Constructor Detail |
|---|
public CacheingMovementModel()
| Method Detail |
|---|
protected void clearCache()
public final SpeckPosition getSpeckOrientation(Speck speck,
float time)
MovementModel
getSpeckOrientation in interface MovementModelspeck - The speck to locatetime - The time at which to locate
public final Vector3d getSpeckVelocity(Speck speck,
float time)
MovementModel
getSpeckVelocity in interface MovementModelspeck - The speck to calculate velocity fortime - The time at which to calculate
protected abstract SpeckPosition computeLocation(Speck speck,
float time)
speck - The speck to locatetime - The time to locate at
protected abstract Vector3d computeVelocity(Speck speck,
float time)
speck - The speck to compute fortime - The time to compute at
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||