Save edge pointer in vertices
This commit is contained in:
parent
8f2ca02cd6
commit
a32de1dd6d
1
parser.c
1
parser.c
@ -138,6 +138,7 @@ HE_obj *parse_obj(char const * const obj_string)
|
|||||||
edges[ec].vert = &(vertices[face_v[i][j] - 1]);
|
edges[ec].vert = &(vertices[face_v[i][j] - 1]);
|
||||||
edges[ec].face = &(faces[j]);
|
edges[ec].face = &(faces[j]);
|
||||||
edges[ec].pair = NULL; /* preliminary */
|
edges[ec].pair = NULL; /* preliminary */
|
||||||
|
vertices[face_v[i][j] - 1].edge = &(edges[ec]); /* last one wins */
|
||||||
|
|
||||||
if (face_v[i][j + 1])
|
if (face_v[i][j + 1])
|
||||||
edges[ec].next = &(edges[ec + 1]);
|
edges[ec].next = &(edges[ec + 1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user