]> git.mxchange.org Git - flightgear.git/blob - Stripe_u/polverts.h
First working version!
[flightgear.git] / Stripe_u / polverts.h
1 /********************************************************************/
2 /*   STRIPE: converting a polygonal model to triangle strips    
3      Francine Evans, 1996.
4      SUNY @ Stony Brook
5      Advisors: Steven Skiena and Amitabh Varshney
6 */
7 /********************************************************************/
8
9 /*---------------------------------------------------------------------*/
10 /*   STRIPE: polverts.h
11 -----------------------------------------------------------------------*/
12
13 #include "queue.h"
14 #include <malloc.h>
15
16
17 /*      external functions */
18 void Find_Adjacencies();
19 void Test_Adj_Struct();
20 void Test_SGI_Struct();
21 void Write_Edges();
22 void Build_SGI_Table();
23 void Save_Walks();
24 void Find_Bands();
25 void Save_Rest();
26 void Assign_Walk();
27 void Save_Walks();
28         
29 typedef struct adjacencies
30 {
31         Node ListNode;
32         int face_id;
33 } ADJACENCIES,*P_ADJACENCIES;
34
35 typedef struct FVerts
36 {
37         Node ListNode;
38         int *pPolygon;
39         int nPolSize;
40         int nId;
41 } F_VERTS, *PF_VERTS;
42
43 /*Every time we need to use this, cast it ( ListInfo*)*/
44
45 typedef struct FEdges
46 {
47         Node ListNode;
48         int edge[3];
49 }F_EDGES,*PF_EDGES;
50
51 typedef struct FFaces
52 {
53         Node ListNode;
54         int *pPolygon;
55         int *pNorms;
56     int     seen;
57     int seen2;
58     int seen3;
59         int nPolSize;
60         F_EDGES **VertandId;
61         int *marked;
62                 int *walked;
63 } F_FACES,*PF_FACES;
64         
65
66 typedef struct Strips
67 {
68         Node ListNode;
69         int face_id;
70 } Strips,*P_STRIPS;
71
72
73      struct vert_added
74      {
75           int num;
76           int *normal;
77      };
78
79
80 /*      Globals */
81 ListHead **PolVerts;
82 ListHead **PolFaces;
83 ListHead **PolEdges;
84 ListHead *array[60];
85 int     id_array[60];
86 ListHead *strips[1];
87 ListHead *all_strips[100000]; /*  Assume max 100000 strips */