|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.speckled.specksim.imp.motion.CacheingMovementModel
com.speckled.specksim.imp.motion.SpeckledBodyModel
public abstract class SpeckledBodyModel
This movement model simulates a number rigid, convex bodies, each with its own path. Specks are distributed accross the surface or within the volume of these bodies.
| Nested Class Summary | |
|---|---|
class |
SpeckledBodyModel.BodiesState
This class encapsulates the vertex and face information for some time, of the bodies in this model. |
| Constructor Summary | |
|---|---|
SpeckledBodyModel()
|
|
| Method Summary | |
|---|---|
void |
addBody(Body body,
BodyPath path)
Adds a body to this movement model |
SpeckPosition |
computeLocation(Speck speck,
float time)
Override this to compute a speck's location |
Vector3d |
computeVelocity(Speck speck,
float time)
Override this to compute a speck's velocity |
void |
deInit()
Called when this model is replaced as the current model |
protected abstract Configurator |
getConcreteConfigurator()
This should be implemented to return a configurator for the variables of the subclass |
Configurator |
getConfigurator()
Gets a Configurator object that describes and can manipulate the variables of this Configurable. |
double |
getMaxSpeed()
Gets the maximum possible speed that any Speck can move under this movement model. |
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 |
removeBody(Body body)
Removes a body from the scene. |
void |
removeSpeck(Speck speck)
Called when a speck is removed from the simulator. |
| Methods inherited from class com.speckled.specksim.imp.motion.CacheingMovementModel |
|---|
clearCache, getSpeckOrientation, getSpeckVelocity |
| 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 |
|---|
getName |
| Constructor Detail |
|---|
public SpeckledBodyModel()
| Method Detail |
|---|
public void addBody(Body body,
BodyPath path)
body - The body to addpath - The path that this body followspublic void removeBody(Body body)
body - The body to be removedpublic void init(SpeckSim simulator)
MovementModel
simulator - The simulator that this model is current in.public void deInit()
MovementModel
public void removeSpeck(Speck speck)
MovementModel
public SpeckPosition computeLocation(Speck speck,
float time)
CacheingMovementModel
computeLocation in class CacheingMovementModelspeck - The speck to locatetime - The time to locate at
public Vector3d computeVelocity(Speck speck,
float time)
CacheingMovementModel
computeVelocity in class CacheingMovementModelspeck - The speck to compute fortime - The time to compute at
public double getMaxSpeed()
MovementModel
public SerializableState getState(float time)
MovementModelSpeckledBodyModels 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
public Configurator getConfigurator()
Configurable
protected abstract Configurator getConcreteConfigurator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||