Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Вопрос Как пофиксить это?

контора пидорасов
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
1 Июл 2021
Сообщения
191
Реакции
42
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
1626436556546.png
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
в draw_manager.cpp
где рендерится круг вроде бы надо заменить
auto на static auto


а нет, вот на это на заменить static auto -> auto
 
Последнее редактирование:
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
в draw_manager.cpp
где рендерится круг вроде бы надо заменить
auto на static auto


а нет, вот static auto -> auto
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
static auto prevScreenPos = ZERO; //-V656
static auto step = M_PI * 2.0f / 72.0f;

auto screenPos = ZERO;
auto screen = ZERO;

if (!math::world_to_screen(origin, screen))
return;

for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step) //-V1034
{
Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);

if (math::world_to_screen(pos, screenPos))
{
if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
{
line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
}

prevScreenPos = screenPos;
}
}
}
Это эти круги а че тут не так?
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
static auto prevScreenPos = ZERO; //-V656
static auto step = M_PI * 2.0f / 72.0f;

auto screenPos = ZERO;
auto screen = ZERO;

if (!math::world_to_screen(origin, screen))
return;

for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step) //-V1034
{
Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);

if (math::world_to_screen(pos, screenPos))
{
if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
{
line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
}

prevScreenPos = screenPos;
}
}
}
Это эти круги а че тут не так?
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
auto prevScreenPos = ZERO; //-V656

static auto step = M_PI * 2.0f / 72.0f;

auto screenPos = ZERO;
auto screen = ZERO;

if (!math::world_to_screen(origin, screen))
return;

for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step) //-V1034
{
Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);

if (math::world_to_screen(pos, screenPos))
{
if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
{
line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
}

prevScreenPos = screenPos;
}
}
}
вот так
 
Последнее редактирование:
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
auto prevScreenPos = ZERO; //-V656
auto step = M_PI * 2.0f / 72.0f;

auto screenPos = ZERO;
auto screen = ZERO;

if (!math::world_to_screen(origin, screen))
return;

for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step) //-V1034
{
Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);

if (math::world_to_screen(pos, screenPos))
{
if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
{
line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
}

prevScreenPos = screenPos;
}
}
}
вот так
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
static auto prevScreenPos = ZERO; //-V656
static auto step = M_PI * 2.0f / 72.0f;

auto screenPos = ZERO;
auto screen = ZERO;

if (!math::world_to_screen(origin, screen))
return;

for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step) //-V1034
{
Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);

if (math::world_to_screen(pos, screenPos))
{
if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
{
line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
}

prevScreenPos = screenPos;
}
}
}
Это эти круги а че тут не так?

Вставить код
Язык
Основной код
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
auto step = M_PI * 2.0f / 72.0f;
зачем ты тут убрал статик? тут не нужно было.
C++:
Expand Collapse Copy
void render::Draw3DFilledCircle(const Vector& origin, float radius, Color color)
{
    auto prevScreenPos = ZERO;
    static auto step = M_PI * 2.0f / 72.0f;

    auto screenPos = ZERO;
    auto screen = ZERO;

    if (!math::world_to_screen(origin, screen))
        return;

    for (auto rotation = 0.0f; rotation <= M_PI * 2.0f; rotation += step)
    {
        Vector pos(radius * cos(rotation) + origin.x, radius * sin(rotation) + origin.y, origin.z);

        if (math::world_to_screen(pos, screenPos))
        {
            if (!prevScreenPos.IsZero() && prevScreenPos.IsValid() && screenPos.IsValid() && prevScreenPos != screenPos)
            {
                line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
                triangle(Vector2D(screen.x, screen.y), Vector2D(screenPos.x, screenPos.y), Vector2D(prevScreenPos.x, prevScreenPos.y), Color(color.r(), color.g(), color.b(), color.a() / 2));
            }

            prevScreenPos = screenPos;
        }
    }
}
 
Назад
Сверху Снизу