| 105 | } |
| 106 | |
| 107 | void EveSceneStaticParticles::UpdateVisibility( const EveUpdateContext& updateContext ) |
| 108 | { |
| 109 | m_visible = false; |
| 110 | |
| 111 | // nothing to do here? |
| 112 | if( Tr2Renderer::IsLowQuality() || m_clusters.empty() || !m_mesh ) |
| 113 | { |
| 114 | return; |
| 115 | } |
| 116 | auto& frustum = updateContext.GetFrustum(); |
| 117 | m_estimatedSize = frustum.GetPixelSizeAccross( &m_boundingSphere ); |
| 118 | |
| 119 | bool estimatedSizeWithinBounds = m_estimatedSize > PARTICLE_CLUSTER_MIN_SIZE * updateContext.GetLodFactor(); |
| 120 | bool inBoundingSphere = LengthSq( m_center - frustum.m_viewPos ) <= m_boundingSphere.w * m_boundingSphere.w; |
| 121 | |
| 122 | m_visible = inBoundingSphere || ( IsVisible( updateContext ) && estimatedSizeWithinBounds ); |
| 123 | } |
| 124 | |
| 125 | // -------------------------------------------------------------------------------- |
| 126 | // Description: |
nothing calls this directly
no test coverage detected