-------------------------------------------------------------------------------- Description: Update pixel diameter estimation --------------------------------------------------------------------------------
| 3348 | // Update pixel diameter estimation |
| 3349 | // -------------------------------------------------------------------------------- |
| 3350 | void EveSpaceObject2::EstimatePixelDiameter( const TriFrustum& frustum ) |
| 3351 | { |
| 3352 | // estimate the pixel diameter using the local bounding box, |
| 3353 | // as the bounding sphere may not pepresent the mesh bounding sphere, |
| 3354 | // but rather the bounding sphere of the object and it's EveChildMesh attachments |
| 3355 | if( m_mesh ) |
| 3356 | { |
| 3357 | m_mesh->GetBoundingBox( m_localAabbMin, m_localAabbMax ); |
| 3358 | } |
| 3359 | Vector4 sphere; |
| 3360 | BoundingSphereFromBox( sphere, m_localAabbMin, m_localAabbMax, &m_worldTransform ); |
| 3361 | m_estimatedPixelDiameter = frustum.GetPixelSizeAccross( sphere.GetXYZ(), sphere.w ); |
| 3362 | } |
| 3363 | |
| 3364 | // -------------------------------------------------------------------------------- |
| 3365 | // Description: |
nothing calls this directly
no test coverage detected