-------------------------------------------------------------------------------- Description: Check if the object is casting a shadow in the camera/shadow frustums --------------------------------------------------------------------------------
| 1938 | // Check if the object is casting a shadow in the camera/shadow frustums |
| 1939 | // -------------------------------------------------------------------------------- |
| 1940 | bool EveSpaceObject2::IsCastingShadow( const TriFrustum& cameraFrustum, const IEveShadowFrustum& shadowFrustum, Tr2RenderReason renderReason, float& sizeInShadow ) const |
| 1941 | { |
| 1942 | if( !m_display || m_boundingSphereWorldRadius <= 0.0 ) |
| 1943 | { |
| 1944 | return false; |
| 1945 | } |
| 1946 | |
| 1947 | if( renderReason == TR2RENDERREASON_REFLECTION && !EntityComponents::ShouldReflect( m_reflectionMode ) ) |
| 1948 | { |
| 1949 | return false; |
| 1950 | } |
| 1951 | |
| 1952 | Vector4 bs = Vector4( m_boundingSphereWorldCenter, m_boundingSphereWorldRadius ); |
| 1953 | |
| 1954 | sizeInShadow = 0; |
| 1955 | |
| 1956 | if( shadowFrustum.IsVisible( cameraFrustum, bs ) ) |
| 1957 | { |
| 1958 | sizeInShadow = shadowFrustum.GetSizeInShadow( bs ); |
| 1959 | } |
| 1960 | return sizeInShadow > 15.f; |
| 1961 | } |
| 1962 | |
| 1963 | void EveSpaceObject2::SetMesh( Tr2MeshBase* mesh ) |
| 1964 | { |
nothing calls this directly
no test coverage detected