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

Polyline #24

Merged
merged 13 commits into from
Nov 18, 2014
Merged

Polyline #24

merged 13 commits into from
Nov 18, 2014

Conversation

patriciogonzalezvivo
Copy link
Contributor

Lines are been draw... simple plain implementation

patriciogonzalezvivo and others added 7 commits November 17, 2014 10:45
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){
Copy link
Member

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?

Copy link
Member

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

Copy link
Member

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?

Copy link
Member

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.

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

Successfully merging this pull request may close these issues.

4 participants