MCPcopy Create free account
hub / github.com/carbonengine/trinity / GetRangeDuration

Method GetRangeDuration

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:3500–3525  ·  view source on GitHub ↗

--------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3498
3499// --------------------------------------------------------------------------------
3500float EveSpaceObject2::GetRangeDuration( const std::string& name, const std::string& rangeName ) const
3501{
3502 float maxDuration = 0.f;
3503 for( auto it = m_curveSets.begin(); it != m_curveSets.end(); it++ )
3504 {
3505 if( ( *it )->GetName() == name )
3506 {
3507 maxDuration = max( maxDuration, ( *it )->GetRangeDuration( rangeName.c_str() ) );
3508 }
3509 }
3510 for( auto childIt = m_children.begin(); childIt != m_children.end(); childIt++ )
3511 {
3512 if( auto owner = dynamic_cast<ITr2CurveSetOwner*>( *childIt ) )
3513 {
3514 maxDuration = max( maxDuration, owner->GetRangeDuration( name, rangeName ) );
3515 }
3516 }
3517 for( auto childIt = m_effectChildren.begin(); childIt != m_effectChildren.end(); childIt++ )
3518 {
3519 if( auto owner = dynamic_cast<ITr2CurveSetOwner*>( *childIt ) )
3520 {
3521 maxDuration = max( maxDuration, owner->GetRangeDuration( name, rangeName ) );
3522 }
3523 }
3524 return maxDuration;
3525}
3526
3527// --------------------------------------------------------------------------------
3528// Description:

Callers

nothing calls this directly

Calls 3

beginMethod · 0.45
endMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected