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

PlayerRoadSource.cc

Go to the documentation of this file.
00001 00005 #include <iostream> 00006 00007 #include <utils/ConfigFile.h> 00008 #include <TimeSource/TimeSource.h> 00009 00010 #include "RoadSource.h" 00011 #include "RoadPlayer.h" 00012 00015 class PlayerRoadSource : public RoadSource { 00016 public: 00018 virtual bool getPoints(utils::Time& time, 00019 std::vector<utils::Vec3d>& points, 00020 bool blocking = true); 00021 00023 bool init(utils::ConfigFile& params, utils::SymbolTable* globals); 00024 00025 private: 00026 RoadPlayer _player; 00027 }; 00028 00030 RoadSource* create_RoadSource_player(RoadSourceGenerator* gen, 00031 utils::ConfigFile* params, 00032 utils::SymbolTable* globals) 00033 { 00034 PlayerRoadSource* intf = new PlayerRoadSource(); 00035 if (!intf->init(*params, globals)) { 00036 delete intf; 00037 return NULL; 00038 } 00039 return intf; 00040 } 00041 00042 bool PlayerRoadSource::init(utils::ConfigFile& params, 00043 utils::SymbolTable* globals) 00044 { 00045 return _player.open(params, globals); 00046 } 00047 00048 bool PlayerRoadSource::getPoints(utils::Time& time, 00049 std::vector<utils::Vec3d>& points, 00050 bool blocking) 00051 { 00052 return _player.nextPoints(time, points, blocking); 00053 } 00054

Generated on Tue Sep 7 20:37:49 2004 for ModUtils by doxygen 1.3.8