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

Method UpdateShLighting

trinity/Eve/EveSpaceScene.cpp:1683–1701  ·  view source on GitHub ↗

-------------------------------------------------------------------------------------- Description: Updates SH lighing for a set of space objects. Arguments: allObjects - vector of objects in scene --------------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1681// allObjects - vector of objects in scene
1682// --------------------------------------------------------------------------------------
1683void EveSpaceScene::UpdateShLighting(
1684 const std::vector<IEveSpaceObject2*>& allObjects )
1685{
1686 CCP_STATS_SCOPED_TIME( shLightingUpdateTime );
1687
1688 if( m_shLightingManager )
1689 {
1690 Tr2ParallelFor( Tr2BlockedRange<size_t>( 0, allObjects.size(), 20 ), [&]( Tr2BlockedRange<size_t> range ) {
1691 for( auto i = range.begin(); i != range.end(); ++i )
1692 {
1693 ITr2ShLightingReceiverPtr receiver = BlueCastPtr( allObjects[i] );
1694 if( receiver != nullptr )
1695 {
1696 receiver->UpdateShLighting( *m_shLightingManager, m_updateContext );
1697 }
1698 }
1699 } );
1700 }
1701}
1702
1703// --------------------------------------------------------------------------------------
1704// Description:

Callers

nothing calls this directly

Calls 4

Tr2ParallelForFunction · 0.85
sizeMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected