------------------------------------------------------------- Description: Implements TriRenderStep method. Processes input visibility result list to produce a new one filtering visibility events. Removes events not present on m_eventFilter bitfield filter. For events that specifies object instances does filtering according to filter type and objects list. Arguments: time - System time (not used)
| 50 | // RS_OK always |
| 51 | // ------------------------------------------------------------- |
| 52 | TriStepResult TriStepFilterVisibilityResults::Execute( Be::Time realTime, Be::Time simTime, Tr2RenderContext& renderContext ) |
| 53 | { |
| 54 | if( m_inputResults && m_outputResults ) |
| 55 | { |
| 56 | m_outputResults->Clear(); |
| 57 | |
| 58 | const std::vector<Tr2VisibilityEvent>& events = m_inputResults->GetEvents(); |
| 59 | for( std::vector<Tr2VisibilityEvent>::const_iterator i = events.begin(); i != events.end(); ++i ) |
| 60 | { |
| 61 | if( ( i->m_eventType & m_eventFilter ) == 0 ) |
| 62 | { |
| 63 | continue; |
| 64 | } |
| 65 | |
| 66 | if( i->m_userData ) |
| 67 | { |
| 68 | if( m_filterType == EXCLUDE_OBJECTS_IN_LIST ) |
| 69 | { |
| 70 | if( m_objects.FindKey( i->m_userData ) != -1 ) |
| 71 | { |
| 72 | continue; |
| 73 | } |
| 74 | } |
| 75 | else |
| 76 | { |
| 77 | if( m_objects.FindKey( i->m_userData ) == -1 ) |
| 78 | { |
| 79 | continue; |
| 80 | } |
| 81 | } |
| 82 | } |
| 83 | m_outputResults->AddVisibilityEvent( *i ); |
| 84 | } |
| 85 | } |
| 86 | return RS_OK; |
| 87 | } |
| 88 | |
| 89 | // ------------------------------------------------------------- |
| 90 | // Description: |
nothing calls this directly
no test coverage detected