Repository navigation
navmap_core: keep_vertices in simplify, cut_along_lines and refine - #47
Open
jmguerreroh wants to merge 1 commit into
Open
jmguerreroh wants to merge 1 commit into
jmguerreroh wants to merge 1 commit into
Conversation
- SimplifyParams::keep_vertices: vertices never removed (others may collapse onto them), e.g. where the borders of maps simplified apart must meet. - cut_along_lines (Subdivide.hpp): splits the NavCels the lines x = c, y = c cross, so none crosses one; vertices on a line get exactly its coordinate, new ones are shared (no cracks). - refine: longest-edge bisection of the NavCels under some points, or of a region given by the largest edge each NavCel may have; conforming, layers, surfaces and colours carried.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Branch base:
rolling. Files:navmap_core(Simplify, newSubdivide.hpp/.cppand theirtests). What a level-of-detail maps manager needs to cut a large NavMap into tiles, simplify them
apart and put them back together, and to add detail where obstacles appear.
Independent of #45 and #46. It touches the end of
SimplifyParams, as #46 does: whichever ismerged second needs a one-line rebase.
SimplifyParams::keep_verticesVertices (ids of the input map) that
simplify()never removes: other vertices may collapseonto them, they never collapse. For example, where the borders of maps simplified apart must
meet.
cut_along_lines(nm, {xs, ys})Splits the NavCels the lines x = c and y = c cross, so that none crosses one (for example, to cut
a map into tiles along a grid). A vertex within
snapof a line is moved onto it, and newvertices are put exactly on it: every vertex on a line has exactly the line's coordinate. The
point where an edge crosses a line is computed once, so the NavCels on both sides share it and
there are no cracks.
refine(nm, points, max_edge)andrefine(nm, max_edge_at)Longest-edge bisection (Rivara). An edge is split at its middle in every NavCel that has it,
after first splitting the longer edges of its neighbours if needed, so the mesh stays conforming
and the NavCels keep their shape.
max_edge. A point on anedge or a vertex refines the NavCels on every side.
within some distance of an obstacle). All the work happens in one pass; if no NavCel is too
large, the map is left untouched.
Both carry layer values, surfaces and vertex colours (interpolated). NavCels at the end of a link
are not split.
Tests
test_subdivide, 7 tests:links are respected, and a point on an edge refines both sides.
Plus
KeptVerticesAreNeverRemovedintest_simplify.colcon test --packages-select navmap_coreon this branch: 347 tests (with the linters), nofailures.