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

Replaced Vertex class by Edge #87

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

remi-san
Copy link
Contributor

@remi-san remi-san commented Mar 9, 2016

As told in issue #39, the chosen name was not the right one.

Here's the right one according to the chosen semantic field (vertices / edges).

@remi-san remi-san mentioned this pull request Mar 9, 2016
@codisart
Copy link
Contributor

codisart commented Apr 8, 2016

I'm not sure that edge is the right term, it imples the object is only a part of a geometry rather a geometry type himself.
I'd rather use Vector as the name of the class and edge in the usage of the Vector class inside the Polygon class.

@remi-san
Copy link
Contributor Author

remi-san commented Apr 8, 2016

Maybe not the right one, indeed, but far better than the misuse of vertex ;)

I'm not a big fan of edge neither: it was just a way to stay in the same semantic field as vertex.

The problem with vector is that it represents an origin (ok, we get from), a direction, and a magnitude : we have a target point instead (::to()), but the behavior of the vector is also present: ::destination()

If we want to stay in the semantic field of geometry, we should prefer the use of edge (or segment) as we want to represent a line between two points who can be a part of a geometry (or not). If we want to represent a point, a direction an a magnitude, we should use vector.

I'm not that sure we want it to be a geometry.

I think the real problem is to ask: how will we use this object? It has a lot of usages which are very distinct. We might want to split it in different classes.

Nonetheless, it's clearly not an edge which is just a point of the boundary of a polygon.

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.

2 participants