Changeset 193
- Timestamp:
- 03/02/2010 04:33:49 PM (2 years ago)
- Files:
-
- trunk/include/gui/application.h (deleted)
- trunk/include/gui/camera.h (deleted)
- trunk/include/gui/iapplication.h (deleted)
- trunk/include/gui/renderer.h (deleted)
- trunk/include/waterworld/chemical_signal.h (deleted)
- trunk/include/waterworld/common.h (deleted)
- trunk/include/waterworld/common/deleteptr.h (deleted)
- trunk/include/waterworld/common/types.h (deleted)
- trunk/include/waterworld/common/vec3.h (deleted)
- trunk/include/waterworld/config.h.in (modified) (1 diff)
- trunk/include/waterworld/network.h (deleted)
- trunk/include/waterworld/sensor.h (deleted)
- trunk/include/waterworld/sim2.h (added)
- trunk/include/waterworld/sim2/CollisionSensor.h (modified) (1 diff)
- trunk/include/waterworld/sim2/EventsThread.h (modified) (3 diffs)
- trunk/include/waterworld/simulation.h (deleted)
- trunk/include/waterworld/simulation/IntrusivePtrBase.h (deleted)
- trunk/include/waterworld/simulation/actuator.h (deleted)
- trunk/include/waterworld/simulation/event.h (deleted)
- trunk/include/waterworld/simulation/eventHandler.h (deleted)
- trunk/include/waterworld/simulation/eventsQueue.h (deleted)
- trunk/include/waterworld/simulation/eventsThread.h (deleted)
- trunk/include/waterworld/simulation/handlersRegistry.h (deleted)
- trunk/include/waterworld/simulation/ianimat.h (deleted)
- trunk/include/waterworld/simulation/ichemical_signal.h (deleted)
- trunk/include/waterworld/simulation/isensor.h (deleted)
- trunk/include/waterworld/simulation/iworld.h (deleted)
- trunk/include/waterworld/simulation/observable.h (deleted)
- trunk/include/waterworld/simulation/observables.h (deleted)
- trunk/include/waterworld/simulation/observer.h (deleted)
- trunk/include/waterworld/simulation/observers.h (deleted)
- trunk/include/waterworld/waterworld.h (modified) (1 diff)
- trunk/src/CMakeLists.txt (modified) (2 diffs)
- trunk/src/gui/application.cpp (deleted)
- trunk/src/gui/camera.cpp (deleted)
- trunk/src/gui/iapplication.cpp (deleted)
- trunk/src/gui/renderer.cpp (deleted)
- trunk/src/tests/CMakeLists.txt (modified) (1 diff)
- trunk/src/tests/exampleAnimat.h (deleted)
- trunk/src/tests/test_actuator.cpp (deleted)
- trunk/src/tests/test_build.cpp (deleted)
- trunk/src/tests/test_chemical_signal.cpp (deleted)
- trunk/src/tests/test_events.cpp (deleted)
- trunk/src/tests/test_ianimat.cpp (deleted)
- trunk/src/tests/test_ichemical_signal.cpp (deleted)
- trunk/src/tests/test_isensor.cpp (deleted)
- trunk/src/tests/test_iworld.cpp (deleted)
- trunk/src/tests/test_sensor.cpp (deleted)
- trunk/src/tests/test_sim2_build.cpp (modified) (1 diff)
- trunk/src/tests/tests.h (deleted)
- trunk/src/waterworld.cpp (deleted)
- trunk/src/waterworld/CMakeLists.txt (modified) (1 diff)
- trunk/src/waterworld/simulation/CMakeLists.txt (deleted)
- trunk/src/waterworld/simulation/IntrusivePtrBase.cpp (deleted)
- trunk/src/waterworld/simulation/actuator.cpp (deleted)
- trunk/src/waterworld/simulation/chemical_signal.cpp (deleted)
- trunk/src/waterworld/simulation/event.cpp (deleted)
- trunk/src/waterworld/simulation/eventHandler.cpp (deleted)
- trunk/src/waterworld/simulation/eventsQueue.cpp (deleted)
- trunk/src/waterworld/simulation/eventsThread.cpp (deleted)
- trunk/src/waterworld/simulation/handlersRegistry.cpp (deleted)
- trunk/src/waterworld/simulation/ianimat.cpp (deleted)
- trunk/src/waterworld/simulation/ichemical_signal.cpp (deleted)
- trunk/src/waterworld/simulation/isensor.cpp (deleted)
- trunk/src/waterworld/simulation/iworld.cpp (deleted)
- trunk/src/waterworld/simulation/observable.cpp (deleted)
- trunk/src/waterworld/simulation/observer.cpp (deleted)
- trunk/src/waterworld/simulation/sensor.cpp (deleted)
- trunk/src/waterworld2.cpp (deleted)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/include/waterworld/config.h.in
r188 r193 3 3 4 4 #cmakedefine WATERWORLD_WIN32 5 #cmakedefine USE_SIM26 5 7 6 #endif/*CONFIG_INCLUDED*/ trunk/include/waterworld/sim2/CollisionSensor.h
r186 r193 26 26 * Handle collision between animat1 and animat2 at contactPoint 27 27 * \param animat1 Colliding animat 28 * \param animat2 Another colliding animat29 28 * \param contactPoint Contact point 30 29 * \param world World trunk/include/waterworld/sim2/EventsThread.h
r175 r193 6 6 /** 7 7 * \class EventsThread 8 * \brief Thread for processing events 8 9 */ 9 10 class EventsThread; … … 18 19 namespace waterworld 19 20 { 20 /// @TODO21 21 class EventsThread : public EventHandler 22 22 { … … 25 25 typedef queue_t::value_type event_t; 26 26 typedef queue_t::value_type value_type; 27 /** 28 * \param queue Events queue 29 * \param registry Handlers registry 30 */ 27 31 EventsThread(queue_t &queue, HandlersRegistry ®istry); 28 32 EventsThread(EventsThread const &evThread); 29 33 EventsThread &operator=(EventsThread const &evThread); 34 /** 35 * Waits for event 36 * \return Event 37 */ 30 38 virtual event_t getEvent(); 39 /** 40 * Handles event 41 * \param event Event to handle 42 */ 31 43 virtual bool handle(Event *event); 44 /** 45 * Thread main-loop 46 */ 32 47 void operator()(); 33 48 virtual ~EventsThread(); trunk/include/waterworld/waterworld.h
r110 r193 3 3 4 4 /** 5 * \file waterworld.h 6 * \brief waterworld include-all header 7 * 8 * This file includes every other header in project, 9 * it allows easier 'refactoring' ( e.g. renaming headers in project, 10 * moving classes between headers, etc. ) 11 */ 12 13 /** 14 * \namespace waterworld 15 * \brief WaterWorld namespace 5 * Namespace for waterworld classes 16 6 */ 17 7 namespace waterworld {} 18 8 19 #include "waterworld/config.h" 20 #include "waterworld/common.h" 21 #include "waterworld/simulation.h" 22 #include "waterworld/network.h" 9 // include all headers 23 10 24 //#include "waterworld/simpleanimatcontroller.h" 25 //#include "waterworld/simpleworld.h"11 #include <waterworld/config.h> 12 #include "sim2.h" 26 13 27 14 #endif/*WATERWORLD_INCLUDED*/ 28 trunk/src/CMakeLists.txt
r188 r193 13 13 ADD_SUBDIRECTORY(waterworld) 14 14 15 IF(USE_SIM2) 16 ADD_EXECUTABLE(WaterWorld3 17 waterworld3.cpp 18 SerializeEventHandler.cpp 19 QuitEventHandler.cpp) 20 TARGET_LINK_LIBRARIES(WaterWorld3 ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES}) 21 ADD_EXECUTABLE(WaterWorld5 22 waterworld5.cpp 23 SerializeEventHandler.cpp 24 QuitEventHandler.cpp) 25 TARGET_LINK_LIBRARIES(WaterWorld5 ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES}) 26 ELSE(USE_SIM2) 27 ADD_EXECUTABLE(WaterWorld2 waterworld2.cpp) 28 TARGET_LINK_LIBRARIES(WaterWorld2 ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES}) 29 ENDIF(USE_SIM2) 15 ADD_EXECUTABLE(WaterWorld3 16 waterworld3.cpp 17 SerializeEventHandler.cpp 18 QuitEventHandler.cpp) 19 TARGET_LINK_LIBRARIES(WaterWorld3 ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES}) 20 ADD_EXECUTABLE(WaterWorld5 21 waterworld5.cpp 22 SerializeEventHandler.cpp 23 QuitEventHandler.cpp) 24 TARGET_LINK_LIBRARIES(WaterWorld5 ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES}) 30 25 31 26 IF(ENABLE_GUI) … … 33 28 SET(WATERWORLD_GUI_LIBRARIES ${OPENGL_LIBRARIES} ${SDL_LIBRARY} ${SDLTTF_LIBRARY} ${CEGUI_LIBRARIES}) 34 29 35 IF(USE_SIM2) 36 SET(WATERWORLD_GUI_SOURCES 37 waterworld4.cpp 38 SerializeEventHandler.cpp 39 QuitEventHandler.cpp 40 init_sdl.cpp 41 gui2/Application.cpp 42 gui2/Renderer.cpp) 30 SET(WATERWORLD_GUI_SOURCES 31 waterworld4.cpp 32 SerializeEventHandler.cpp 33 QuitEventHandler.cpp 34 init_sdl.cpp 35 gui2/Application.cpp 36 gui2/Renderer.cpp) 43 37 44 ADD_EXECUTABLE(WaterWorldGUI WIN32 ${WATERWORLD_GUI_SOURCES}) 45 TARGET_LINK_LIBRARIES(WaterWorldGUI ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES} ${WATERWORLD_GUI_LIBRARIES}) 46 ELSE(USE_SIM2) 47 48 SET(WATERWORLD_GUI_SOURCES 49 waterworld.cpp init_sdl.cpp 50 gui/iapplication.cpp 51 gui/application.cpp 52 gui/renderer.cpp) 53 54 ADD_EXECUTABLE(WaterWorldGUI WIN32 ${WATERWORLD_GUI_SOURCES}) 55 TARGET_LINK_LIBRARIES(WaterWorldGUI ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES} ${WATERWORLD_GUI_LIBRARIES}) 56 ENDIF(USE_SIM2) 38 ADD_EXECUTABLE(WaterWorldGUI WIN32 ${WATERWORLD_GUI_SOURCES}) 39 TARGET_LINK_LIBRARIES(WaterWorldGUI ${WATERWORLD_LIBRARY} ${WATERWORLD_LIBRARIES} ${WATERWORLD_GUI_LIBRARIES}) 57 40 58 41 ADD_EXECUTABLE(TestGUI WIN32 TestGUI.cpp) trunk/src/tests/CMakeLists.txt
r191 r193 10 10 ENDIF(Boost_TEST_EXEC_MONITOR_LIBRARY) 11 11 12 IF(USE_SIM2) 12 SET(TEST_BUILD_SOURCES test_sim2_build.cpp) 13 ADD_EXECUTABLE(TestBuild ${TEST_BUILD_SOURCES}) 14 TARGET_LINK_LIBRARIES(TestBuild ${TESTS_LIBRARIES}) 13 15 14 SET(TEST_BUILD_SOURCES test_sim2_build.cpp) 15 ADD_EXECUTABLE(TestBuild ${TEST_BUILD_SOURCES}) 16 TARGET_LINK_LIBRARIES(TestBuild ${TESTS_LIBRARIES}) 16 ADD_TEST(Build TestBuild) 17 17 18 ADD_TEST(Build TestBuild) 18 SET(TEST_EVENTS_SOURCES test_sim2_events.cpp) 19 ADD_EXECUTABLE(TestEvents ${TEST_EVENTS_SOURCES}) 20 TARGET_LINK_LIBRARIES(TestEvents ${TESTS_LIBRARIES}) 19 21 20 SET(TEST_EVENTS_SOURCES test_sim2_events.cpp) 21 ADD_EXECUTABLE(TestEvents ${TEST_EVENTS_SOURCES}) 22 TARGET_LINK_LIBRARIES(TestEvents ${TESTS_LIBRARIES}) 22 ADD_TEST(Events TestEvents) 23 23 24 ADD_TEST(Events TestEvents) 24 SET(TEST_WORLD_SOURCES test_sim2_world.cpp) 25 ADD_EXECUTABLE(TestWorld ${TEST_WORLD_SOURCES}) 26 TARGET_LINK_LIBRARIES(TestWorld ${TESTS_LIBRARIES}) 25 27 26 SET(TEST_WORLD_SOURCES test_sim2_world.cpp) 27 ADD_EXECUTABLE(TestWorld ${TEST_WORLD_SOURCES}) 28 TARGET_LINK_LIBRARIES(TestWorld ${TESTS_LIBRARIES}) 28 ADD_TEST(World TestWorld) 29 29 30 ADD_TEST(World TestWorld) 30 SET(TEST_SENSOR_SOURCES test_sim2_sensor.cpp) 31 ADD_EXECUTABLE(TestSensor ${TEST_SENSOR_SOURCES}) 32 TARGET_LINK_LIBRARIES(TestSensor ${TESTS_LIBRARIES}) 31 33 32 SET(TEST_SENSOR_SOURCES test_sim2_sensor.cpp) 33 ADD_EXECUTABLE(TestSensor ${TEST_SENSOR_SOURCES}) 34 TARGET_LINK_LIBRARIES(TestSensor ${TESTS_LIBRARIES}) 34 ADD_TEST(Sensor TestSensor) 35 35 36 ADD_TEST(Sensor TestSensor) 36 SET(TEST_COLLISION_SENSOR_SOURCES test_sim2_collision_sensor.cpp) 37 ADD_EXECUTABLE(TestCollisionSensor ${TEST_COLLISION_SENSOR_SOURCES}) 38 TARGET_LINK_LIBRARIES(TestCollisionSensor ${TESTS_LIBRARIES}) 37 39 38 SET(TEST_COLLISION_SENSOR_SOURCES test_sim2_collision_sensor.cpp) 39 ADD_EXECUTABLE(TestCollisionSensor ${TEST_COLLISION_SENSOR_SOURCES}) 40 TARGET_LINK_LIBRARIES(TestCollisionSensor ${TESTS_LIBRARIES}) 40 ADD_TEST(CollisionSensor TestCollisionSensor) 41 41 42 ADD_TEST(CollisionSensor TestCollisionSensor)43 44 ELSE(USE_SIM2)45 46 SET(TEST_BUILD_SOURCES test_build.cpp)47 ADD_EXECUTABLE(TestBuild ${TEST_BUILD_SOURCES})48 TARGET_LINK_LIBRARIES(TestBuild ${TESTS_LIBRARIES})49 50 SET(TEST_ICHEMICAL_SIGNAL_SOURCES test_ichemical_signal.cpp)51 ADD_EXECUTABLE(TestIChemicalSignal ${TEST_ICHEMICAL_SIGNAL_SOURCES})52 TARGET_LINK_LIBRARIES(TestIChemicalSignal ${TESTS_LIBRARIES})53 54 SET(TEST_ISENSOR_SOURCES test_isensor.cpp)55 ADD_EXECUTABLE(TestISensor ${TEST_ISENSOR_SOURCES})56 TARGET_LINK_LIBRARIES(TestISensor ${TESTS_LIBRARIES})57 58 SET(TEST_ACTUATOR_SOURCES test_actuator.cpp)59 ADD_EXECUTABLE(TestActuator ${TEST_ACTUATOR_SOURCES})60 TARGET_LINK_LIBRARIES(TestActuator ${TESTS_LIBRARIES})61 62 SET(TEST_IANIMAT_SOURCES test_ianimat.cpp)63 ADD_EXECUTABLE(TestIAnimat ${TEST_IANIMAT_SOURCES})64 TARGET_LINK_LIBRARIES(TestIAnimat ${TESTS_LIBRARIES})65 66 SET(TEST_IWORLD_SOURCES test_iworld.cpp)67 ADD_EXECUTABLE(TestIWorld ${TEST_IWORLD_SOURCES})68 TARGET_LINK_LIBRARIES(TestIWorld ${TESTS_LIBRARIES})69 70 SET(TEST_SENSOR_SOURCES test_sensor.cpp)71 ADD_EXECUTABLE(TestSensor ${TEST_SENSOR_SOURCES})72 TARGET_LINK_LIBRARIES(TestSensor ${TESTS_LIBRARIES})73 74 SET(TEST_EVENTS_SOURCES test_events.cpp)75 ADD_EXECUTABLE(TestEvents ${TEST_EVENTS_SOURCES})76 TARGET_LINK_LIBRARIES(TestEvents ${TESTS_LIBRARIES})77 78 SET(TEST_CHEMICAL_SIGNAL_SOURCES test_chemical_signal.cpp)79 ADD_EXECUTABLE(TestChemicalSignal ${TEST_CHEMICAL_SIGNAL_SOURCES})80 TARGET_LINK_LIBRARIES(TestChemicalSignal ${TESTS_LIBRARIES})81 82 ADD_TEST(Build TestBuild)83 ADD_TEST(IChemicalSignal TestIChemicalSignal)84 ADD_TEST(ISensor TestISensor)85 ADD_TEST(Actuator TestActuator)86 ADD_TEST(IAnimat TestIAnimat)87 ADD_TEST(IWorld TestIWorld)88 ADD_TEST(Sensor TestSensor)89 ADD_TEST(Events TestEvents)90 ADD_TEST(ChemicalSignal TestChemicalSignal)91 92 ENDIF(USE_SIM2)93 trunk/src/tests/test_sim2_build.cpp
r175 r193 4 4 #include <boost/thread.hpp> 5 5 6 #include <waterworld/ sim2/World.h>6 #include <waterworld/waterworld.h> 7 7 8 8 static bool g_run = false; trunk/src/waterworld/CMakeLists.txt
r175 r193 5 5 ENDMACRO(INCLUDE_WATERWORLD_DIR) 6 6 7 IF(USE_SIM2)8 7 INCLUDE_WATERWORLD_DIR(sim2) 9 ELSE()10 INCLUDE_WATERWORLD_DIR(simulation)11 ENDIF()12 8 13 9 ADD_LIBRARY(${WATERWORLD_LIBRARY} ${WATERWORLD_SOURCES})
