y값 조절

더보기
void TerrainEditor::ResizeHeight()
{
    vector<VertexType>& vertices = mesh->GetVertices();

    if (KEY_PRESS('Z'))
    {
        for (int z = -editRange; z <= editRange; z++)
        {
            for (int x = -editRange; x <= editRange; x++)
            {
                vertices[(int)pickingPos.x + x + (width - (int)pickingPos.z + z - 1) * width].pos.y += editPower * DELTA;
            }
        }
    }
    else if (KEY_PRESS('X'))
    {
        for (int z = -editRange; z <= editRange; z++)
        {
            for (int x = -editRange; x <= editRange; x++)
            {
                vertices[(int)pickingPos.x + x + (width - (int)pickingPos.z + z - 1) * width].pos.y -= editPower * DELTA;
            }
        }
    }

    mesh->UpdateVertex();
}

+ Recent posts