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

Method GetCurveSetDuration

trinity/Eve/SpaceObject/EveSpaceObject2.cpp:3472–3497  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Get the duration of the curve set with the appropriate name --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

3470// Get the duration of the curve set with the appropriate name
3471// --------------------------------------------------------------------------------
3472float EveSpaceObject2::GetCurveSetDuration( const std::string& name ) const
3473{
3474 float maxDuration = 0.f;
3475 for( auto it = m_curveSets.begin(); it != m_curveSets.end(); it++ )
3476 {
3477 if( ( *it )->GetName() == name )
3478 {
3479 maxDuration = max( maxDuration, ( *it )->GetMaxCurveDuration() );
3480 }
3481 }
3482 for( auto childIt = m_children.begin(); childIt != m_children.end(); childIt++ )
3483 {
3484 if( auto owner = dynamic_cast<ITr2CurveSetOwner*>( *childIt ) )
3485 {
3486 maxDuration = max( maxDuration, owner->GetCurveSetDuration( name ) );
3487 }
3488 }
3489 for( auto childIt = m_effectChildren.begin(); childIt != m_effectChildren.end(); childIt++ )
3490 {
3491 if( auto owner = dynamic_cast<ITr2CurveSetOwner*>( *childIt ) )
3492 {
3493 maxDuration = max( maxDuration, owner->GetCurveSetDuration( name ) );
3494 }
3495 }
3496 return maxDuration;
3497}
3498
3499// --------------------------------------------------------------------------------
3500float EveSpaceObject2::GetRangeDuration( const std::string& name, const std::string& rangeName ) const

Callers

nothing calls this directly

Calls 4

GetMaxCurveDurationMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected