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

Method UpdateVisibility

trinity/Eve/EveLensflare.cpp:298–311  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

296}
297
298void EveLensflare::UpdateVisibility( const EveUpdateContext& updateContext )
299{
300 m_isVisible = false;
301 auto& frustum = updateContext.GetFrustum();
302 // visibility?
303 float viewDotDir = Dot( frustum.m_viewDir, m_direction );
304 m_isVisible = viewDotDir >= 0.f;
305
306 // update visibility for all the flares
307 for( EveTransformVector::const_iterator it = m_flares.begin(); it != m_flares.end(); ++it )
308 {
309 ( *it )->UpdateVisibility( updateContext, m_transform );
310 }
311}
312
313// --------------------------------------------------------------------------------
314// Description:

Callers

nothing calls this directly

Calls 4

GetFrustumMethod · 0.80
DotFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected