| 145 | } |
| 146 | |
| 147 | void 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: |
nothing calls this directly
no test coverage detected