Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

trafficsim.h

00001 /***************************************************************************
00002                           trafficsim.h  -  description
00003         $Id: trafficsim.h 3 2006-06-11 08:16:14Z neoneurone $
00004                              -------------------
00005     begin                : sam mai 01 2004
00006     copyright            : (C) 2003-2004 by Duong-Khang NGUYEN
00007     email                : neoneurone @ users sourceforge net
00008  ***************************************************************************/
00009 
00010 /***************************************************************************
00011  *                                                                         *
00012  *   This program is free software; you can redistribute it and/or modify  *
00013  *   it under the terms of the GNU General Public License as published by  *
00014  *   the Free Software Foundation; either version 2 of the License, or     *
00015  *   any later version.                                                    *
00016  *                                                                         *
00017  ***************************************************************************/
00018 
00019 #ifndef _OPENCITY_TRAFFICSIM_H_
00020 #define _OPENCITY_TRAFFICSIM_H_ 1
00021 
00022 #include "main.h"
00023 #include "simulator.h"
00024 
00025 
00026 // 10% of time, we create a new vehicle
00027 #define OC_TSIM_VEHICLE_CHANCE      10
00028 
00029 // Minimum of traffic in order to generate a vehicle starting from a point of the map
00030 #define OC_TSIM_TRAFFIC_MIN         50
00031 
00032 
00033 class PathFinder;
00034 class MovementManager;
00035 
00036 
00037 //========================================================================
00041 class TrafficSim : public Simulator  {
00042 public:
00043     TrafficSim(
00044         SDL_mutex* mutex,
00045         BuildingLayer* pblayer,
00046         Map* pmap,
00047         PathFinder* pf,
00048         MovementManager* mm );
00049 
00050     virtual ~TrafficSim();
00051 
00052 
00053     int
00054     Main();
00055 
00056 
00057 private:
00058     PathFinder* ppf;
00059     MovementManager* pmm;
00060 
00061    /*=====================================================================*/
00062    /*                        PRIVATE     METHODS                          */
00063    /*=====================================================================*/
00064     void trafficsimNewVehicle(
00065         const uint& w,
00066         const uint& h );
00067 };
00068 
00069 #endif
00070 
00071 
00072 
00073 
00074 
00075 
00076 
00077 
00078 
00079 
00080 
00081 
00082 
00083 
00084 
00085 
00086 
00087 
00088 
00089 
00090 
00091 

Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2