MCPcopy Create free account
hub / github.com/carbonengine/trinity / RenderDebugInfo

Method RenderDebugInfo

trinity/Interior/Tr2InteriorLightSource.cpp:169–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void Tr2InteriorLightSource::RenderDebugInfo( ITr2DebugRenderer2& renderer )
170{
171 if( renderer.HasOption( GetRawRoot(), "Lights" ) )
172 {
173 renderer.DrawSphere( this, m_position, 0.05f, 10, Tr2DebugRenderer::Wireframe, 0xff333333 );
174 if( IsSpotLight() )
175 {
176 float coneRadius = m_radius * tanf( XMConvertToRadians( m_coneAlphaOuter ) );
177 Vector3 focal = m_position + Normalize( m_coneDirection ) * m_radius;
178 renderer.DrawCone( this, focal, m_position, coneRadius, 8, Tr2DebugRenderer::Wireframe, 0xff444444 );
179 }
180 else
181 {
182 renderer.DrawSphere( this, m_position, m_radius, 12, Tr2DebugRenderer::Wireframe, 0xff444444 );
183 }
184 }
185}

Callers

nothing calls this directly

Calls 3

HasOptionMethod · 0.80
DrawSphereMethod · 0.45
DrawConeMethod · 0.45

Tested by

no test coverage detected