Ignore:
Timestamp:
07/10/08 15:57:47 (16 years ago)
Author:
mattausch
Message:

worked on environment + hud

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Environment.cpp

    r2828 r2829  
    5858                return false; 
    5959         
     60        // parse vector values 
    6061        Tokenize((*it).second, tokens); 
    6162 
    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()); 
    6566 
    6667        return true; 
     
    7879        while (fgets(str, 256, file) != NULL) 
    7980        { 
     81                // this line is empty or a comment 
     82                if ((strlen(str) <= 1) || (str[0] == '#')) 
     83                        continue; 
     84 
    8085                static vector<string> tokens; 
    8186                tokens.clear(); 
     
    8388                Tokenize(str, tokens, "="); 
    8489 
    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; 
    8992                // store parameter 
    9093                mParams[tokens[0]] = tokens[1]; 
Note: See TracChangeset for help on using the changeset viewer.