-------------------------------------------------------------------------------- Description: Update. Mainly calculate a new worldmatrix based on the ever changing ego pos --------------------------------------------------------------------------------
| 88 | // Update. Mainly calculate a new worldmatrix based on the ever changing ego pos |
| 89 | // -------------------------------------------------------------------------------- |
| 90 | void EveSceneStaticParticles::Update( const EveUpdateContext& updateContext ) |
| 91 | { |
| 92 | // nothing to do here? |
| 93 | if( Tr2Renderer::IsLowQuality() || m_clusters.empty() || !m_mesh ) |
| 94 | { |
| 95 | return; |
| 96 | } |
| 97 | |
| 98 | m_lastWorldMatrix = m_worldMatrix; |
| 99 | // calc float offset from egopos to center of particles |
| 100 | Vector3d offset = m_centerOfClusters - updateContext.GetOrigin(); |
| 101 | // build a transform matrix |
| 102 | m_worldMatrix = TranslationMatrix( float( offset.x ), float( offset.y ), float( offset.z ) ); |
| 103 | |
| 104 | m_center = TransformCoord( m_boundingSphere.GetXYZ(), m_worldMatrix ); |
| 105 | } |
| 106 | |
| 107 | void EveSceneStaticParticles::UpdateVisibility( const EveUpdateContext& updateContext ) |
| 108 | { |