1 /*
2  * ME3D 3-D Modeler Program
3  * Copyright (C) 1998 Sam Revitch
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License
7  * as published by the Free Software Foundation; either version 2
8  * of the License, or (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18  */
19 
20 /* User interface models used in editor */
21 /* including: the cursor, the yellow girder bars, etc. */
22 
23 static GLfloat view_cursor_ccw[] = {	/* C4F_N3F_V3F CCW */
24   0.8, 0.1, 0.0, 1.0, -0.5773502,  0.5773502,  0.5773502,  0.0,  1.0,  0.0,
25   0.8, 0.1, 0.0, 1.0, -0.5773502,  0.5773502,  0.5773502, -1.0,  0.0,  0.0,
26   0.8, 0.1, 0.0, 1.0, -0.5773502,  0.5773502,  0.5773502,  0.0,  0.0,  1.0,
27   0.8, 0.1, 0.0, 1.0,  0.5773502, -0.5773502, -0.5773502,  0.0, -1.0,  0.0,
28   0.8, 0.1, 0.0, 1.0,  0.5773502, -0.5773502, -0.5773502,  0.0,  0.0, -1.0,
29   0.8, 0.1, 0.0, 1.0,  0.5773502, -0.5773502, -0.5773502,  1.0,  0.0,  0.0,
30   0.8, 0.0, 0.8, 1.0, -0.5773502,  0.5773502, -0.5773502,  0.0,  1.0,  0.0,
31   0.8, 0.0, 0.8, 1.0, -0.5773502,  0.5773502, -0.5773502,  0.0,  0.0, -1.0,
32   0.8, 0.0, 0.8, 1.0, -0.5773502,  0.5773502, -0.5773502, -1.0,  0.0,  0.0,
33   0.8, 0.0, 0.8, 1.0,  0.5773502, -0.5773502,  0.5773502,  0.0, -1.0,  0.0,
34   0.8, 0.0, 0.8, 1.0,  0.5773502, -0.5773502,  0.5773502,  1.0,  0.0,  0.0,
35   0.8, 0.0, 0.8, 1.0,  0.5773502, -0.5773502,  0.5773502,  0.0,  0.0,  1.0,
36   0.1, 0.8, 0.0, 1.0,  0.5773502,  0.5773502, -0.5773502,  0.0,  1.0,  0.0,
37   0.1, 0.8, 0.0, 1.0,  0.5773502,  0.5773502, -0.5773502,  1.0,  0.0,  0.0,
38   0.1, 0.8, 0.0, 1.0,  0.5773502,  0.5773502, -0.5773502,  0.0,  0.0, -1.0,
39   0.1, 0.8, 0.0, 1.0, -0.5773502, -0.5773502,  0.5773502,  0.0, -1.0,  0.0,
40   0.1, 0.8, 0.0, 1.0, -0.5773502, -0.5773502,  0.5773502,  0.0,  0.0,  1.0,
41   0.1, 0.8, 0.0, 1.0, -0.5773502, -0.5773502,  0.5773502, -1.0,  0.0,  0.0,
42   0.8, 0.8, 0.0, 1.0,  0.5773502,  0.5773502,  0.5773502,  0.0,  1.0,  0.0,
43   0.8, 0.8, 0.0, 1.0,  0.5773502,  0.5773502,  0.5773502,  0.0,  0.0,  1.0,
44   0.8, 0.8, 0.0, 1.0,  0.5773502,  0.5773502,  0.5773502,  1.0,  0.0,  0.0,
45   0.8, 0.8, 0.0, 1.0, -0.5773502, -0.5773502, -0.5773502,  0.0, -1.0,  0.0,
46   0.8, 0.8, 0.0, 1.0, -0.5773502, -0.5773502, -0.5773502, -1.0,  0.0,  0.0,
47   0.8, 0.8, 0.0, 1.0, -0.5773502, -0.5773502, -0.5773502,  0.0,  0.0, -1.0
48 };
49 
50 static GLfloat view_cursor_cw[] = {	/* C4F_N3F_V3F CW */
51   0.8, 0.1, 0.0, 1.0, -0.5773502,  0.5773502,  0.5773502,  0.0,  1.0,  0.0,
52   0.8, 0.1, 0.0, 1.0, -0.5773502,  0.5773502,  0.5773502,  0.0,  0.0,  1.0,
53   0.8, 0.1, 0.0, 1.0, -0.5773502,  0.5773502,  0.5773502, -1.0,  0.0,  0.0,
54   0.8, 0.1, 0.0, 1.0,  0.5773502, -0.5773502, -0.5773502,  0.0, -1.0,  0.0,
55   0.8, 0.1, 0.0, 1.0,  0.5773502, -0.5773502, -0.5773502,  1.0,  0.0,  0.0,
56   0.8, 0.1, 0.0, 1.0,  0.5773502, -0.5773502, -0.5773502,  0.0,  0.0, -1.0,
57   0.8, 0.0, 0.8, 1.0, -0.5773502,  0.5773502, -0.5773502,  0.0,  1.0,  0.0,
58   0.8, 0.0, 0.8, 1.0, -0.5773502,  0.5773502, -0.5773502, -1.0,  0.0,  0.0,
59   0.8, 0.0, 0.8, 1.0, -0.5773502,  0.5773502, -0.5773502,  0.0,  0.0, -1.0,
60   0.8, 0.0, 0.8, 1.0,  0.5773502, -0.5773502,  0.5773502,  0.0, -1.0,  0.0,
61   0.8, 0.0, 0.8, 1.0,  0.5773502, -0.5773502,  0.5773502,  0.0,  0.0,  1.0,
62   0.8, 0.0, 0.8, 1.0,  0.5773502, -0.5773502,  0.5773502,  1.0,  0.0,  0.0,
63   0.1, 0.8, 0.0, 1.0,  0.5773502,  0.5773502, -0.5773502,  0.0,  1.0,  0.0,
64   0.1, 0.8, 0.0, 1.0,  0.5773502,  0.5773502, -0.5773502,  0.0,  0.0, -1.0,
65   0.1, 0.8, 0.0, 1.0,  0.5773502,  0.5773502, -0.5773502,  1.0,  0.0,  0.0,
66   0.1, 0.8, 0.0, 1.0, -0.5773502, -0.5773502,  0.5773502,  0.0, -1.0,  0.0,
67   0.1, 0.8, 0.0, 1.0, -0.5773502, -0.5773502,  0.5773502, -1.0,  0.0,  0.0,
68   0.1, 0.8, 0.0, 1.0, -0.5773502, -0.5773502,  0.5773502,  0.0,  0.0,  1.0,
69   0.8, 0.8, 0.0, 1.0,  0.5773502,  0.5773502,  0.5773502,  0.0,  1.0,  0.0,
70   0.8, 0.8, 0.0, 1.0,  0.5773502,  0.5773502,  0.5773502,  1.0,  0.0,  0.0,
71   0.8, 0.8, 0.0, 1.0,  0.5773502,  0.5773502,  0.5773502,  0.0,  0.0,  1.0,
72   0.8, 0.8, 0.0, 1.0, -0.5773502, -0.5773502, -0.5773502,  0.0, -1.0,  0.0,
73   0.8, 0.8, 0.0, 1.0, -0.5773502, -0.5773502, -0.5773502,  0.0,  0.0, -1.0,
74   0.8, 0.8, 0.0, 1.0, -0.5773502, -0.5773502, -0.5773502, -1.0,  0.0,  0.0
75 };
76 
77 static GLfloat view_vertex_ccw[] = {	/* N3F_V3F CCW */
78    0.0,  0.0,  1.0, -1.0,  1.0,  1.0,
79    0.0,  0.0,  1.0, -1.0, -1.0,  1.0,
80    0.0,  0.0,  1.0,  1.0, -1.0,  1.0,
81    0.0,  0.0,  1.0,  1.0,  1.0,  1.0,
82    0.0,  0.0, -1.0, -1.0,  1.0, -1.0,
83    0.0,  0.0, -1.0,  1.0,  1.0, -1.0,
84    0.0,  0.0, -1.0,  1.0, -1.0, -1.0,
85    0.0,  0.0, -1.0, -1.0, -1.0, -1.0,
86    0.0,  1.0,  0.0,  1.0,  1.0,  1.0,
87    0.0,  1.0,  0.0,  1.0,  1.0, -1.0,
88    0.0,  1.0,  0.0, -1.0,  1.0, -1.0,
89    0.0,  1.0,  0.0, -1.0,  1.0,  1.0,
90    0.0, -1.0,  0.0,  1.0, -1.0,  1.0,
91    0.0, -1.0,  0.0, -1.0, -1.0,  1.0,
92    0.0, -1.0,  0.0, -1.0, -1.0, -1.0,
93    0.0, -1.0,  0.0,  1.0, -1.0, -1.0,
94    1.0,  0.0,  0.0,  1.0,  1.0,  1.0,
95    1.0,  0.0,  0.0,  1.0, -1.0,  1.0,
96    1.0,  0.0,  0.0,  1.0, -1.0, -1.0,
97    1.0,  0.0,  0.0,  1.0,  1.0, -1.0,
98   -1.0,  0.0,  0.0, -1.0,  1.0,  1.0,
99   -1.0,  0.0,  0.0, -1.0,  1.0, -1.0,
100   -1.0,  0.0,  0.0, -1.0, -1.0, -1.0,
101   -1.0,  0.0,  0.0, -1.0, -1.0,  1.0
102 };
103 
104 static GLfloat view_vertex_cw[] = {	/* N3F_V3F CW */
105    0.0,  0.0,  1.0, -1.0,  1.0,  1.0,
106    0.0,  0.0,  1.0,  1.0,  1.0,  1.0,
107    0.0,  0.0,  1.0,  1.0, -1.0,  1.0,
108    0.0,  0.0,  1.0, -1.0, -1.0,  1.0,
109    0.0,  0.0, -1.0, -1.0,  1.0, -1.0,
110    0.0,  0.0, -1.0, -1.0, -1.0, -1.0,
111    0.0,  0.0, -1.0,  1.0, -1.0, -1.0,
112    0.0,  0.0, -1.0,  1.0,  1.0, -1.0,
113    0.0,  1.0,  0.0,  1.0,  1.0,  1.0,
114    0.0,  1.0,  0.0, -1.0,  1.0,  1.0,
115    0.0,  1.0,  0.0, -1.0,  1.0, -1.0,
116    0.0,  1.0,  0.0,  1.0,  1.0, -1.0,
117    0.0, -1.0,  0.0,  1.0, -1.0,  1.0,
118    0.0, -1.0,  0.0,  1.0, -1.0, -1.0,
119    0.0, -1.0,  0.0, -1.0, -1.0, -1.0,
120    0.0, -1.0,  0.0, -1.0, -1.0,  1.0,
121    1.0,  0.0,  0.0,  1.0,  1.0,  1.0,
122    1.0,  0.0,  0.0,  1.0,  1.0, -1.0,
123    1.0,  0.0,  0.0,  1.0, -1.0, -1.0,
124    1.0,  0.0,  0.0,  1.0, -1.0,  1.0,
125   -1.0,  0.0,  0.0, -1.0,  1.0,  1.0,
126   -1.0,  0.0,  0.0, -1.0, -1.0,  1.0,
127   -1.0,  0.0,  0.0, -1.0, -1.0, -1.0,
128   -1.0,  0.0,  0.0, -1.0,  1.0, -1.0
129 };
130 
131 static GLfloat view_girder_cw[] = {	/* N3F_V3F CCW */
132    0,  1, 0,  -1,  1, 0,
133    0,  1, 0,   1,  1, 0,
134    0,  1, 0,   1,  1, 0,
135    0,  1, 0,  -1,  1, 0,
136   -1,  0, 0,  -1, -1, 0,
137   -1,  0, 0,  -1,  1, 0,
138   -1,  0, 0,  -1,  1, 0,
139   -1,  0, 0,  -1, -1, 0,
140    0, -1, 0,   1, -1, 0,
141    0, -1, 0,  -1, -1, 0,
142    0, -1, 0,  -1, -1, 0,
143    0, -1, 0,   1, -1, 0,
144    1,  0, 0,   1,  1, 0,
145    1,  0, 0,   1, -1, 0,
146    1,  0, 0,   1, -1, 0,
147    1,  0, 0,   1,  1, 0
148 };
149 
150 static GLfloat view_girder_ccw[] = {	/* N3F_V3F CW */
151    0,  1, 0,   1,  1, 0,
152    0,  1, 0,  -1,  1, 0,
153    0,  1, 0,  -1,  1, 0,
154    0,  1, 0,   1,  1, 0,
155   -1,  0, 0,  -1,  1, 0,
156   -1,  0, 0,  -1, -1, 0,
157   -1,  0, 0,  -1, -1, 0,
158   -1,  0, 0,  -1,  1, 0,
159    0, -1, 0,  -1, -1, 0,
160    0, -1, 0,   1, -1, 0,
161    0, -1, 0,   1, -1, 0,
162    0, -1, 0,  -1, -1, 0,
163    1,  0, 0,   1, -1, 0,
164    1,  0, 0,   1,  1, 0,
165    1,  0, 0,   1,  1, 0,
166    1,  0, 0,   1, -1, 0
167 };
168