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

Method RenderDebugInfo

trinity/Eve/Turret/EveTurretSet.cpp:1953–1986  ·  view source on GitHub ↗

-------------------------------------------------------------------------------- Description: Render debug info of this turret set --------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

1951// Render debug info of this turret set
1952// --------------------------------------------------------------------------------
1953void EveTurretSet::RenderDebugInfo( ITr2DebugRenderer2& renderer )
1954{
1955 if( renderer.HasOption( GetRawRoot(), "TurretBounds" ) )
1956 {
1957 // draw bounding sphere for every turret in this set
1958 for( const auto& turret : m_singleTurrets )
1959 {
1960 if( turret.valid )
1961 {
1962 Vector3 center = TransformCoord( m_boundingSphere.GetXYZ(), turret.worldMatrix );
1963 renderer.DrawSphere( this, center, m_boundingSphere.w, 10, Tr2DebugRenderer::Wireframe, 0xffffff00 );
1964 }
1965 }
1966 RenderDynamicBounds();
1967 }
1968
1969 auto ambientEffect = GetAmbientEffectOrGeneratedEffect();
1970 if( ambientEffect )
1971 {
1972 if( auto debuggable = dynamic_cast<ITr2DebugRenderable*>( ambientEffect ) )
1973 {
1974 debuggable->RenderDebugInfo( renderer );
1975 }
1976 }
1977 if( m_firingEffect )
1978 {
1979 m_firingEffect->RenderDebugInfo( renderer );
1980 }
1981
1982 if( m_turretMovementObserver && m_playMovementSound )
1983 {
1984 m_turretMovementObserver->RenderDebugInfo( renderer );
1985 }
1986}
1987
1988void EveTurretSet::GetDebugOptions( Tr2DebugRendererOptions& options )
1989{

Callers

nothing calls this directly

Calls 2

HasOptionMethod · 0.80
DrawSphereMethod · 0.45

Tested by

no test coverage detected