Reputation: 237
I have a triangle mesh that is represented with a list of vertex coordinates, triangles are stored in a list of vertex indices and a list of corner indices. I also have a corner table that stores coordinate of a vertex, next corner, previous corner, opposite corner and right and left corner (of an incident triangle). In my program user can select a vertex, but I have a trouble detecting whether the selected point lies on border of the mesh or not (because then it requires unique handling). I managed to detect, whether the triangle it lies on is a boundary triangle. But how can I check if the selected vertex is also a boundary vertex?
Upvotes: 0
Views: 1377
Reputation: 22165
There are multiple ways to identify a boundary vertex.
A vertex v is a boundary vertex
If you want to identify a vertices v in a triangular mesh, you could count for each neighborhood vertex w how many (v,w) edges exist. If there exists a vertex w with just one (v,w) edge, then the vertex v (and also the vertex w) will be boundary vertices.
Upvotes: 2