-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In the DCEL data structure, there are labels on the vertex records, (half) edge records, and face records. These labels keep track information such as which input geometry the record originates from and whether it will appear in the output geometry. The original approach to labelling was to use the same data structure for all record types. The label had two booleans per operand. The first boolean determined whether the record would appear in the final output, and the second boolean would show whether the first boolean was populated or not. This was essentially tri-state logic. The trouble with this approach was that the DCEL algorithm doesn't know whether each record should appear in the output geometry right up until the last stage. The labels are used in the earlier stages of the algorithm to record other facts, such as whether or not the records appear in the input geometry. The semantics of the fields subtly change over the course of the algorithm, making the code hard to understand and maintain. The new approach (implemented by this PR) changes how label management is performed. Instead of having a single labels data structure, the fields are slightly different for vertex, edge, and face records. This is to account for the differences in information available when processing vertexes vs. edges vs. faces. The number of fields is also expanded, so that concepts like "is this record explicitly present in the input geometry's control points" are separate from concepts like "is this record present in the input geometry but not explicitly in its control points". The populated fields are also removed, and tracked separately in each algorithm that modifies the labels.
- Loading branch information
1 parent
c9889c2
commit 45ccc4b
Showing
7 changed files
with
815 additions
and
782 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.