began for maemo
[xscreensaver] / xscreensaver / hacks / glx / polyhedra.h
1 /* xscreensaver, Copyright (c) 2004 Jamie Zawinski <jwz@jwz.org>
2  *
3  * Permission to use, copy, modify, distribute, and sell this software and its
4  * documentation for any purpose is hereby granted without fee, provided that
5  * the above copyright notice appear in all copies and that both that
6  * copyright notice and this permission notice appear in supporting
7  * documentation.  No representations are made about the suitability of this
8  * software for any purpose.  It is provided "as is" without express or 
9  * implied warranty.
10  */
11
12 #ifndef __POLYHEDRA_H__
13 #define __POLYHEDRA_H__
14
15 typedef struct {
16   double x, y, z;
17 } point;
18
19 typedef struct {
20   int color;
21   int npoints;
22   int *points;   /* indexes into point list */
23 } face;
24
25 typedef struct {
26
27   int number;
28   char *wythoff;
29   char *name;
30   char *dual;
31   char *config;
32   char *group;
33   char *class;
34
35   int nfaces;
36   int logical_faces;
37   int logical_vertices;
38   int nedges;
39   int npoints;
40   int density;
41   int chi;
42
43   point *points;
44   face *faces;
45
46 } polyhedron;
47
48
49 extern int construct_polyhedra (polyhedron ***polyhedra_ret);
50 extern void free_polyhedron (polyhedron *p);
51
52 #endif /* __POLYHEDRA_H__ */