0024070: OpenGL capped object-level clipping planes
[occt.git] / src / InterfaceGraphic / InterfaceGraphic_Graphic3d.hxx
1 // Copyright (c) 1991-1999 Matra Datavision
2 // Copyright (c) 1999-2012 OPEN CASCADE SAS
3 //
4 // The content of this file is subject to the Open CASCADE Technology Public
5 // License Version 6.5 (the "License"). You may not use the content of this file
6 // except in compliance with the License. Please obtain a copy of the License
7 // at http://www.opencascade.org and read it completely before using this file.
8 //
9 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 //
12 // The Original Code and all software distributed under the License is
13 // distributed on an "AS IS" basis, without warranty of any kind, and the
14 // Initial Developer hereby disclaims all such warranties, including without
15 // limitation, any warranties of merchantability, fitness for a particular
16 // purpose or non-infringement. Please see the License for the specific terms
17 // and conditions governing the rights and limitations under the License.
18
19 #ifndef InterfaceGraphic_Graphic3dHeader
20 #define InterfaceGraphic_Graphic3dHeader
21
22 #include <InterfaceGraphic_PrimitiveArray.hxx>
23 #include <Standard_Transient.hxx>
24
25 #ifdef THIS
26   #undef THIS
27 #endif
28
29 #define CALL_DEF_STRUCTHIGHLIGHTED      1
30 #define CALL_DEF_STRUCTPICKABLE         2
31 #define CALL_DEF_STRUCTVISIBLE          3
32
33 #define CALL_DEF_STRUCTNOHIGHLIGHTED    11
34 #define CALL_DEF_STRUCTNOPICKABLE       12
35 #define CALL_DEF_STRUCTNOVISIBLE        13
36
37 /* LISTE D'ENTIERS */
38
39 typedef struct {
40
41         int NbIntegers;
42
43         int *Integers;
44
45 } CALL_DEF_LISTINTEGERS;
46
47
48 /* LISTE DE REELS */
49
50 typedef struct {
51
52         int NbReals;
53
54         float *Reals;
55
56 } CALL_DEF_LISTREALS;
57
58
59 /* COULEUR */
60
61 typedef struct {
62
63         float r, g, b;
64
65 } CALL_DEF_COLOR;
66
67
68 /* ARETE */
69
70 typedef struct {
71
72         int Index1, Index2;
73
74         int Type;
75
76 } CALL_DEF_EDGE;
77
78
79 /* LISTE D'ARETES */
80
81 typedef struct {
82
83         int NbEdges;
84
85         CALL_DEF_EDGE *Edges;
86
87 } CALL_DEF_LISTEDGES;
88
89
90 /* NORMALE */
91
92 typedef struct {
93
94         float dx, dy, dz;
95
96 } CALL_DEF_NORMAL;
97
98
99 /* TEXTURE COORD */
100
101 typedef struct {
102
103         float tx, ty;
104
105 } CALL_DEF_TEXTURE_COORD;
106
107
108 /* POINT */
109
110 typedef struct {
111
112         float x, y, z;
113
114 } CALL_DEF_POINT;
115
116
117 /* POINTC */
118
119 typedef struct {
120
121         CALL_DEF_POINT Point;
122
123         CALL_DEF_COLOR Color;
124
125 } CALL_DEF_POINTC;
126
127
128 /* POINTN */
129
130 typedef struct {
131
132         CALL_DEF_POINT Point;
133
134         CALL_DEF_NORMAL Normal;
135
136 } CALL_DEF_POINTN;
137
138
139 /* POINTNT */
140
141 typedef struct {
142
143         CALL_DEF_POINT Point;
144
145         CALL_DEF_NORMAL Normal;
146
147         CALL_DEF_TEXTURE_COORD TextureCoord;
148
149 } CALL_DEF_POINTNT;
150
151
152 /* POINTNC */
153
154 typedef struct {
155
156         CALL_DEF_POINT Point;
157
158         CALL_DEF_NORMAL Normal;
159
160         CALL_DEF_COLOR Color;
161
162 } CALL_DEF_POINTNC;
163
164
165 /* BOITE ENGLOBANTE */
166
167 typedef struct {
168
169         CALL_DEF_COLOR Color;
170
171         CALL_DEF_POINT Pmin;
172
173         CALL_DEF_POINT Pmax;
174
175 } CALL_DEF_BOUNDBOX;
176
177
178 /* LISTE DE POINTS */
179
180 typedef union {
181
182         CALL_DEF_POINT *Points;
183
184         CALL_DEF_POINTN *PointsN;
185
186         CALL_DEF_POINTC *PointsC;
187
188         CALL_DEF_POINTNC *PointsNC;
189
190         CALL_DEF_POINTNT *PointsNT;
191
192 } CALL_DEF_UPOINTS;
193
194
195 /* LISTE DE POINTS */
196
197 typedef struct {
198
199         int NbPoints;
200
201         int TypePoints;
202
203         CALL_DEF_UPOINTS UPoints;
204
205 } CALL_DEF_LISTPOINTS;
206
207
208 /* MARKER */
209
210 typedef struct {
211
212         float x, y, z;
213
214 } CALL_DEF_MARKER;
215
216
217 /* LISTE DE MARKERS */
218
219 typedef struct {
220
221         int NbMarkers;
222
223         CALL_DEF_MARKER *Markers;
224
225 } CALL_DEF_LISTMARKERS;
226
227
228 /* TEXTE */
229
230 typedef struct {
231
232         unsigned short *string;
233
234         CALL_DEF_POINT Position;
235
236         float Height;
237
238         float Angle;
239
240         int Path;
241
242         int HAlign;
243
244         int VAlign;
245
246         bool Zoomable;
247
248 } CALL_DEF_TEXT;
249
250
251 /* FACETTE */
252
253 typedef struct {
254
255         int NormalIsDefined;
256
257         CALL_DEF_NORMAL Normal;
258
259         int ColorIsDefined;
260
261         CALL_DEF_COLOR Color;
262
263         int TypeFacet;
264
265         int NbPoints;
266
267         int TypePoints;
268
269         CALL_DEF_UPOINTS UPoints;
270
271 } CALL_DEF_FACET;
272
273
274 /* LISTE DE FACETTES */
275
276 typedef struct {
277
278         int NbFacets;
279
280         CALL_DEF_FACET *LFacets;
281
282 } CALL_DEF_LISTFACETS;
283
284
285 /* QUADRILATERE */
286
287 typedef struct {
288
289         int NbPoints;
290
291         int TypePoints;
292
293         int SizeRow;
294         int SizeCol;
295
296         CALL_DEF_UPOINTS UPoints;
297
298 } CALL_DEF_QUAD;
299
300
301 /* TRIANGLE */
302
303 typedef struct {
304
305         int NbPoints;
306
307         int TypePoints;
308
309         CALL_DEF_UPOINTS UPoints;
310
311 } CALL_DEF_TRIKE;
312
313
314 /* PICK IDENTIFICATEUR */
315
316 typedef struct {
317
318         int IsDef;
319
320         int IsSet;
321
322         int Value;
323
324 } CALL_DEF_PICKID;
325
326
327 /* CONTEXTE LIGNE */
328
329 typedef struct {
330
331         int IsDef;
332
333         int IsSet;
334
335         CALL_DEF_COLOR Color;
336
337         int LineType;
338
339         float Width;
340
341 } CALL_DEF_CONTEXTLINE;
342
343
344 /* MATERIAL */
345
346 typedef struct {
347
348         float Ambient;
349         int IsAmbient;
350
351         float Diffuse;
352         int IsDiffuse;
353
354         float Specular;
355         int IsSpecular;
356
357         float Emission;
358         int IsEmission;
359
360         float Transparency;
361         float Shininess;
362
363         float EnvReflexion;
364
365         int IsPhysic;
366
367         /* Attribut couleur eclairage */
368         CALL_DEF_COLOR ColorAmb, ColorDif, ColorSpec, ColorEms, Color;
369
370
371 } CALL_DEF_MATERIAL;
372
373
374 /* CONTEXTE TEXT */
375
376 typedef struct {
377
378         int IsDef;
379
380         int IsSet;
381
382         const char* Font;
383
384         float Space;
385
386         float Expan;
387
388         CALL_DEF_COLOR Color;
389
390         int Style;
391
392         int DisplayType;
393
394         CALL_DEF_COLOR ColorSubTitle;
395
396         int TextZoomable;
397
398         float TextAngle;
399
400         int TextFontAspect;
401
402
403 } CALL_DEF_CONTEXTTEXT;
404
405 /* Transform persistence struct */
406 typedef struct
407 {
408         int            IsSet;
409         int            IsDef;
410         int            Flag;
411         CALL_DEF_POINT Point;
412 } CALL_DEF_TRANSFORM_PERSISTENCE;
413
414 /* BOUNDING BOX */
415
416 typedef struct {
417
418         float XMin;
419         float YMin;
420         float ZMin;
421
422         float XMax;
423         float YMax;
424         float ZMax;
425
426 } CALL_DEF_BOUNDS;
427
428 /* USERDRAW DATA */
429
430 typedef struct {
431
432         void            *Data;
433         CALL_DEF_BOUNDS *Bounds;
434
435 } CALL_DEF_USERDRAW;
436
437 #endif /* InterfaceGraphic_Graphic3dHeader */