]> git.mxchange.org Git - flightgear.git/blob - Stripe_w/polverts.h
Tweaked a function call name in "names.hxx".
[flightgear.git] / Stripe_w / 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
14 #ifndef _POLVERTS_H
15 #define _POLVERTS_H
16
17
18 #ifdef HAVE_CONFIG_H
19 #  include <config.h>
20 #endif
21
22 #include "queue.h"
23
24 #ifdef HAVE_STDLIB_H
25 #  include <stdlib.h>
26 #else
27 #  include <malloc.h>
28 #endif
29
30
31 typedef struct adjacencies
32 {
33         Node ListNode;
34         int face_id;
35 } ADJACENCIES,*P_ADJACENCIES;
36
37 typedef struct FVerts
38 {
39         Node ListNode;
40         int *pPolygon;
41         int nPolSize;
42         int nId;
43 } F_VERTS, *PF_VERTS;
44
45 /*Every time we need to use this, cast it ( ListInfo*)*/
46
47 typedef struct FEdges
48 {
49         Node ListNode;
50         int edge[3];
51 }F_EDGES,*PF_EDGES;
52
53 typedef struct FFaces
54 {
55         Node ListNode;
56         int *pPolygon;
57         int *pNorms;
58     int     seen;
59     int seen2;
60     int seen3;
61         int nPolSize;
62         F_EDGES **VertandId;
63         int *marked;
64                 int *walked;
65 } F_FACES,*PF_FACES;
66         
67
68 typedef struct Strips
69 {
70         Node ListNode;
71         int face_id;
72 } Strips,*P_STRIPS;
73
74
75      struct vert_added
76      {
77           int num;
78           int *normal;
79      };
80
81
82 /*      external functions */
83 void Find_Adjacencies(int num_faces);
84 void Test_Adj_Struct();
85 void Test_SGI_Struct();
86 void Write_Edges();
87 void Build_SGI_Table(int num_verts,int num_faces);
88 void Save_Walks(int numfaces);
89 void Find_Bands(int numfaces, FILE *output_file, int *swaps, int *bands, 
90                 int *cost, int *tri, int norms, int *vert_norms, int texture,
91                 int *vert_texture);
92 void Save_Rest(int *numfaces);
93 void Assign_Walk(int lastvert, PF_FACES temp2, int front_walk,int y,
94                                 int back_walk);
95 void Save_Walks(int numfaces);
96         
97
98 /*      Globals */
99 extern ListHead **PolVerts;
100 extern ListHead **PolFaces;
101 extern ListHead **PolEdges;
102 extern ListHead *array[60];
103 extern int     id_array[60];
104 extern ListHead *strips[1];
105 extern ListHead *all_strips[100000]; /*  Assume max 100000 strips */
106
107
108 #endif _POLVERTS_H