Mercurial > hg > forks > gldragon
comparison dmutil.h @ 21:1404dfcee7b8
More work on scenefile and model loading support.
Can now load PLY models and simple scene definition files.
Converted dragon mesh to binary PLY format.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 22 Nov 2019 03:03:52 +0200 |
parents | a329f0216491 |
children | 03b86b9c2f29 |
comparison
equal
deleted
inserted
replaced
20:294c4c7943b5 | 21:1404dfcee7b8 |
---|---|
8 #include <vector> | 8 #include <vector> |
9 #include <cstdio> | 9 #include <cstdio> |
10 #include <iostream> | 10 #include <iostream> |
11 | 11 |
12 | 12 |
13 #define SET_WHITESPACE "\t\n\v\f\r " | 13 #define DMUTIL_WHITESPACE "\t\n\v\f\r " |
14 | 14 |
15 | 15 |
16 std::string dmStrLTrim(const std::string& str, const std::string& delim = SET_WHITESPACE); | 16 std::string dmStrLTrim(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE); |
17 std::string dmStrRTrim(const std::string& str, const std::string& delim = SET_WHITESPACE); | 17 std::string dmStrRTrim(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE); |
18 std::string dmStrTrim(const std::string& str, const std::string& delim = SET_WHITESPACE); | 18 std::string dmStrTrim(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE); |
19 | 19 |
20 std::vector<std::string> dmStrSplit(const std::string& str, const std::string& delim = SET_WHITESPACE); | 20 std::vector<std::string> dmStrSplit(const std::string& str, const std::string& delim = DMUTIL_WHITESPACE); |
21 std::string dmStrJoin(const std::vector<std::string> &list, const std::string &delim); | 21 std::string dmStrJoin(const std::vector<std::string> &list, const std::string &delim); |
22 | |
23 std::string dmGetPath(const std::string &path); | |
22 | 24 |
23 bool dmReadText(const std::string &filename, std::string &buf, const int maxSize); | 25 bool dmReadText(const std::string &filename, std::string &buf, const int maxSize); |
24 bool dmFileExists(const std::string &filename, std::ios_base::openmode mode = std::ios_base::in); | 26 bool dmFileExists(const std::string &filename, std::ios_base::openmode mode = std::ios_base::in); |
25 | 27 |
26 | 28 |