| 210 | } |
| 211 | |
| 212 | void EveEffectRoot2::UpdateAsyncronous( const EveUpdateContext& updateContext ) |
| 213 | { |
| 214 | float controllerUpdateFrequency = 0.f; |
| 215 | |
| 216 | if( m_display ) |
| 217 | { |
| 218 | if( m_dynamicLODSelection ) |
| 219 | { |
| 220 | float ht = updateContext.GetHighDetailThreshold(); |
| 221 | if( ht > 0.f ) |
| 222 | { |
| 223 | controllerUpdateFrequency = min( 1.f, m_estimatedSize / ht ); |
| 224 | } |
| 225 | } |
| 226 | else |
| 227 | { |
| 228 | controllerUpdateFrequency = 0.5f; |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | UpdateControllers( controllerUpdateFrequency ); |
| 233 | |
| 234 | Be::Time time = updateContext.GetTime(); |
| 235 | for( auto it = m_curveSets.begin(); it != m_curveSets.end(); it++ ) |
| 236 | { |
| 237 | ( *it )->Update( time, time ); |
| 238 | } |
| 239 | |
| 240 | if( !m_effectChildren.empty() ) |
| 241 | { |
| 242 | Matrix worldTransform; |
| 243 | GetLocalToWorldTransform( worldTransform ); |
| 244 | EveChildUpdateParams params; |
| 245 | params.spaceObjectParent = this; |
| 246 | params.childParent = nullptr; |
| 247 | params.boneCount = 0; |
| 248 | params.bones = nullptr; |
| 249 | params.localToWorldTransform = worldTransform; |
| 250 | params.isVisible = m_display; |
| 251 | params.controllerUpdateFrequency = controllerUpdateFrequency; |
| 252 | |
| 253 | for( auto ecIt = m_effectChildren.begin(); ecIt != m_effectChildren.end(); ++ecIt ) |
| 254 | { |
| 255 | ( *ecIt )->UpdateAsyncronous( updateContext, params ); |
| 256 | } |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | void EveEffectRoot2::UpdateVisibility( const EveUpdateContext& updateContext, const Matrix& parentTransform ) |
| 261 | { |
nothing calls this directly
no test coverage detected