b311480e |
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 | |
7fd59977 |
19 | #ifndef InterfaceGraphic_Graphic3dHeader |
20 | #define InterfaceGraphic_Graphic3dHeader |
21 | |
22 | #include <InterfaceGraphic_PrimitiveArray.hxx> |
bf75be98 |
23 | #include <Standard_Transient.hxx> |
7fd59977 |
24 | |
25 | #ifdef THIS |
bf75be98 |
26 | #undef THIS |
7fd59977 |
27 | #endif |
7fd59977 |
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 | |
13a22457 |
232 | unsigned short *string; |
7fd59977 |
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; |
bf75be98 |
245 | |
13a22457 |
246 | bool Zoomable; |
7fd59977 |
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; |
bf75be98 |
364 | |
7fd59977 |
365 | int IsPhysic; |
366 | |
367 | /* Attribut couleur eclairage */ |
bf75be98 |
368 | CALL_DEF_COLOR ColorAmb, ColorDif, ColorSpec, ColorEms, Color; |
7fd59977 |
369 | |
7fd59977 |
370 | |
bf75be98 |
371 | } CALL_DEF_MATERIAL; |
7fd59977 |
372 | |
373 | |
374 | /* CONTEXTE MARKER */ |
375 | |
376 | typedef struct { |
377 | |
378 | int IsDef; |
379 | |
380 | int IsSet; |
381 | |
382 | CALL_DEF_COLOR Color; |
383 | |
384 | int MarkerType; |
385 | |
386 | float Scale; |
387 | |
388 | } CALL_DEF_CONTEXTMARKER; |
389 | |
390 | |
391 | /* CONTEXTE TEXT */ |
392 | |
393 | typedef struct { |
394 | |
395 | int IsDef; |
396 | |
397 | int IsSet; |
398 | |
c320e557 |
399 | const char* Font; |
7fd59977 |
400 | |
401 | float Space; |
402 | |
403 | float Expan; |
404 | |
405 | CALL_DEF_COLOR Color; |
bf75be98 |
406 | |
7fd59977 |
407 | int Style; |
bf75be98 |
408 | |
7fd59977 |
409 | int DisplayType; |
410 | |
411 | CALL_DEF_COLOR ColorSubTitle; |
412 | |
413 | int TextZoomable; |
bf75be98 |
414 | |
7fd59977 |
415 | float TextAngle; |
416 | |
417 | int TextFontAspect; |
bf75be98 |
418 | |
419 | |
7fd59977 |
420 | } CALL_DEF_CONTEXTTEXT; |
421 | |
422 | /* Transform persistence struct */ |
423 | typedef struct |
424 | { |
425 | int IsSet; |
426 | int IsDef; |
427 | int Flag; |
428 | CALL_DEF_POINT Point; |
429 | } CALL_DEF_TRANSFORM_PERSISTENCE; |
430 | |
7fd59977 |
431 | /* BOUNDING BOX */ |
432 | |
433 | typedef struct { |
434 | |
435 | float XMin; |
436 | float YMin; |
437 | float ZMin; |
bf75be98 |
438 | |
7fd59977 |
439 | float XMax; |
440 | float YMax; |
441 | float ZMax; |
442 | |
443 | } CALL_DEF_BOUNDS; |
444 | |
445 | /* USERDRAW DATA */ |
446 | |
447 | typedef struct { |
448 | |
449 | void *Data; |
450 | CALL_DEF_BOUNDS *Bounds; |
451 | |
452 | } CALL_DEF_USERDRAW; |
453 | |
454 | #endif /* InterfaceGraphic_Graphic3dHeader */ |