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

Method UpdateAsyncronous

trinity/Eve/EveEffectRoot2.cpp:212–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void 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
260void EveEffectRoot2::UpdateVisibility( const EveUpdateContext& updateContext, const Matrix& parentTransform )
261{

Callers

nothing calls this directly

Calls 7

emptyMethod · 0.80
GetLocalToWorldTransformFunction · 0.50
GetTimeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
UpdateMethod · 0.45

Tested by

no test coverage detected