projects
/
grGL.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial commit.
[grGL.git]
/
src
/
graph.h
1
#ifndef _GRAPH_H_
2
#define _GRAPH_H_
3
4
typedef struct {
5
int n1;
6
int n2;
7
} grEdge;
8
9
10
typedef struct {
11
float x;
12
float y;
13
float z;
14
float colour;
15
} grNode;
16
17
18
typedef struct {
19
grNode *nodes;
20
grEdge *edges;
21
int numnodes;
22
int numedges;
23
} grGraph;
24
25
26
void grFree(grGraph *g);
27
grGraph* grAlloc(int numnodes, int numedges);
28
void grGenRandom(grGraph *g);
29
void graphDrawGL(grGraph *g);
30
31
32
#endif