///////////////////////////////////////////////////////////////////////////////// IEveShadowCaster
| 240 | ////////////////////////////////////////////////////////////////////////////////////// |
| 241 | // IEveShadowCaster |
| 242 | bool EveSwarmRenderable::IsCastingShadow( const TriFrustum& cameraFrustum, const IEveShadowFrustum& shadowFrustum, Tr2RenderReason renderReason, float& sizeInShadow ) const |
| 243 | { |
| 244 | Vector4 boundingSphere; |
| 245 | if( !m_owner ) |
| 246 | { |
| 247 | return false; |
| 248 | } |
| 249 | |
| 250 | if( renderReason == TR2RENDERREASON_REFLECTION ) |
| 251 | { |
| 252 | return false; |
| 253 | } |
| 254 | |
| 255 | if( m_owner->GetBoundingSphere( boundingSphere ) ) |
| 256 | { |
| 257 | boundingSphere.GetXYZ() = m_worldTransform.GetTranslation(); |
| 258 | sizeInShadow = 0; |
| 259 | |
| 260 | if( shadowFrustum.IsVisible( cameraFrustum, boundingSphere ) ) |
| 261 | { |
| 262 | sizeInShadow = shadowFrustum.GetSizeInShadow( boundingSphere ); |
| 263 | } |
| 264 | return sizeInShadow > 15.f; |
| 265 | } |
| 266 | return false; |
| 267 | } |
| 268 | |
| 269 | void EveSwarmRenderable::GetShadowBatches( ITriRenderBatchAccumulator* batches, const Tr2PerObjectData* perObjectData, float shadowPixelSize ) |
| 270 | { |
nothing calls this directly
no test coverage detected