2021-09-09 17:10:24 +10:00
|
|
|
#ifndef GEOMETRY_HEADER
|
|
|
|
#include "geometry.h"
|
|
|
|
#endif
|
2021-09-08 21:48:00 +10:00
|
|
|
|
2021-09-09 17:10:24 +10:00
|
|
|
#ifndef STDIO_HEADER
|
2021-09-08 21:48:00 +10:00
|
|
|
#include <stdio.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef DCEL_HEADER
|
|
|
|
#define DCEL_HEADER
|
|
|
|
|
2021-09-09 17:10:24 +10:00
|
|
|
typedef struct halfEdge {
|
|
|
|
struct halfEdge *previous;
|
|
|
|
struct halfEdge *next;
|
|
|
|
struct halfEdge *twin;
|
|
|
|
int face;
|
|
|
|
int edge;
|
|
|
|
} halfEdge_t;
|
|
|
|
|
|
|
|
typedef struct edge {
|
|
|
|
halfEdge_t halfEdge;
|
|
|
|
} edge_t;
|
|
|
|
|
|
|
|
typedef struct face {
|
|
|
|
halfEdge_t start;
|
|
|
|
} face_t;
|
2021-09-08 21:48:00 +10:00
|
|
|
|
|
|
|
vertex_t **readPolygon(vertex_t **vertices, FILE *polygonFile, \
|
|
|
|
int *numVertices);
|
|
|
|
void freeVertices(vertex_t **vertices, int numVertices);
|
2021-09-09 17:10:24 +10:00
|
|
|
|
2021-09-08 21:48:00 +10:00
|
|
|
#endif
|