| 271 | | |
| 272 | | while (arguments.read("-t",str)) |
| 273 | | { |
| 274 | | osg::Vec3 trans(0,0,0); |
| 275 | | if( sscanf( str.c_str(), "%f,%f,%f", |
| 276 | | &trans[0], &trans[1], &trans[2] ) != 3 ) |
| 277 | | { |
| 278 | | usage( argv[0], "Translation argument format incorrect." ); |
| 279 | | return false; |
| 280 | | } |
| 281 | | oc.setTranslation( trans ); |
| 282 | | do_convert = true; |
| 283 | | } |
| | 271 | #if 0 |
| | 272 | |
| | 273 | if( nexti < argc ) |
| | 274 | { |
| | 275 | osg::Vec3 scale(0,0,0); |
| | 276 | if( sscanf( argv[nexti++], "%f,%f,%f", |
| | 277 | &scale[0], &scale[1], &scale[2] ) != 3 ) |
| | 278 | { |
| | 279 | usage( argv[0], "Scale argument format incorrect." ); |
| | 280 | return false; |
| | 281 | } |
| | 282 | oc.setScale( scale ); |
| | 283 | do_convert = true; |
| | 284 | } |
| | 285 | else |
| | 286 | { |
| | 287 | usage( argv[0], "Scale conversion option requires an argument." ); |
| | 288 | return false; |
| | 289 | } |
| | 290 | break; |
| | 291 | #endif |
| | 322 | |
| | 323 | while (arguments.read("-s",str)) |
| | 324 | { |
| | 325 | osg::Vec3 scale(0,0,0); |
| | 326 | if( sscanf( str.c_str(), "%f,%f,%f", |
| | 327 | &scale[0], &scale[1], &scale[2] ) != 3 ) |
| | 328 | { |
| | 329 | usage( argv[0], "Scale argument format incorrect." ); |
| | 330 | return 1; |
| | 331 | } |
| | 332 | oc.setScale( scale ); |
| | 333 | do_convert = true; |
| | 334 | } |
| | 335 | |
| | 336 | while (arguments.read("-t",str)) |
| | 337 | { |
| | 338 | osg::Vec3 trans(0,0,0); |
| | 339 | if( sscanf( str.c_str(), "%f,%f,%f", |
| | 340 | &trans[0], &trans[1], &trans[2] ) != 3 ) |
| | 341 | { |
| | 342 | usage( argv[0], "Translation argument format incorrect." ); |
| | 343 | return 1; |
| | 344 | } |
| | 345 | oc.setTranslation( trans ); |
| | 346 | do_convert = true; |
| | 347 | } |
| | 348 | |