de.steeringbehaviors.simulation.simulationobjects
Class PathFindingSimulation

java.lang.Object
  extended by de.steeringbehaviors.simulation.simulationobjects.Simulation
      extended by de.steeringbehaviors.simulation.simulationobjects.PathFindingSimulation

public class PathFindingSimulation
extends Simulation

Simulation step for enforcing the 'non-penetration' constraint. This means no vehicle is allowed to get into an invalid state, for example drive through an obstacle or another vehicle.


Field Summary
 
Fields inherited from class de.steeringbehaviors.simulation.simulationobjects.Simulation
m_background, m_Obstacle, m_parent, m_postSimulation, m_preSimulation, m_Scene, m_sceneHeight, m_sceneWidth, m_simulationTime, m_useSceneConstraints, m_Vehicles, m_wrapAround
 
Constructor Summary
PathFindingSimulation()
          Creates an empty simulation object.
 
Method Summary
 void addVehicle(Vehicle newVehicle)
          Adds a new vehicle to the scene description.
 void runSimlation()
          runSimulation is called to run a simulation step on all the vehicles and additional simulators.
 
Methods inherited from class de.steeringbehaviors.simulation.simulationobjects.Simulation
addBackground, addGeometrie, addObstacle, addPostSimulation, addPreSimulation, getObstacle, getParent, getScene, getSimulationTime, getVehicles, removeAll, removeGeometrie, removeObstacle, removeVehicle, runSimulation, setParent, setSceneHeight, setSceneWidth, setUseSceneConstraints, setWrapAround
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathFindingSimulation

public PathFindingSimulation()
Creates an empty simulation object. Add scene objects and additional simulation steps afterwards.

Method Detail

addVehicle

public void addVehicle(Vehicle newVehicle)
Adds a new vehicle to the scene description. The vehicle is automatically added to all pre- and post-Simulations as well.

Overrides:
addVehicle in class Simulation
Parameters:
newVehicle - The vehicle object to add to the scene

runSimlation

public void runSimlation()
runSimulation is called to run a simulation step on all the vehicles and additional simulators. The idea of having a pre- and post simulation is, to allow additional simulation steps to be created and seamlessly plugged into the system.