-
Notifications
You must be signed in to change notification settings - Fork 240
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
Polyline #24
Polyline #24
Conversation
1. Renamed local variables to be more descriptive 2. Renamed width to halfWidth 3. Proper use of right normal and changed indices to follow counter clockwise vertex order
|
||
ushort vertexDataOffset = (ushort)_pointsOut.size(); | ||
|
||
if(_line.size() >= 2){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As was discussed yesterday, should we add an error check (or assert) here for lines with just one point :D?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good idea to catch them here. Also raises the question of whether geometry should be tested / discarded for validity upstream as part of the data source (and in the future geometry transform) steps? cc @blair1618
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking here makes sense, it's hard to do it further upstream in a really general way. In this case we know it's invalid to make polygons from a one-point-line, but if you're symbolizing 'line' geometry as a sequence of points then why not allow it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah that's true... a single-point line isn't really a valid line, but I suppose we could allow it to be symbolized as a point.
Small change of "/ 2." to "* 0.5"
Lines are been draw... simple plain implementation