https://doi.org/10.5201/ipol.2017.209
Raw File
Tip revision: 0a2766f5dec8a9683f9baa9010aa47f168afea6e authored by Software Heritage on 02 November 2017, 00:00:00 UTC
ipol: Deposit 1313 in collection ipol
Tip revision: 0a2766f
sutherland_hodgman.h
#ifndef SUTHERLAND_HODGMAN
#define SUTHERLAND_HODGMAN

typedef struct { float x, y; } vec_t, *vec;
typedef struct { int len, alloc; vec v; } poly_t, *poly;

poly poly_new();
void poly_free(poly p);

poly poly_clip(poly sub, poly clip);
int write_polygons(char *name, poly s, poly c, poly res, int nx, int ny);
int write_polygons(char *name, poly c, int nx, int ny);

#endif
back to top