| 14 | } |
| 15 | |
| 16 | void Tr2SpotLight::RenderDebugInfo( ITr2DebugRenderer2& renderer, const Matrix& worldMatrix, const Float4x3* bones, size_t boneCount ) |
| 17 | { |
| 18 | auto baseColor = m_lightData.color * m_lightData.brightness; |
| 19 | baseColor.a = 0.025f; |
| 20 | auto colorMod = Color( 0.0f, 0.0f, 0.0f, 0.025f ); |
| 21 | |
| 22 | Matrix boneMatrix = m_boneTransform; |
| 23 | if( m_lightData.boneIndex >= 0 && m_lightData.boneIndex < boneCount ) |
| 24 | { |
| 25 | TriMatrixCopyFrom3x4( &boneMatrix, &bones[m_lightData.boneIndex] ); |
| 26 | } |
| 27 | |
| 28 | Matrix lightMatrix = RotationMatrix( m_lightData.rotation ) * TranslationMatrix( m_lightData.position ) * boneMatrix * worldMatrix; |
| 29 | |
| 30 | float outerAngle = TRI_2PI * m_lightData.outerAngle / 360.f; |
| 31 | float innerAngle = TRI_2PI * m_lightData.innerAngle / 360.f; |
| 32 | |
| 33 | renderer.DrawCone( this, lightMatrix, m_lightData.radius, outerAngle, 15, 15, Tr2DebugRenderer::Solid, Tr2DebugColor( baseColor + colorMod * 2.0f, baseColor ) ); |
| 34 | renderer.DrawCone( this, lightMatrix, m_lightData.innerRadius, innerAngle, 15, 15, Tr2DebugRenderer::Solid, Tr2DebugColor( baseColor + colorMod * 3.0f, baseColor + colorMod ) ); |
| 35 | } |
nothing calls this directly
no test coverage detected