| 47 | } |
| 48 | |
| 49 | void 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 | } |