summaryrefslogtreecommitdiff
path: root/meme/mesh.h
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2014-09-12 17:20:43 (GMT)
committerWerner Almesberger <werner@almesberger.net>2014-09-12 17:20:43 (GMT)
commit7b7435012f7e510e08662463b0865327824e2ab9 (patch)
tree374a4071ce178b07eb1c1030ed191d939307bf03 /meme/mesh.h
parent29baa2745d7408a8bbe6088807e3467a11120855 (diff)
downloadmisc-7b7435012f7e510e08662463b0865327824e2ab9.zip
misc-7b7435012f7e510e08662463b0865327824e2ab9.tar.gz
misc-7b7435012f7e510e08662463b0865327824e2ab9.tar.bz2
meme/: abstract iteration over edges (edge_foreach)
This way, we can later remove "struct edge".
Diffstat (limited to 'meme/mesh.h')
-rw-r--r--meme/mesh.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/meme/mesh.h b/meme/mesh.h
index 1927147..d2efc73 100644
--- a/meme/mesh.h
+++ b/meme/mesh.h
@@ -25,7 +25,6 @@ struct vertex {
struct edge {
const struct vertex *a, *b;
- bool drawn;
struct edge *next;
};
@@ -36,7 +35,6 @@ struct facet {
};
-extern struct edge *edges;
extern struct facet *facets;
@@ -46,6 +44,9 @@ void vertex_foreach(bool (*fn)(struct vertex *v, void *user), void *user);
void vertex_foreach_const(bool (*fn)(const struct vertex *v, void *user),
void *user);
+void edge_foreach(bool (*fn)(const struct vertex *a, const struct vertex *b,
+ void *user), void *user);
+
const struct facet *facet_add(const struct vertex *a, const struct vertex *b,
const struct vertex *c);