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

Method Execute

trinity/RenderJob/TriStepFilterVisibilityResults.cpp:52–87  ·  view source on GitHub ↗

------------------------------------------------------------- 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)

Source from the content-addressed store, hash-verified

50// RS_OK always
51// -------------------------------------------------------------
52TriStepResult 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:

Callers

nothing calls this directly

Calls 4

AddVisibilityEventMethod · 0.80
ClearMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected