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

Method PostPhysicsUpdate

trinity/Interior/Tr2InteriorPlaceable.cpp:147–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void Tr2InteriorPlaceable::PostPhysicsUpdate( Be::Time time, Tr2ApexScene* apexScene )
148{
149 if( m_placeableRes )
150 {
151 for( TriCurveSetVector::const_iterator it = m_placeableRes->GetCurveSets()->begin(); it != m_placeableRes->GetCurveSets()->end(); ++it )
152 {
153 ( *it )->Update( TimeAsDouble( time ) );
154 }
155 }
156
157 m_cellReflectionTime += TimeAsFloat( time - m_previousUpdateTime );
158 if( m_cellReflectionTime > 1.0f )
159 {
160 // This is to support 1 reflection map per placeable
161 if( !m_transitionFinished )
162 {
163 std::swap( m_cellReflectionMaps[0], m_cellReflectionMaps[1] );
164 m_transitionFinished = true;
165 }
166 }
167 m_variableStore->RegisterVariable( "CellReflectionMap", m_cellReflectionMaps[0] );
168 m_variableStore->RegisterVariable( "CellReflection2ndMap", m_cellReflectionMaps[1] );
169 m_variableStore->RegisterVariable( "CellReflectionInterpolation", m_cellReflectionTime );
170 m_previousUpdateTime = time;
171}
172
173// --------------------------------------------------------------------------------------
174// Description:

Callers

nothing calls this directly

Calls 6

swapFunction · 0.85
GetCurveSetsMethod · 0.80
RegisterVariableMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected