Changed the logging system to be more flexible and to support world synch logging

This commit is contained in:
Mark Vejvoda
2010-04-27 03:36:36 +00:00
parent 024f86ce7c
commit 6d4838f470
10 changed files with 215 additions and 47 deletions

View File

@@ -15,6 +15,8 @@
#include "streflop_cond.h"
//#include <cmath>
#include <string>
#include <sstream>
namespace Shared{ namespace Graphics{
@@ -133,6 +135,12 @@ public:
x/= m;
y/= m;
}
std::string getString() {
std::ostringstream streamOut;
streamOut << "x [" << x << "] y [" << y << "]";
return streamOut.str();
}
};
typedef Vec2<int> Vec2i;
@@ -298,6 +306,12 @@ public:
return rv;
}
std::string getString() {
std::ostringstream streamOut;
streamOut << "x [" << x << "] y [" << y << "] z [" << z << "]";
return streamOut.str();
}
};
typedef Vec3<int> Vec3i;
@@ -431,6 +445,13 @@ public:
T dot(const Vec4<T> &v) const{
return x*v.x + y*v.y + z*v.z + w*v.w;
}
std::string getString() {
std::ostringstream streamOut;
streamOut << "x [" << x << "] y [" << y << "] z [" << z << "] w [" << w << "]";
return streamOut.str();
}
};
typedef Vec4<int> Vec4i;