Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

open-axiom repository from github

24005 views
1
/*
2
Copyright (C) 1991-2002, The Numerical ALgorithms Group Ltd.
3
All rights reserved.
4
Copryight (C) 2007-2008, Gabriel Dos Reis.
5
All rights reserved.
6
7
Redistribution and use in source and binary forms, with or without
8
modification, are permitted provided that the following conditions are
9
met:
10
11
- Redistributions of source code must retain the above copyright
12
notice, this list of conditions and the following disclaimer.
13
14
- Redistributions in binary form must reproduce the above copyright
15
notice, this list of conditions and the following disclaimer in
16
the documentation and/or other materials provided with the
17
distribution.
18
19
- Neither the name of The Numerical ALgorithms Group Ltd. nor the
20
names of its contributors may be used to endorse or promote products
21
derived from this software without specific prior written permission.
22
23
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
24
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
27
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
*/
35
36
extern int scrn;
37
extern Display *dsply;
38
extern XFontStruct *globalFont, *buttonFont, *headerFont,
39
*titleFont, *graphFont,
40
*lightingFont, *volumeFont, *quitFont, *saveFont,
41
*serverFont;
42
extern XrmDatabase rDB;
43
44
extern char scaleReport[5], deltaXReport[5], deltaYReport[5];
45
extern unsigned long *spadColors;
46
extern int followMouse, gotToggle, viewportKeyNum;
47
extern Window rtWindow, quitWindow, saveWindow;
48
extern GC globalGC1, globalGC2, anotherGC, globGC, trashGC,
49
componentGC, opaqueGC, renderGC,
50
controlMessageGC, lightingGC, volumeGC, quitGC,
51
saveGC, graphGC;
52
extern XSizeHints viewSizeHints;
53
extern HashTable *table;
54
extern Colormap colorMap;
55
extern int Socket, ack;
56
57
extern GC processGC;
58
extern viewPoints *viewport;
59
extern controlPanelStruct *control;
60
extern XGCValues gcVals;
61
extern const char* s;
62
extern int someInt;
63
64
extern unsigned long foregroundColor, backgroundColor;
65
extern int mono, totalColors,
66
totalHues, totalSolidShades, totalSolid,
67
totalDitheredAndSolids,totalShades;
68
69
extern int drawMore;
70
extern int spadMode,spadDraw;
71
extern int spadSignalReceived;
72
extern int inNextEvent;
73
extern jmp_buf jumpFlag;
74
75
extern char errorStr[80];
76
77
extern view3DStruct viewData;
78
79
extern Window lightingWindow, lightingAxes;
80
extern float lightPointer[3], tempLightPointer[3];
81
extern float lightIntensity, tempLightIntensity;
82
extern float backLightIntensity;
83
84
extern char filename[256];
85
86
87
/** stuff from draw viewport routines */
88
extern float sinTheta, sinPhi, cosTheta, cosPhi,
89
viewScale, viewScaleX, viewScaleY, viewScaleZ, reScale;
90
extern int xCenter, yCenter;
91
extern XWindowAttributes vwInfo;
92
extern XWindowAttributes graphWindowAttrib;
93
extern XPoint *quadMesh;
94
extern int *xPts;
95
extern XImage *imageX;
96
97
extern float eyePoint[3];
98
99
extern XPoint polygonMesh[20];
100
101
extern int saveFlag;
102
extern int firstTime, noTrans, startup;
103
extern int redrawView;
104
extern int finishedList, redoSmooth, redoColor, zoomed,
105
rotated, switchedPerspective, changedEyeDistance,
106
translated, changedIntensity, movingLight, writeImage,
107
pixelSetFlag, redoDither, multiColorFlag;
108
extern poly *quickList;
109
110
extern int viewAloned;
111
112
extern viewTriple corners[8], clipCorners[8];
113
extern boxSideStruct box[6], clipBox[6];
114
extern int axesXY[3][4];
115
extern float axesZ[3][2];
116
117
extern viewTriple *splitPoints;
118
extern int resMax;
119
120
extern Window volumeWindow;
121
extern int frustrumVertex;
122
extern int doingPanel;
123
extern int doingVolume;
124
extern int screenX;
125
extern float xClipMinN, xClipMaxN,
126
yClipMinN, yClipMaxN,
127
zClipMinN, zClipMaxN,
128
clipValue;
129
130
extern float pzMin, pzMax;
131
132
extern int maxGreyShade;
133
134
extern char propertyName[];
135
extern char propertyBuffer[];
136
137
extern float transform[4][4], transform1[4][4],
138
R[4][4], R1[4][4], S[4][4], T[4][4], I[4][4];
139
extern float vxmax,vxmin,vymax,vymin,
140
wxmax,wxmin,wymax,wymin,wzmax,wzmin;
141
142
extern polyList *scanList[ARRAY_HEIGHT];
143
extern int scanline, polyCount;
144
extern float xleft, xright;
145
146
extern colorBuffer cBuffer[ARRAY_WIDTH];
147
extern float zBuffer[ARRAY_WIDTH];
148
149
extern float zC, dzdx;
150
extern float intersectColor[2], dcolor;
151
extern triple dpt, dnorm;
152
153
extern float Cspec, Cdiff, Camb, coeff, lum, saturation;
154
155
extern Pixmap viewmap;
156
extern int viewmap_valid;
157
extern int smoothHue;
158
extern int smoothConst;
159
extern int smoothError;
160
161
extern char *PSfilename; /* output file name in user directory */
162
extern char *envAXIOM; /* used for ps file paths */
163
164
extern Atom wm_delete_window;
165
166
167