| 807 | } |
| 808 | |
| 809 | void EveSpaceObject2::RenderDebugInfo( ITr2DebugRenderer2& renderer ) |
| 810 | { |
| 811 | if( renderer.HasOption( GetRawRoot(), "Projections" ) ) |
| 812 | { |
| 813 | for( auto it = m_customMasks.begin(); it != m_customMasks.end(); ++it ) |
| 814 | { |
| 815 | Matrix customMaskTransform; |
| 816 | ( *it )->GetDebugDrawMatrix( &customMaskTransform, GetBoundingSphereRadius() ); |
| 817 | renderer.DrawBox( this, customMaskTransform, Vector3( -1, -1, -1 ), Vector3( 1, 1, 1 ), Tr2DebugRenderer::Wireframe, 0xff00ffff ); |
| 818 | } |
| 819 | } |
| 820 | |
| 821 | for( auto it = m_observers.begin(); it != m_observers.end(); ++it ) |
| 822 | { |
| 823 | ( *it )->RenderDebugInfo( renderer ); |
| 824 | } |
| 825 | |
| 826 | if( renderer.HasOption( GetRawRoot(), "Local Bounding Box" ) ) |
| 827 | { |
| 828 | Vector3 minBounds( -0.5f, -0.5f, -0.5f ); |
| 829 | Vector3 maxBounds( 0.5f, 0.5f, 0.5f ); |
| 830 | |
| 831 | if( GetLocalBoundingBox( minBounds, maxBounds ) ) |
| 832 | { |
| 833 | renderer.DrawBox( this, m_worldTransform, minBounds, maxBounds, Tr2DebugRenderer::Wireframe, 0xff0000ff ); |
| 834 | } |
| 835 | } |
| 836 | |
| 837 | if( renderer.HasOption( GetRawRoot(), "Bounding Box" ) ) |
| 838 | { |
| 839 | CcpMath::AxisAlignedBox bounds( Vector3( -0.5f, -0.5f, -0.5f ), Vector3( 0.5f, 0.5f, 0.5f ) ); |
| 840 | uint32_t color = 0xff0000ff; |
| 841 | |
| 842 | if( m_mesh ) |
| 843 | { |
| 844 | if( auto b = m_mesh->GetBounds() ) |
| 845 | { |
| 846 | bounds = b; |
| 847 | color = 0xffffffff; |
| 848 | } |
| 849 | } |
| 850 | |
| 851 | renderer.DrawBox( this, m_worldTransform, bounds.m_min, bounds.m_max, Tr2DebugRenderer::Wireframe, Tr2DebugColor( color, 0xffff0000, 0xff00ff00, 0x00000000 ) ); |
| 852 | } |
| 853 | |
| 854 | if( renderer.HasOption( GetRawRoot(), "Bounding Sphere" ) ) |
| 855 | { |
| 856 | renderer.DrawSphere( this, m_boundingSphereWorldCenter, m_boundingSphereWorldRadius, 8, Tr2DebugRenderer::Wireframe, 0xffff00ff ); |
| 857 | } |
| 858 | |
| 859 | if( renderer.HasOption( GetRawRoot(), "Bounding Sphere Accumulated" ) ) |
| 860 | { |
| 861 | Vector4 sphere; |
| 862 | GetBoundingSphere( sphere, BoundingSphereQuery::EVE_BOUNDS_WITH_CHILDREN ); |
| 863 | renderer.DrawSphere( this, sphere.GetXYZ(), sphere.w, 8, Tr2DebugRenderer::Wireframe, 0xff00ffff ); |
| 864 | } |
| 865 | |
| 866 | if( renderer.HasOption( this, "ClipSphere" ) ) |
nothing calls this directly
no test coverage detected