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

Method RenderDebugInfo

trinity/Particle/Tr2ParticleVortexForce.cpp:49–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void Tr2ParticleVortexForce::RenderDebugInfo( ITr2DebugRenderer2& renderer, const Matrix& worldTransform, const CcpMath::AxisAlignedBox& aabb ) const
50{
51 auto world = OrthoNormalBasisZ( m_axis ) * TranslationMatrix( m_position ) * worldTransform;
52 auto radius = 20.f;
53
54 renderer.DrawLine( this, TransformCoord( Vector3( 0, 0, -radius ), world ), TransformCoord( Vector3( 0, 0, radius ), world ), 0xffaaaa00 );
55 for( int i = 0; i < 16; ++i )
56 {
57 float angle0 = (float)i / 16.f * XM_2PI;
58 float angle1 = (float)( i + 1 ) / 16.f * XM_2PI;
59 Vector3 p0( cosf( angle0 ) * radius, sinf( angle0 ) * radius, 0 );
60 Vector3 p1( cosf( angle1 ) * radius, sinf( angle1 ) * radius, 0 );
61 renderer.DrawLine( this, TransformCoord( p0, world ), TransformCoord( p1, world ), 0xffaaaa00 );
62 }
63}

Callers

nothing calls this directly

Calls 2

Vector3Class · 0.50
DrawLineMethod · 0.45

Tested by

no test coverage detected