I'm still confused on the halfedge data, I'm not sure why but I feel that vertex->halfedge == face->halfedge == edge->halfedge since they reference the point. Does anyone have a video that could help clarify these differences? Like I'm not entirely sure why we need to store all of these?
What is the vertex in halfedge? Is it the start point or end point of the halfedge?
@dvanmali Not quite sure what you mean: different vertices, edges, and faces, will point to different halfedges (note that the * indicates that these are pointers, not values, so there is not duplicate storage of the same elements). In this particular example it may be true that the vertex, edge, and face all point to the same halfedge (actually, looks like the vertex points to a different halfedge), but in general that will not be true: each vertex, edge, and face point to some incident halfedge.
@yongchi1 In this class (and in our skeleton code) we will adopt the convention that a halfedge points to the vertex that it is coming from, but of course this is merely a convention, and you may find that other mesh libraries will make the opposite choice.
I have questions. So an edge knows about one of its two halfedges, and
a face knows about one of the many halfedges circulating around its interior. But how do I know which one out of two halfedges does the edge know? Or it doesn't matter since one halfedge knows its twin?
So when we do some local operations, when new edge appears, we need to sign new edge with its halfedge, and also allocate the derived halfedge right? I mean by assigning its member(next, twin, face,edge)
@janeqi417 Sounds like you have all the right ideas: it doesn’t matter which of the two halfedges the edge points to since, as you say, it always knows about its twin. And yes indeed, whenever you create a new edge you must also create two corresponding halfedges, and make sure all the pointers are correctly assigned for all elements in the nearby vicinity.