- Статус
 - Оффлайн
 
- Регистрация
 - 11 Окт 2020
 
- Сообщения
 - 435
 
- Реакции
 - 56
 
Появляются лесенки внутри круга, хелп хвхв (render ImGui)
			
				Код:
			
		
		
		void ImGuiRendering::DrawRing3D(int16_t x, int16_t y, int16_t z, int16_t radius, uint16_t points, Color color1, Color color2, static float thickness)
{
    Vector pos = Vector(x, y, z);
     float step = (float)M_PI * 2.0f / points;
    for (float a = 0; a < (M_PI * 2.0f); a += step)
    {
         Vector start(radius * cosf(a) + pos.x, radius * sinf(a) + pos.y, pos.z);
         Vector end(radius * cosf(a + step) + pos.x, radius * sinf(a + step) + pos.y, pos.z);
         Vector start2d;
         Vector end2d;
         Vector Position;
            
        if (math::WorldToScreen(start, start2d) &&
            math::WorldToScreen(end, end2d) && math::WorldToScreen(pos, Position))
        {
            DrawLine(start2d[0], start2d[1], end2d[0], end2d[1], color1, thickness);
            TriangleFilled(Position.x, Position.y, end2d.x, end2d.y, start2d.x, start2d.y, color2);
        }
    }
}
	
			
				Последнее редактирование: