| 410 | } |
| 411 | |
| 412 | std::string NParticleReader::positionPrimVarName() |
| 413 | { |
| 414 | std::vector<std::string> names; |
| 415 | attributeNames( names ); |
| 416 | |
| 417 | // The position channel for an nParticle cache should be something like "nParticleShape1_position" |
| 418 | for( vector<string>::const_iterator it = names.begin(); it != names.end(); it++ ) |
| 419 | { |
| 420 | if( boost::algorithm::ends_with( *it, "_position") ) |
| 421 | { |
| 422 | return *it ; |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | msg( Msg::Warning, "NParticleReader::posPrimVarName()", "Cannot find name for particle position channel, using P" ); |
| 427 | return "P"; |
| 428 | } |
| 429 | |
| 430 | |
| 431 |
nothing calls this directly
no test coverage detected