- Timestamp:
- 07/10/08 15:57:47 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Environment.cpp
r2828 r2829 58 58 return false; 59 59 60 // parse vector values 60 61 Tokenize((*it).second, tokens); 61 62 62 val.x = (float)atof(tokens[ 1].c_str());63 val.y = (float)atof(tokens[ 2].c_str());64 val.z = (float)atof(tokens[ 3].c_str());63 val.x = (float)atof(tokens[0].c_str()); 64 val.y = (float)atof(tokens[1].c_str()); 65 val.z = (float)atof(tokens[2].c_str()); 65 66 66 67 return true; … … 78 79 while (fgets(str, 256, file) != NULL) 79 80 { 81 // this line is empty or a comment 82 if ((strlen(str) <= 1) || (str[0] == '#')) 83 continue; 84 80 85 static vector<string> tokens; 81 86 tokens.clear(); … … 83 88 Tokenize(str, tokens, "="); 84 89 85 // this line is a comment 86 if (tokens[0][0] == '#') 87 continue; 88 90 if (tokens.size() == 1) 91 cerr << "parsing failed at: " << tokens[0] << endl; 89 92 // store parameter 90 93 mParams[tokens[0]] = tokens[1];
Note: See TracChangeset
for help on using the changeset viewer.