32 #include <glm/glm.hpp>
34 #include <boost/log/trivial.hpp>
35 #include <boost/filesystem.hpp>
36 #include <boost/filesystem/fstream.hpp>
37 #define BOOST_ASSERT_MSG_OSTREAM std::cout
38 #include <boost/assert.hpp>
41 #define DEFINE_TO_QUOTED_STR( d ) #d
66 unsigned int hashCode(
const double d);
69 std::ostream &
operator<< ( std::ostream &os,
const glm::vec2 &vec2);
70 std::istream &
operator>> ( std::istream &is, glm::vec2 &vec2);
72 std::ostream &
operator<< ( std::ostream &os,
const glm::vec3 &vec3);
73 std::istream &
operator>> ( std::istream &is, glm::vec3 &vec3);
75 std::ostream &
operator<< ( std::ostream &os,
const glm::vec4 &vec4);
76 std::istream &
operator<< ( std::istream &is, glm::vec4 &vec4);
79 std::ostream &
operator<< ( std::ostream &os,
const glm::mat3 &m);
80 std::istream &
operator>> ( std::istream &is, glm::mat3 &m);
82 std::ostream &
operator<< ( std::ostream &os,
const glm::mat4 &m);
83 std::istream &
operator>> ( std::istream &is, glm::mat4 &m);
102 bool returnFalseOnSemiColon =
false);
116 std::vector< std::vector< std::string > >
readDelimitedData(
const std::string &csvString,
117 const std::string &delimiter,
118 bool removeQuotes=
true);
123 const std::string& delimiter=std::string(
" "));
138 static inline bool retypeString(
const std::string &str, T &val) {
139 std::istringstream is(str.c_str());
142 BOOST_LOG_TRIVIAL(error) <<
"Error retyping string: " <<str
157 int findNth(
const std::string &str,
const std::string &substr,
const int n);
163 int insertBeforeElementNum)
165 debugAssert(insertBeforeElementNum >= 0);
166 debugAssert(insertBeforeElementNum <= inputArray.size());
170 for (
int i=0;i<insertBeforeElementNum;i++)
171 anew.push_back(inputArray[i]);
173 anew.push_back(newElement);
175 for (
int i=insertBeforeElementNum;i<inputArray.size();i++)
176 anew.push_back(inputArray[i]);
178 debugAssert(anew.size() == (inputArray.size() + 1));