INNER CODE UNIT · C++

x

symphony-of-empires/symphony-of-empires · eng3d/eng3d/borders.cpp:112

        int x = current_index % width;
        int y = current_index / width;
        auto& current_river = borders.back();
        current_river.push_back(glm::vec3(x + 1.f, y + 1.f, -0.05));

        add_neighbor(x, y, x - 1, y + 0, connections);
        add_neighbor(x, y, x + 1, y + 0, connections);
        add_neighbor(x, y, x + 0, y + 1, connections);
        add_neighbor(x, y, x + 0, y - 1, connections);
    }

    void clear_stack() {
        while(!current_paths.empty() || !unexplored_paths.empty()) {
            while(!current_paths.empty()) {
                auto current_path = current_paths.top();
                current_paths.pop();
                get_border(current_path, 1);
            }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…