Commit d9a7b185 authored by Mohcine Chraibi's avatar Mohcine Chraibi

Formatting Code

The goal of this commit is always to make  diffs unambiguous by
2. Untabifying all files
1. Indent all files by using 4 spaces

Please adapt you editor so that it uses NO tabs  and only 4 spaces for indenting
parent 7c16ba28
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
# -DCMAKE_CXX_COMPILER:STRING=clang++ -DCMAKE_C_COMPILER:STRING=clang . # -DCMAKE_CXX_COMPILER:STRING=clang++ -DCMAKE_C_COMPILER:STRING=clang .
# -DCMAKE_BUILD_TYPE:STRING=Debug (default Release) # -DCMAKE_BUILD_TYPE:STRING=Debug (default Release)
# -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON (default OFF) # -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON (default OFF)
# -DBUILD_TESTING=ON (default OFF)
#-------------------------------------------------------------------------- #--------------------------------------------------------------------------
cmake_minimum_required(VERSION 2.8 FATAL_ERROR) cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
...@@ -16,12 +17,11 @@ set(JPSCORE_VERSION ...@@ -16,12 +17,11 @@ set(JPSCORE_VERSION
${JPSCORE_MAJOR_VERSION}.${JPSCORE_MINOR_VERSION}.${JPSCORE_PATCH_VERSION}) ${JPSCORE_MAJOR_VERSION}.${JPSCORE_MINOR_VERSION}.${JPSCORE_PATCH_VERSION})
message( STATUS "JPSCORE_VERSION: " ${JPSCORE_VERSION} ) message( STATUS "JPSCORE_VERSION: " ${JPSCORE_VERSION} )
# # configure_file ( if(NOT BUILD_TESTING)
# # "${CMAKE_SOURCE_DIR}/Config.h.in" set(BUILD_TESTING OFF)
# # "${CMAKE_BINARY_DIR}/Config.h" endif(NOT BUILD_TESTING)
# # )
# #include_directories ("${CMAKE_BINARY_DIR}")
message( STATUS "BUILD_TESTING: " ${BUILD_TESTING} )
if(NOT DEFINED PROCESSOR_COUNT) if(NOT DEFINED PROCESSOR_COUNT)
# Unknown: # Unknown:
set(PROCESSOR_COUNT 0) set(PROCESSOR_COUNT 0)
...@@ -33,15 +33,6 @@ if(NOT DEFINED PROCESSOR_COUNT) ...@@ -33,15 +33,6 @@ if(NOT DEFINED PROCESSOR_COUNT)
list(LENGTH procs PROCESSOR_COUNT) list(LENGTH procs PROCESSOR_COUNT)
endif(EXISTS "${cpuinfo_file}") endif(EXISTS "${cpuinfo_file}")
# Mac:
# if(APPLE)
# find_program(cmd_sys_pro "system_profiler")
# if(cmd_sys_pro)
# execute_process(COMMAND ${cmd_sys_pro} OUTPUT_VARIABLE info)
# string(REGEX REPLACE "^.*Total Number Of Cores: ([0-9]+).*$" "\\1"
# PROCESSOR_COUNT "${info}")
# endif(cmd_sys_pro)
# endif(APPLE)
# Windows: # Windows:
if(WIN32) if(WIN32)
...@@ -50,8 +41,6 @@ if(NOT DEFINED PROCESSOR_COUNT) ...@@ -50,8 +41,6 @@ if(NOT DEFINED PROCESSOR_COUNT)
endif(NOT DEFINED PROCESSOR_COUNT) endif(NOT DEFINED PROCESSOR_COUNT)
if(PROCESSOR_COUNT) if(PROCESSOR_COUNT)
# add 1 should be magic! http://www.kitware.com/blog/home/post/63
#math(EXPR PROCESSOR_COUNT "${PROCESSOR_COUNT} + 1")
message( STATUS "PROCESSOR_COUNT: " ${PROCESSOR_COUNT}) message( STATUS "PROCESSOR_COUNT: " ${PROCESSOR_COUNT})
set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}") set(CTEST_BUILD_FLAGS "-j${PROCESSOR_COUNT}")
endif(PROCESSOR_COUNT) endif(PROCESSOR_COUNT)
...@@ -104,8 +93,7 @@ FIND_PACKAGE(CGAL QUIET) ...@@ -104,8 +93,7 @@ FIND_PACKAGE(CGAL QUIET)
if(CGAL_FOUND) if(CGAL_FOUND)
include (${CGAL_USE_FILE}) include (${CGAL_USE_FILE})
INCLUDE_DIRECTORIES(${CGAL_CORE_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CGAL_CORE_INCLUDE_DIR})
add_definitions(-D_CGAL=1) add_definitions(-D_CGAL=1)
target_link_libraries (jpscore ${CGAL_CORE_LIBRARY})
message (SEND_ERROR "${CGAL_FOUND}") message (SEND_ERROR "${CGAL_FOUND}")
message (FATAL_ERROR "${CGAL_CORE_INCLUDE_DIR}") message (FATAL_ERROR "${CGAL_CORE_INCLUDE_DIR}")
message (SEND_ERROR " Erreur: ${CGAL_FOUND}") message (SEND_ERROR " Erreur: ${CGAL_FOUND}")
...@@ -115,7 +103,10 @@ else(CGAL_FOUND) ...@@ -115,7 +103,10 @@ else(CGAL_FOUND)
endif(CGAL_FOUND) endif(CGAL_FOUND)
# test files: all cpp-files in Utest # test files: all cpp-files in Utest
file(GLOB test_files "${CMAKE_TEST_DIR}/*.cpp") if(BUILD_TESTING)
file(GLOB test_files "${CMAKE_TEST_DIR}/*.cpp")
endif(BUILD_TESTING)
set ( source_files set ( source_files
main.cpp main.cpp
Simulation.cpp Simulation.cpp
...@@ -269,7 +260,7 @@ set ( header_files ...@@ -269,7 +260,7 @@ set ( header_files
add_library ( core SHARED ${source_files} ) add_library ( core SHARED ${source_files} )
#add_library(core OBJECT ${source_files} ${header_files})
#Target #Target
add_executable( add_executable(
jpscore main.cpp jpscore main.cpp
...@@ -303,33 +294,33 @@ else(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE MATCHES Debug) ...@@ -303,33 +294,33 @@ else(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE MATCHES Debug)
endif(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE MATCHES Debug) endif(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE MATCHES Debug)
# ----------------------------- cTest ------------------------------------------ # ----------------------------- cTest ------------------------------------------
enable_testing() #adds another build target, which is test for Makefile generators if(BUILD_TESTING)
include(CTest) #adding Dart support enable_testing() #adds another build target, which is test for Makefile generators
include(CTest) #adding Dart support
#test if code compiles and runs default setting. Takes about 30 seconds
add_test (jpscore_compile ${CMAKE_CTEST_COMMAND} #test if code compiles and runs default setting. Takes about 30 seconds
--build-and-test "${CMAKE_SOURCE_DIR}" "${EXECUTABLE_OUTPUT_PATH}" #"${CMAKE_BINARY_DIR}" add_test (jpscore_compile ${CMAKE_CTEST_COMMAND}
--build-generator ${CMAKE_GENERATOR} --build-and-test "${CMAKE_SOURCE_DIR}" "${EXECUTABLE_OUTPUT_PATH}" #"${CMAKE_BINARY_DIR}"
--build-makeprogram ${CMAKE_MAKE_PROGRAM} -j${PROCESSOR_COUNT} --build-generator ${CMAKE_GENERATOR}
--build-two-config --build-makeprogram ${CMAKE_MAKE_PROGRAM} -j${PROCESSOR_COUNT}
--build-exe-dir ${EXECUTABLE_OUTPUT_PATH} # todo wo soll der exe hin?: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} --build-two-config
--build-project JPScore --build-exe-dir ${EXECUTABLE_OUTPUT_PATH} # todo wo soll der exe hin?: ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
--test-command jpscore --ini=${CMAKE_SOURCE_DIR}/inputfiles/Default/ini.xml --build-project JPScore
) --test-command jpscore --ini=${CMAKE_SOURCE_DIR}/inputfiles/Default/ini.xml
)
foreach (test_src ${test_files}) foreach (test_src ${test_files})
GET_FILENAME_COMPONENT(test ${test_src} NAME_WE) GET_FILENAME_COMPONENT(test ${test_src} NAME_WE)
add_executable( ${test} ${test_src}) add_executable( ${test} ${test_src})
target_link_libraries (${test} core) target_link_libraries (${test} core)
add_test(NAME ${test} COMMAND ${test}) add_test(NAME ${test} COMMAND ${test})
endforeach(test_src ${test_files}) endforeach(test_src ${test_files})
find_package(PythonInterp)
find_package(PythonInterp) if(PYTHONINTERP_FOUND)
if(PYTHONINTERP_FOUND) message(STATUS "Found Python: " ${PYTHON_EXECUTABLE})
message(STATUS "Found Python: " ${PYTHON_EXECUTABLE}) message(STATUS "run: " ${CMAKE_SOURCE_DIR}/Utest/testflow.py)
message(STATUS "run: " ${CMAKE_SOURCE_DIR}/Utest/testflow.py) set (test_parameters "${CMAKE_SOURCE_DIR}")
set (test_parameters "${CMAKE_SOURCE_DIR}") add_test(NAME flow COMMAND "${CMAKE_TEST_DIR}/testflow.py" "${test_parameters}")
add_test(NAME flow COMMAND "${CMAKE_TEST_DIR}/testflow.py" "${test_parameters}") endif(PYTHONINTERP_FOUND)
#add_test(testtime "${CMAKE_SOURCE_DIR}/Utest/run.py") endif(BUILD_TESTING)
endif(PYTHONINTERP_FOUND)
...@@ -37,263 +37,263 @@ using namespace std; ...@@ -37,263 +37,263 @@ using namespace std;
IODispatcher::IODispatcher() { IODispatcher::IODispatcher() {
pHandlers = vector<OutputHandler*>(); pHandlers = vector<OutputHandler*>();
} }
IODispatcher::~IODispatcher() { IODispatcher::~IODispatcher() {
for (int i = 0; i < (int) pHandlers.size(); i++) for (int i = 0; i < (int) pHandlers.size(); i++)
delete pHandlers[i]; delete pHandlers[i];
pHandlers.clear(); pHandlers.clear();
} }
void IODispatcher::AddIO(OutputHandler* ioh) { void IODispatcher::AddIO(OutputHandler* ioh) {
pHandlers.push_back(ioh); pHandlers.push_back(ioh);
} }
const vector<OutputHandler*>& IODispatcher::GetIOHandlers() { const vector<OutputHandler*>& IODispatcher::GetIOHandlers() {
return pHandlers; return pHandlers;
} }
void IODispatcher::Write(const std::string& str) { void IODispatcher::Write(const std::string& str) {
for (vector<OutputHandler*>::iterator it = pHandlers.begin(); for (vector<OutputHandler*>::iterator it = pHandlers.begin();
it != pHandlers.end(); ++it) { it != pHandlers.end(); ++it) {
(*it)->Write(str); (*it)->Write(str);
} }
} }
string IODispatcher::WritePed(Pedestrian* ped) { string IODispatcher::WritePed(Pedestrian* ped) {
double RAD2DEG = 180.0 / M_PI; double RAD2DEG = 180.0 / M_PI;
char tmp[CLENGTH] = ""; char tmp[CLENGTH] = "";
double v0 = ped->GetV0Norm(); double v0 = ped->GetV0Norm();
if (v0 == 0.0) { if (v0 == 0.0) {
Log->Write("ERROR: IODispatcher::WritePed()\t v0=0"); Log->Write("ERROR: IODispatcher::WritePed()\t v0=0");
exit(0); exit(0);
} }
double v = ped->GetV().Norm(); double v = ped->GetV().Norm();
int color = (int) (v / v0 * 255); int color = (int) (v / v0 * 255);
if(ped->GetSpotlight()==false) color=-1; if(ped->GetSpotlight()==false) color=-1;
double a = ped->GetLargerAxis(); double a = ped->GetLargerAxis();
double b = ped->GetSmallerAxis(); double b = ped->GetSmallerAxis();
double phi = atan2(ped->GetEllipse().GetSinPhi(), ped->GetEllipse().GetCosPhi()); double phi = atan2(ped->GetEllipse().GetSinPhi(), ped->GetEllipse().GetCosPhi());
sprintf(tmp, "<agent ID=\"%d\"\t" sprintf(tmp, "<agent ID=\"%d\"\t"
"xPos=\"%.2f\"\tyPos=\"%.2f\"\t" "xPos=\"%.2f\"\tyPos=\"%.2f\"\t"
"zPos=\"%.2f\"\t" "zPos=\"%.2f\"\t"
"radiusA=\"%.2f\"\tradiusB=\"%.2f\"\t" "radiusA=\"%.2f\"\tradiusB=\"%.2f\"\t"
"ellipseOrientation=\"%.2f\" ellipseColor=\"%d\"/>\n", "ellipseOrientation=\"%.2f\" ellipseColor=\"%d\"/>\n",
ped->GetID(), (ped->GetPos().GetX()) * FAKTOR, ped->GetID(), (ped->GetPos().GetX()) * FAKTOR,
(ped->GetPos().GetY()) * FAKTOR,(ped->GetElevation()+0.3) * FAKTOR ,a * FAKTOR, b * FAKTOR, (ped->GetPos().GetY()) * FAKTOR,(ped->GetElevation()+0.3) * FAKTOR ,a * FAKTOR, b * FAKTOR,
phi * RAD2DEG, color); phi * RAD2DEG, color);
return tmp; return tmp;
} }
void IODispatcher::WriteHeader(int nPeds, double fps, Building* building, int seed ) { void IODispatcher::WriteHeader(int nPeds, double fps, Building* building, int seed ) {
nPeds = building->GetNumberOfPedestrians(); nPeds = building->GetNumberOfPedestrians();
string tmp; string tmp;
tmp = tmp =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" "<trajectories>\n"; "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" "<trajectories>\n";
char agents[CLENGTH] = ""; char agents[CLENGTH] = "";
sprintf(agents, "\t<header version = \"%s\">\n", JPS_VERSION); sprintf(agents, "\t<header version = \"%s\">\n", JPS_VERSION);
tmp.append(agents); tmp.append(agents);
sprintf(agents, "\t\t<agents>%d</agents>\n", nPeds); sprintf(agents, "\t\t<agents>%d</agents>\n", nPeds);
tmp.append(agents); tmp.append(agents);
sprintf(agents, "\t\t<seed>%d</seed>\n", seed); sprintf(agents, "\t\t<seed>%d</seed>\n", seed);
tmp.append(agents); tmp.append(agents);
sprintf(agents, "\t\t<frameRate>%f</frameRate>\n", fps); sprintf(agents, "\t\t<frameRate>%f</frameRate>\n", fps);
tmp.append(agents); tmp.append(agents);
tmp.append("\t</header>\n"); tmp.append("\t</header>\n");
Write(tmp); Write(tmp);
} }
void IODispatcher::WriteGeometry(Building* building) { void IODispatcher::WriteGeometry(Building* building) {
// just put a link to the geometry file // just put a link to the geometry file
string embed_geometry; string embed_geometry;
embed_geometry.append("\t<geometry>\n"); embed_geometry.append("\t<geometry>\n");
char file_location[CLENGTH] = ""; char file_location[CLENGTH] = "";
sprintf(file_location, "\t<file location= \"%s\"/>\n", building->GetGeometryFilename().c_str()); sprintf(file_location, "\t<file location= \"%s\"/>\n", building->GetGeometryFilename().c_str());
embed_geometry.append(file_location); embed_geometry.append(file_location);
embed_geometry.append("\t</geometry>\n"); embed_geometry.append("\t</geometry>\n");
//Write(embed_geometry); //Write(embed_geometry);
//return; //return;
// //
string geometry; string geometry;
geometry.append("\t<geometry>\n"); geometry.append("\t<geometry>\n");
bool plotHlines = true; bool plotHlines = true;
bool plotCrossings = true; bool plotCrossings = true;
bool plotTransitions = true; bool plotTransitions = true;
bool plotPlayingField=false; bool plotPlayingField=false;
vector<string> rooms_to_plot; vector<string> rooms_to_plot;
//Promenade //Promenade
//rooms_to_plot.push_back("outside"); //rooms_to_plot.push_back("outside");
//rooms_to_plot.push_back("010"); //rooms_to_plot.push_back("010");
// first the rooms // first the rooms
//to avoid writing navigation line twice //to avoid writing navigation line twice
vector<int> navLineWritten; vector<int> navLineWritten;
for (int i = 0; i < building->GetNumberOfRooms(); i++) { for (int i = 0; i < building->GetNumberOfRooms(); i++) {
Room* r = building->GetRoom(i); Room* r = building->GetRoom(i);
string caption = r->GetCaption(); //if(r->GetID()!=1) continue; string caption = r->GetCaption(); //if(r->GetID()!=1) continue;
if (rooms_to_plot.empty() == false) if (rooms_to_plot.empty() == false)
if (IsElementInVector(rooms_to_plot, caption) == false) if (IsElementInVector(rooms_to_plot, caption) == false)
continue; continue;
for (int k = 0; k < r->GetNumberOfSubRooms(); k++) { for (int k = 0; k < r->GetNumberOfSubRooms(); k++) {
SubRoom* s = r->GetSubRoom(k); //if(s->GetSubRoomID()!=0) continue; SubRoom* s = r->GetSubRoom(k); //if(s->GetSubRoomID()!=0) continue;
geometry.append(s->WriteSubRoom()); geometry.append(s->WriteSubRoom());
// the hlines // the hlines
if (plotHlines) { if (plotHlines) {
const vector<Hline*>& hlines = s->GetAllHlines(); const vector<Hline*>& hlines = s->GetAllHlines();
for (unsigned int i = 0; i < hlines.size(); i++) { for (unsigned int i = 0; i < hlines.size(); i++) {
Hline* hline = hlines[i]; Hline* hline = hlines[i];
int uid1 = hline->GetUniqueID(); int uid1 = hline->GetUniqueID();
if (!IsElementInVector(navLineWritten, uid1)) { if (!IsElementInVector(navLineWritten, uid1)) {
navLineWritten.push_back(uid1); navLineWritten.push_back(uid1);
if (rooms_to_plot.empty() if (rooms_to_plot.empty()
|| IsElementInVector(rooms_to_plot, caption)) { || IsElementInVector(rooms_to_plot, caption)) {
geometry.append(hline->WriteElement()); geometry.append(hline->WriteElement());
} }
} }
} }
// the crossings // the crossings
if (plotCrossings) { if (plotCrossings) {
const vector<Crossing*>& crossings = s->GetAllCrossings(); const vector<Crossing*>& crossings = s->GetAllCrossings();
for (unsigned int i = 0; i < crossings.size(); i++) { for (unsigned int i = 0; i < crossings.size(); i++) {
Crossing* crossing = crossings[i]; Crossing* crossing = crossings[i];
int uid1 = crossing->GetUniqueID(); int uid1 = crossing->GetUniqueID();
if (!IsElementInVector(navLineWritten, uid1)) { if (!IsElementInVector(navLineWritten, uid1)) {
navLineWritten.push_back(uid1); navLineWritten.push_back(uid1);
if (rooms_to_plot.empty() if (rooms_to_plot.empty()
|| IsElementInVector(rooms_to_plot, || IsElementInVector(rooms_to_plot,
caption)) { caption)) {
geometry.append(crossing->WriteElement()); geometry.append(crossing->WriteElement());
} }
} }
} }
} }
// the transitions // the transitions
if (plotTransitions) { if (plotTransitions) {
const vector<Transition*>& transitions = const vector<Transition*>& transitions =
s->GetAllTransitions(); s->GetAllTransitions();
for (unsigned int i = 0; i < transitions.size(); i++) { for (unsigned int i = 0; i < transitions.size(); i++) {
Transition* transition = transitions[i]; Transition* transition = transitions[i];
int uid1 = transition->GetUniqueID(); int uid1 = transition->GetUniqueID();
if (!IsElementInVector(navLineWritten, uid1)) { if (!IsElementInVector(navLineWritten, uid1)) {
navLineWritten.push_back(uid1); navLineWritten.push_back(uid1);
if (rooms_to_plot.empty()) { if (rooms_to_plot.empty()) {
geometry.append(transition->WriteElement()); geometry.append(transition->WriteElement());
} else { } else {
Room* room1 = transition->GetRoom1(); Room* room1 = transition->GetRoom1();
Room* room2 = transition->GetRoom2(); Room* room2 = transition->GetRoom2();
string caption1 = room1->GetCaption(); string caption1 = room1->GetCaption();
if (room2) { if (room2) {
string caption2 = room2->GetCaption(); string caption2 = room2->GetCaption();
if (IsElementInVector(rooms_to_plot, if (IsElementInVector(rooms_to_plot,
caption1) caption1)
|| IsElementInVector(rooms_to_plot, || IsElementInVector(rooms_to_plot,
caption2)) { caption2)) {
geometry.append(transition->WriteElement()); geometry.append(transition->WriteElement());
} }
} else { } else {
if (IsElementInVector(rooms_to_plot, if (IsElementInVector(rooms_to_plot,
caption1)) { caption1)) {
geometry.append(transition->WriteElement()); geometry.append(transition->WriteElement());
} }
} }
} }
} }
} }
} }
} }
} }
} }
//eventually write any goal //eventually write any goal
for (map<int, Goal*>::const_iterator itr = building->GetAllGoals().begin(); for (map<int, Goal*>::const_iterator itr = building->GetAllGoals().begin();
itr != building->GetAllGoals().end(); ++itr) { itr != building->GetAllGoals().end(); ++itr) {
geometry.append(itr->second->Write()); geometry.append(itr->second->Write());
} }
if(plotPlayingField){ if(plotPlayingField){
//add the playing area //add the playing area
double width=3282; double width=3282;
double length=5668; double length=5668;
char tmp[100]; char tmp[100];
geometry.append("\t\t<wall>\n"); geometry.append("\t\t<wall>\n");
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",-length,width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",-length,width);
geometry.append(tmp); geometry.append(tmp);
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",-length,-width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",-length,-width);
geometry.append(tmp); geometry.append(tmp);
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",length,-width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",length,-width);
geometry.append(tmp); geometry.append(tmp);
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",length,width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",length,width);
geometry.append(tmp); geometry.append(tmp);
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",-length,width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",-length,width);
geometry.append(tmp); geometry.append(tmp);
geometry.append("\t\t</wall>\n"); geometry.append("\t\t</wall>\n");
geometry.append("\t\t<wall>\n"); geometry.append("\t\t<wall>\n");
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",0.0,width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",0.0,width);
geometry.append(tmp); geometry.append(tmp);
sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",0.0,-width); sprintf(tmp, "\t\t\t<point xPos=\"%.2f\" yPos=\"%.2f\"/>\n",0.0,-width);
geometry.append(tmp); geometry.append(tmp);
geometry.append("\t\t</wall>\n"); geometry.append("\t\t</wall>\n");
} }
geometry.append("\t</geometry>\n"); geometry.append("\t</geometry>\n");
Write(geometry); Write(geometry);
} }
void IODispatcher::WriteFrame(int frameNr, Building* building) { void IODispatcher::WriteFrame(int frameNr, Building* building) {