Changeset 219 for osgVisual/trunk/src/core
- Timestamp:
- Feb 2, 2011, 9:59:08 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
osgVisual/trunk/src/core/visual_core.cpp
r216 r219 300 300 std::string attr_name=reinterpret_cast<const char*>(attr->name); 301 301 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 302 if( attr_name == "day" ) 303 { 304 std::stringstream sstr(attr_value); 305 sstr >> day; 306 } 307 if( attr_name == "month" ) 308 { 309 std::stringstream sstr(attr_value); 310 sstr >> month; 311 } 312 if( attr_name == "year" ) 313 { 314 std::stringstream sstr(attr_value); 315 sstr >> year; 316 } 317 if( attr_name == "hour" ) 318 { 319 std::stringstream sstr(attr_value); 320 sstr >> hour; 321 } 322 if( attr_name == "minute" ) 323 { 324 std::stringstream sstr(attr_value); 325 sstr >> minute; 326 } 302 if( attr_name == "day" ) day = util::strToInt(attr_value); 303 if( attr_name == "month" ) month = util::strToInt(attr_value); 304 if( attr_name == "year" ) year = util::strToInt(attr_value); 305 if( attr_name == "hour" ) hour = util::strToInt(attr_value); 306 if( attr_name == "minute" ) minute = util::strToInt(attr_value); 307 327 308 attr = attr->next; 328 309 } … … 343 324 std::string attr_name=reinterpret_cast<const char*>(attr->name); 344 325 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 345 if( attr_name == "range" ) 346 { 347 std::stringstream sstr(attr_value); 348 sstr >> range; 349 } 350 if( attr_name == "turbidity" ) 351 { 352 std::stringstream sstr(attr_value); 353 sstr >> turbidity; 354 } 326 if( attr_name == "range" ) range = util::strToDouble(attr_value); 327 if( attr_name == "turbidity" ) turbidity = util::strToDouble(attr_value); 328 355 329 attr = attr->next; 356 330 } … … 377 351 std::string attr_name=reinterpret_cast<const char*>(attr->name); 378 352 std::string attr_value=reinterpret_cast<const char*>(attr->children->content); 379 if( attr_name == "bottom" ) 380 { 381 std::stringstream sstr(attr_value); 382 sstr >> bottom; 383 } 384 if( attr_name == "top" ) 385 { 386 std::stringstream sstr(attr_value); 387 sstr >> top; 388 } 389 if( attr_name == "speed" ) 390 { 391 std::stringstream sstr(attr_value); 392 sstr >> speed; 393 } 394 if( attr_name == "direction" ) 395 { 396 std::stringstream sstr(attr_value); 397 sstr >> direction; 398 } 353 if( attr_name == "bottom" ) bottom = util::strToDouble(attr_value); 354 if( attr_name == "top" ) top = util::strToDouble(attr_value); 355 if( attr_name == "speed" ) speed = util::strToDouble(attr_value); 356 if( attr_name == "direction" ) direction = util::strToDouble(attr_value); 357 399 358 attr = attr->next; 400 359 }
Note: See TracChangeset
for help on using the changeset viewer.