Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return early if original polygons don't require fixing #98

Open
astojilj opened this issue Aug 4, 2019 · 0 comments
Open

Return early if original polygons don't require fixing #98

astojilj opened this issue Aug 4, 2019 · 0 comments

Comments

@astojilj
Copy link

astojilj commented Aug 4, 2019

In context of mapbox/mapbox-gl-native#15268: if the original polygons are correct, there is no need to provide result that reorders original and return true.
Client then constructs another container, copying and casting all returned to domain specific type... e.g
https://github.com/mapbox/mapbox-gl-native/blob/273ad436fb4d2a18c6749bd4e40fa56546e9285c/src/mbgl/tile/geometry_tile_data.cpp#L51

In context of wagyu code, bookkeeping the dirty state would enable return statement after correct_topology:

template <typename T2>
bool execute(clip_type cliptype,
                 mapbox::geometry::multi_polygon<T2>& solution,
                 fill_type subject_fill_type,
                 fill_type clip_fill_type) {

        if (minima_list.empty()) {
            return false;
        }

        ring_manager<T> manager;

        build_hot_pixels(minima_list, manager);

        execute_vatti(minima_list, manager, cliptype, subject_fill_type, clip_fill_type);

        correct_topology(manager);

        build_result(solution, manager, reverse_output);

        return true;
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant