summaryrefslogtreecommitdiff
path: root/src/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/graph.h b/src/graph.h
new file mode 100644
index 0000000..0b70fab
--- /dev/null
+++ b/src/graph.h
@@ -0,0 +1,32 @@
+#ifndef _GRAPH_H_
+#define _GRAPH_H_
+
+typedef struct {
+ int n1;
+ int n2;
+} grEdge;
+
+
+typedef struct {
+ float x;
+ float y;
+ float z;
+ float colour;
+} grNode;
+
+
+typedef struct {
+ grNode *nodes;
+ grEdge *edges;
+ int numnodes;
+ int numedges;
+} grGraph;
+
+
+void grFree(grGraph *g);
+grGraph* grAlloc(int numnodes, int numedges);
+void grGenRandom(grGraph *g);
+void graphDrawGL(grGraph *g);
+
+
+#endif