9e0e0d34085a3a55887e46c8f1e8cb44e70dec93
[occt.git] / src / OpenGl / OpenGl_tgl_funcs.hxx
1 /***********************************************************************
2
3 FONCTION :
4 ----------
5 Fichier OpenGl_tgl_funcs.h
6
7
8 REMARQUES:
9 ---------- 
10
11
12 HISTORIQUE DES MODIFICATIONS   :
13 --------------------------------
14 ??-??-?? : PCT ; creation
15 10-07-96 : FMN ; Suppression #define sur calcul matrice
16 05-08-97 : PCT ; support texture mapping
17 23-12-97 : FMN ; Suppression TelBackInteriorStyle, TelBackInteriorStyleIndex
18 15-01-98 : FMN ; Ajout Hidden line
19 08-04-98 : FGU ; Ajout emission 
20 27-11-98 : CAL ; S4062. Ajout des layers.
21 30-11-98 : FMN ; S3819 : Textes toujours visibles
22 22-03-04 : SAN ; OCC4895 High-level interface for controlling polygon offsets
23 04-10-04 : ABD ; Added User Defined marker type
24
25 ************************************************************************/
26
27 /*----------------------------------------------------------------------*/
28
29 #ifndef  OPENGL_TGL_FUNCS_H
30 #define  OPENGL_TGL_FUNCS_H
31
32 #define BUC60570        /* GG 06-09-99
33 //              The model view SD_NORMAL must shown objects with FLAT shading
34 */
35
36 #ifndef G003
37 #define G003            /* EUG 06-10-99 Degeneration support
38 */
39 #endif
40
41
42 #define  BUC61044    /* 25/10/01 SAV ; added functionality to control gl depth testing
43 from higher API */
44 #define  BUC61045    /* 25/10/01 SAV ; added functionality to control gl lighting 
45 from higher API */
46
47
48 /*----------------------------------------------------------------------*/
49 /*
50 * Includes
51 */
52 #include <OpenGl_tgl_all.hxx>
53 #include <OpenGl_telem.hxx>
54 #include <OpenGl_telem_pick.hxx>
55 #include <OpenGl_tsm.hxx>
56 #include <InterfaceGraphic_Aspect.hxx>
57 #include <InterfaceGraphic_Graphic3d.hxx>
58 #include <InterfaceGraphic_Visual3d.hxx>
59
60 #include <OSD_FontAspect.hxx>
61 #include <Graphic3d_CGraduatedTrihedron.hxx>
62
63 /*----------------------------------------------------------------------*/
64 /*
65 * Types definis
66 */
67
68 typedef float matrix3[4][4];
69
70 typedef enum {
71   TYPE_PARAL,
72   TYPE_PERSPECT
73 } projtype;
74
75 typedef enum {
76   IND_NO_CLIP,
77   IND_CLIP
78 } clip_ind;
79
80 typedef struct {
81   float   x;  /* x coordinate */
82   float   y;  /* y coordinate */
83   float   z;  /* z coordinate */
84 } point3;
85
86 typedef struct {
87   float   delta_x;    /* x magnitude */
88   float   delta_y;    /* y magnitude */
89   float   delta_z;    /* z magnitude */
90 } vec3;
91
92 typedef struct {
93   float   x_min;  /* x min */
94   float   x_max;  /* x max */
95   float   y_min;  /* y min */
96   float   y_max;  /* y max */
97   float   z_min;  /* z min */
98   float   z_max;  /* z max */
99 } limit3;
100
101 typedef struct {
102   float   x_min;  /* x min */
103   float   x_max;  /* x max */
104   float   y_min;  /* y min */
105   float   y_max;  /* y max */
106 } limit;
107
108 typedef struct {
109   limit   win;    /* window limits */
110   limit3  proj_vp;    /* viewport limits */
111   projtype    proj_type;  /* projection type */
112   point3  proj_ref_point; /* projection reference point */
113   float   view_plane; /* view plane distance */
114   float   back_plane; /* back plane distance */
115   float   front_plane;    /* front plane distance */
116 } view_map3;
117
118 /*----------------------------------------------------------------------*/
119 /*
120 * Prototypes
121 */
122
123 extern  void  call_func_label(Tint); /* lid */
124 extern  void  call_func_set_view_ind(Tint); /* vid */
125 extern  void  call_func_appl_data(void*); /* data */
126 extern  void  call_func_set_local_tran3(Tmatrix3, TComposeType); /* mat, mode */
127 extern  void  call_func_set_linewidth(Tfloat); /* lw */
128 extern  void  call_func_set_linetype(Tint); /* lt */
129 extern  void  call_func_set_int_style(Tint); /* is */
130 extern  void  call_func_set_edge_flag(Tint); /* state */
131 extern  void  call_func_set_edge_type(Tint); /* type */
132 extern  void  call_func_set_edgewidth(Tfloat); /* width */
133 extern  void  call_func_set_int_style_ind(Tint); /* ind */
134 extern  void  call_func_set_face_disting_mode(Tint); /* mode */
135 extern  void  call_func_set_face_cull_mode(Tint); /* mode */
136 extern  void  call_func_set_marker_type(Tint); /* type */
137 extern  void  call_func_set_marker_size(Tfloat); /* size */
138 extern  void  call_func_exec_struct(Tint); /* stid */
139 extern  void  call_func_init_tgl(void);
140 extern  void  call_func_post_struct(Tint, Tint, Tfloat); /* ws, stid, prio */
141 extern  void  call_func_set_int_shad_meth(Tint); /* method */
142 extern  void  call_func_set_refl_eqn(Tint); /* eqn */
143 extern  void  call_func_set_back_refl_eqn(Tint); /* eqn */
144 extern  void  call_func_set_text_font(Tchar*); /* font */
145 extern  void  call_func_set_char_space(Tfloat); /* sp */
146 extern  void  call_func_set_char_expan(Tfloat); /* exp */
147 extern  void  call_func_set_pick_id(Tint); /* pickid */
148 extern  void  call_func_redraw_all_structs (Tint, Tint); /* wsid, swap */
149 extern  void  call_func_redraw_all_structs_begin (Tint); /* wsid */
150 extern  void  call_func_redraw_all_structs_proc (Tint); /* wsid */
151 extern  void  call_func_redraw_all_structs_end (Tint, Tint); /* wsid, swap */
152 extern  void  call_func_set_anno_char_ht(Tfloat); /* height */
153 extern  void  call_func_set_anno_char_up_vec(Tfloat[2]); /* up_vector */
154 extern  void  call_func_set_anno_path(Tint); /* path */
155 extern  void  call_func_set_anno_align(Tint, Tint); /* hor, ver */
156 extern  void  call_func_anno_text_rel3( tel_point, Techar* );
157 extern  void  call_func_dcue_ind(Tint); /* dcid */
158 extern  void  call_func_set_do_texturemap(Tint); /* bool */
159 extern  void  call_func_set_texture_id(Tint); /* TextureID */
160 extern  void  call_func_set_text_style(int); /* style */
161 extern  void  call_func_set_text_display_type(int); /* display_type */
162 #ifdef G003
163 extern  void call_func_set_degenerate_model ( Tint, Tfloat ); /* degenerate model */
164 #endif  /* G003 */
165
166 extern  void  call_func_set_text_zoomable(Tint); /*Text Zoomable usage*/
167 extern  void  call_func_set_text_angle(Tfloat); /*Text Angle usage*/
168 extern  void  call_func_set_text_fontaspect(OSD_FontAspect); /*Text Zoomable usage*/
169
170 /* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
171 extern  void  call_func_set_polygon_offset_params( Tint,     /* mode */
172                                                   Tfloat,   /* factor */
173                                                   Tfloat ); /* units */
174 /* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
175
176 /* ABD 29/10/04  Transform Persistence of Presentation( pan, zoom, rotate ) */
177 extern  void call_func_set_transform_persistence( Tint, Tfloat, Tfloat, Tfloat );
178 /* extern  void  call_func_set_transform_persistence( tel_transform_persistence tp );*/
179 /* ABD 29/10/04  Transform Persistence of Presentation( pan, zoom, rotate ) */
180
181
182 /* OCC18942: obsolete in OCCT6.3, might be removed in further versions! */
183 extern void call_func_eval_ori_matrix3( point3 *vrp, vec3 *vpn, vec3 *vup,
184                                        int *err_ind, float mout[4][4] );
185 /* OCC18942: obsolete in OCCT6.3, might be removed in further versions! */
186 extern void call_func_eval_map_matrix3( view_map3 *Map, int *err_ind,
187                                        matrix3 mat );
188
189 /*----------------------------------------------------------------------*/
190 /*
191 * Constantes
192 */
193
194 /* Edge types */
195 #define  CALL_PHIGS_EDGE_OFF           TOff
196 #define  CALL_PHIGS_EDGE_ON            TOn
197
198 /* Edge data flags */
199 #define  CALL_PHIGS_EDGE_NONE          TOff
200 #define  CALL_PHIGS_EDGE_VISIBILITY    TOn
201
202 /* Line Types */
203 #define  CALL_PHIGS_LINE_SOLID         TEL_LS_SOLID
204 #define  CALL_PHIGS_LINE_DASH          TEL_LS_DASH
205 #define  CALL_PHIGS_LINE_DOT           TEL_LS_DOT
206 #define  CALL_PHIGS_LINE_DASH_DOT      TEL_LS_DASH_DOT
207
208 /* Marker types */
209 #define  CALL_PHIGS_MARKER_DOT          TEL_PM_DOT
210 #define  CALL_PHIGS_MARKER_PLUS         TEL_PM_PLUS
211 #define  CALL_PHIGS_MARKER_ASTERISK     TEL_PM_STAR
212 #define  CALL_PHIGS_MARKER_CIRCLE       TEL_PM_CIRC
213 #define  CALL_PHIGS_MARKER_CROSS        TEL_PM_CROSS
214 #define  CALL_PHIGS_MARKER_USER_DEFINED TEL_PM_USERDEFINED
215
216 /* Text : Path */
217 #define  CALL_PHIGS_PATH_RIGHT         0
218 #define  CALL_PHIGS_PATH_LEFT          0
219 #define  CALL_PHIGS_PATH_UP            0
220 #define  CALL_PHIGS_PATH_DOWN          0
221
222 /* Text : Horizontal alignment */
223 #define  CALL_PHIGS_HOR_LEFT           0
224 #define  CALL_PHIGS_HOR_CENTER         1
225 #define  CALL_PHIGS_HOR_RIGHT          2
226
227 /* Text : Vertical alignment */
228 #define  CALL_PHIGS_VERT_BOTTOM        0
229 #define  CALL_PHIGS_VERT_CENTER        1
230 #define  CALL_PHIGS_VERT_TOP           2
231
232 /* Interior styles */
233 #define  CALL_PHIGS_STYLE_HOLLOW       TSM_HOLLOW
234 #define  CALL_PHIGS_STYLE_SOLID        TSM_SOLID
235 #define  CALL_PHIGS_STYLE_HATCH        TSM_HATCH
236 #define  CALL_PHIGS_STYLE_EMPTY        TSM_EMPTY
237 #define  CALL_PHIGS_STYLE_HIDDENLINE   TSM_HIDDENLINE
238
239 /* Light Source Types */
240 #define  CALL_PHIGS_LIGHT_AMBIENT      TLightAmbient
241 #define  CALL_PHIGS_LIGHT_DIRECTIONAL  TLightDirectional
242 #define  CALL_PHIGS_LIGHT_POSITIONAL   TLightPositional
243 #define  CALL_PHIGS_LIGHT_SPOT         TLightSpot
244
245 /* Hatch styles */
246 #define  CALL_PHIGS_HATCH_HORIZ        TEL_HS_HORIZONTAL
247 #define  CALL_PHIGS_HATCH_HORIZ_DBL    TEL_HS_HORIZONTAL_SPARSE
248 #define  CALL_PHIGS_HATCH_VERT         TEL_HS_VERTICAL
249 #define  CALL_PHIGS_HATCH_VERT_DBL     TEL_HS_VERTICAL_SPARSE
250 #define  CALL_PHIGS_HATCH_DIAG_45      TEL_HS_DIAG_45
251 #define  CALL_PHIGS_HATCH_DIAG_45_DBL  TEL_HS_DIAG_45_SPARSE
252 #define  CALL_PHIGS_HATCH_DIAG_135     TEL_HS_DIAG_135
253 #define  CALL_PHIGS_HATCH_DIAG_135_DBL TEL_HS_DIAG_135_SPARSE
254 #define  CALL_PHIGS_HATCH_GRID_R       TEL_HS_GRID
255 #define  CALL_PHIGS_HATCH_GRID_R_DBL   TEL_HS_GRID_SPARSE
256 #define  CALL_PHIGS_HATCH_GRID_D       TEL_HS_CROSS
257 #define  CALL_PHIGS_HATCH_GRID_D_DBL   TEL_HS_CROSS_SPARSE
258
259 /* Edit modes */
260 #define  CALL_PHIGS_EDIT_INSERT        TEditInsert
261 #define  CALL_PHIGS_EDIT_REPLACE       TEditReplace
262
263 /* Transformation */
264 #define  CALL_PHIGS_TYPE_PRECONCAT     TPreConcatenate
265 #define  CALL_PHIGS_TYPE_POSTCONCAT    TPostConcatenate
266 #define  CALL_PHIGS_TYPE_REPLACE       TReplace
267
268 /* Clipping indicators */
269 #define  CALL_PHIGS_IND_NO_CLIP        TOff
270 #define  CALL_PHIGS_IND_CLIP           TOn
271
272 /* Projection types */
273 #define  CALL_PHIGS_TYPE_PARAL         TelParallel
274 #define  CALL_PHIGS_TYPE_PERSPECT      TelPerspective
275
276 /* shading methods */
277 #define  CALL_PHIGS_SD_NONE            TEL_SM_FLAT
278 #define  CALL_PHIGS_SD_COLOUR          TEL_SM_GOURAUD
279 #define  CALL_PHIGS_SD_DOT_PRODUCT     TEL_SM_GOURAUD
280 #ifndef BUC60570
281 #define  CALL_PHIGS_SD_NORMAL          TEL_SM_GOURAUD
282 #else
283 #define  CALL_PHIGS_SD_NORMAL          TEL_SM_FLAT
284 #endif
285
286 /* lighting methods */
287 #define  CALL_PHIGS_REFL_NONE               0x0000
288 #define  AMBIENT_MASK                       0x0001
289 #define  DIFFUSE_MASK                       0x0002
290 #define  SPECULAR_MASK                      0x0004
291 #define  EMISSIVE_MASK                      0x0008
292
293 /* cull mode */
294 #define  CALL_PHIGS_CULL_NONE          TelCullNone
295 #define  CALL_PHIGS_CULL_BACKFACE      TelCullBack
296 #define  CALL_PHIGS_CULL_FRONTFACE     TelCullFront
297
298 /* depth cue mode */
299 #define  CALL_PHIGS_SUPPRESSED         TelDCSuppressed
300 #define  CALL_PHIGS_ALLOWED            TelDCAllowed
301
302 /* distinguish mode */
303 #define  CALL_PHIGS_DISTING_NO         TOff
304 #define  CALL_PHIGS_DISTING_YES        TOn
305
306 #define  CALL_DEF_ENABLE_ZBUFFER       TOn
307 #define  CALL_DEF_DISABLE_ZBUFFER      TOff
308
309 /* style of text */
310 #define  ASPECT_TOST_NORMAL     0
311 #define  ASPECT_TOST_ANNOTATION 1
312
313 /* display type of the text */
314 #define  ASPECT_TODT_NORMAL     0
315 #define  ASPECT_TODT_SUBTITLE   1
316 #define  ASPECT_TODT_DEKALE     2
317 #define  ASPECT_TODT_BLEND      3
318
319 /* Pick Order */
320 #define  PTOP_FIRST                       TTopFirst
321 #define  PBOTTOM_FIRST                    TBottomFirst
322
323 /* Facet types */
324 #define  CALL_PHIGS_SHAPE_COMPLEX         TEL_SHAPE_COMPLEX
325 #define  CALL_PHIGS_SHAPE_NONCONVEX       TEL_SHAPE_CONCAVE
326 #define  CALL_PHIGS_SHAPE_CONVEX          TEL_SHAPE_CONVEX
327 #define  CALL_PHIGS_SHAPE_UNKNOWN         TEL_SHAPE_UNKNOWN
328
329 /* Vertex flags */
330 #define CALL_PHIGS_VERT_COORD                   TEL_VTFLAG_NONE
331 #define CALL_PHIGS_VERT_COORD_COLOUR            TEL_VTFLAG_COLOUR
332 #define CALL_PHIGS_VERT_COORD_NORMAL            TEL_VTFLAG_NORMAL
333 #define CALL_PHIGS_VERT_COORD_COLOUR_NORMAL     TEL_VTFLAG_COLOURNORMAL
334
335 /* Facet data flags */
336 #define CALL_PHIGS_FACET_NONE                   TEL_FAFLAG_NONE
337 #define CALL_PHIGS_FACET_COLOUR                 TEL_FAFLAG_COLOUR
338 #define CALL_PHIGS_FACET_NORMAL                 TEL_FAFLAG_NORMAL
339 #define CALL_PHIGS_FACET_COLOUR_NORMAL          TEL_FAFLAG_COLOURNORMAL
340
341 /* functions */
342 #define  call_func_open_struct         TsmOpenStructure
343 #define  call_func_close_struct        TsmCloseStructure
344 #define  call_func_set_edit_mode       TsmSetEditMode
345 #define  call_func_set_elem_ptr        TsmSetElementPointer
346 #define  call_func_offset_elem_ptr     TsmOffsetElementPointer
347 #define  call_func_set_elem_ptr_label  TsmSetElementPointerAtLabel
348 #define  call_func_del_elem            TsmDeleteElement
349 #define  call_func_del_elem_range      TsmDeleteElementRange
350 #define  call_func_del_elems_labels    TsmDeleteElementsBetweenLabels
351 #define  call_func_del_struct          TsmDeleteStructure 
352
353 #define call_func_inq_elem_ptr             TsmGetCurElemPtr
354
355 /* Declarations  des subroutines  triedron */
356
357 void EXPORT call_togl_ztriedron_setup (
358                                        float* xcolor,
359                                        float* ycolor,
360                                        float* zcolor,
361                                        float  sizeratio,
362                                        float  axisdiameter,
363                                        int    nbfacettes          
364                                        );
365
366 void EXPORT call_togl_triedron_display (
367                                         CALL_DEF_VIEW * aview, 
368                                         int APosition, 
369                                         float r,
370                                         float g,
371                                         float b,
372                                         float AScale,
373                                         int asWireframe 
374                                         );
375
376 void EXPORT call_togl_triedron_erase (
377                                       CALL_DEF_VIEW *aview
378                                       );
379
380 void EXPORT call_togl_triedron_echo (
381                                      CALL_DEF_VIEW *aview,
382                                      int AType
383                                      );
384
385 /* Graduated trihedron */
386
387 void EXPORT call_togl_graduatedtrihedron_display(CALL_DEF_VIEW* view,
388                                                  const Graphic3d_CGraduatedTrihedron &cubic);
389
390 void EXPORT call_togl_graduatedtrihedron_erase(CALL_DEF_VIEW* view);
391
392 void EXPORT call_togl_graduatedtrihedron_minmaxvalues(float xmin, float ymin, float zmin,
393                                                       float xmax, float ymax, float zmax);
394
395 /* Declarations  des subroutines  mode immediat */
396
397 int EXPORT call_togl_begin_ajout_mode (
398                                        CALL_DEF_VIEW *aview
399                                        );
400
401 void EXPORT call_togl_end_ajout_mode (
402                                       );
403
404 int EXPORT call_togl_begin_immediat_mode (
405   CALL_DEF_VIEW *aview,
406   CALL_DEF_LAYER *anunderlayer,
407   CALL_DEF_LAYER *anoverlayer,
408   int doublebuffer,
409   int   retainmode
410   );
411
412 void EXPORT call_togl_end_immediat_mode (
413   int synchronize
414   );
415
416 void EXPORT call_togl_clear_immediat_mode (
417   CALL_DEF_VIEW *aview,
418   int aFlush
419   );
420
421 void EXPORT call_togl_transform (
422                                  CALL_DEF_MATRIX4X4 amatrix,
423                                  int mode
424                                  );
425
426 void EXPORT call_togl_begin_polyline (
427                                       );
428
429 void EXPORT call_togl_end_polyline (
430                                     );
431
432 void EXPORT call_togl_begin_polygon (
433                                      );
434
435 void EXPORT call_togl_end_polygon (
436                                    );
437
438 void EXPORT call_togl_begin_trianglemesh (
439   );
440
441 void EXPORT call_togl_end_trianglemesh (
442                                         );
443
444 void EXPORT call_togl_begin_marker (
445                                     );
446
447 void EXPORT call_togl_end_marker (
448                                   );
449
450 void EXPORT call_togl_begin_bezier (
451                                     );
452
453 void EXPORT call_togl_end_bezier (
454                                   );
455
456 void EXPORT call_togl_move (
457                             float x,
458                             float y,
459                             float z
460                             );
461
462 void EXPORT call_togl_movenormal (
463                                   float x,
464                                   float y,
465                                   float z,
466                                   float nx,
467                                   float ny,
468                                   float nz
469                                   );
470
471 void EXPORT call_togl_moveweight (
472                                   float x,
473                                   float y,
474                                   float z,
475                                   float w
476                                   );
477
478 void EXPORT call_togl_draw (
479                             float x,
480                             float y,
481                             float z
482                             );
483
484 void EXPORT call_togl_drawnormal (
485                                   float x,
486                                   float y,
487                                   float z,
488                                   float nx,
489                                   float ny,
490                                   float nz
491                                   );
492
493 void EXPORT call_togl_drawweight (
494                                   float x,
495                                   float y,
496                                   float z,
497                                   float w
498                                   );
499
500 void EXPORT call_togl_draw_text (
501                                  CALL_DEF_TEXT *atext
502                                  );
503
504 void EXPORT call_togl_draw_structure (
505                                       int StructId
506                                       );
507
508 void EXPORT call_togl_set_linecolor (
509                                      float r,
510                                      float g,
511                                      float b
512                                      );
513
514 void EXPORT call_togl_set_interiorcolor (
515   float r,
516   float g,
517   float b
518   );
519
520 void EXPORT call_togl_set_linetype (
521
522                                     long type
523
524                                     );
525
526 void EXPORT call_togl_set_interiortype (
527
528                                         long type
529
530                                         );
531
532 void EXPORT call_togl_set_linewidth (
533
534                                      float width
535
536                                      );
537
538 void EXPORT call_togl_set_textcolor (
539
540                                      float r,
541                                      float g,
542                                      float b
543
544                                      );
545
546 void EXPORT call_togl_set_textfont (
547
548                                     char *police,
549                                     float factor,
550                                     float space
551
552                                     );
553
554 void EXPORT call_togl_set_markercolor (
555
556                                        float r,
557                                        float g,
558                                        float b
559
560                                        );
561
562 void EXPORT call_togl_set_markertype (
563
564                                       long type,
565                                       float scale
566
567                                       );
568
569 void EXPORT call_togl_set_minmax (
570
571                                   float x1,
572                                   float y1,
573                                   float z1,
574                                   float x2,
575                                   float y2,
576                                   float z2
577
578                                   );
579
580 void EXPORT call_togl_set_rgb (
581
582                                float r,
583                                float g,
584                                float b
585
586                                );
587
588 /* Declarations des subroutines appelees du C++ */
589 /*    dans les packages Graphic3d et Visual3d   */
590
591 void EXPORT call_togl_opengroup (
592
593                                  CALL_DEF_GROUP *agroup
594
595                                  );
596
597 void EXPORT call_togl_closegroup (
598
599                                   CALL_DEF_GROUP *agroup
600
601                                   );
602
603 void EXPORT call_togl_cleargroup (
604
605                                   CALL_DEF_GROUP *agroup
606
607                                   );
608
609 void EXPORT call_togl_linecontextgroup (
610
611                                         CALL_DEF_GROUP *agroup,
612                                         int noinsert
613
614                                         );
615
616 void EXPORT call_togl_facecontextgroup (
617
618                                         CALL_DEF_GROUP *agroup,
619                                         int noinsert
620
621                                         );
622
623 void EXPORT call_togl_markercontextgroup (
624
625   CALL_DEF_GROUP *agroup,
626   int noinsert
627
628   );
629
630 void EXPORT call_togl_textcontextgroup (
631
632                                         CALL_DEF_GROUP *agroup,
633                                         int noinsert
634
635                                         );
636
637 void EXPORT call_togl_group (
638
639                              CALL_DEF_GROUP *agroup
640
641                              );
642
643 void EXPORT call_togl_marker (
644
645                               CALL_DEF_GROUP *agroup,
646                               CALL_DEF_MARKER *amarker
647
648                               );
649
650 void EXPORT call_togl_marker_set (
651
652                                   CALL_DEF_GROUP *agroup,
653                                   CALL_DEF_LISTMARKERS *almarkers
654
655                                   );
656
657 void EXPORT call_togl_polyline (
658
659                                 CALL_DEF_GROUP *agroup,
660                                 CALL_DEF_LISTPOINTS *alpoints
661
662                                 );
663
664 void EXPORT call_togl_polygon (
665
666                                CALL_DEF_GROUP *agroup,
667                                CALL_DEF_FACET *afacet
668
669                                );
670
671 void EXPORT call_togl_polygon_holes (
672
673                                      CALL_DEF_GROUP *agroup,
674                                      CALL_DEF_LISTFACETS *alfacets
675
676                                      );
677
678 void EXPORT call_togl_polygon_indices (
679
680                                        CALL_DEF_GROUP *agroup,
681                                        CALL_DEF_LISTPOINTS *alpoints,
682                                        CALL_DEF_LISTEDGES *aledges,
683                                        CALL_DEF_LISTINTEGERS *albounds
684
685                                        );
686
687 void EXPORT call_togl_pickid (
688
689                               CALL_DEF_GROUP *agroup
690
691                               );
692
693 void EXPORT call_togl_quadrangle (
694
695                                   CALL_DEF_GROUP *agroup,
696                                   CALL_DEF_QUAD *aquad
697
698                                   );
699
700 void EXPORT call_togl_removegroup (
701
702                                    CALL_DEF_GROUP *agroup
703
704                                    );
705
706 void EXPORT call_togl_text (
707
708                             CALL_DEF_GROUP *agroup,
709                             CALL_DEF_TEXT *atext
710
711                             );
712
713 void EXPORT call_togl_triangle (
714
715                                 CALL_DEF_GROUP *agroup,
716                                 CALL_DEF_TRIKE *atrike
717
718                                 );
719
720 void EXPORT call_togl_bezier (
721
722                               CALL_DEF_GROUP *agroup,
723                               CALL_DEF_LISTPOINTS *alpoints
724
725                               );
726
727 void EXPORT call_togl_bezier_weight (
728
729                                      CALL_DEF_GROUP *agroup,
730                                      CALL_DEF_LISTPOINTS *alpoints,
731                                      CALL_DEF_LISTREALS *alweights
732
733                                      );
734
735 void EXPORT call_togl_blink (
736
737                              CALL_DEF_STRUCTURE *astructure,
738                              int create
739
740                              );
741
742 void EXPORT call_togl_boundarybox (
743
744                                    CALL_DEF_STRUCTURE *astructure,
745                                    int create
746
747                                    );
748
749 void EXPORT call_togl_clearstructure (
750
751                                       CALL_DEF_STRUCTURE *astructure
752
753                                       );
754
755 void EXPORT call_togl_contextstructure (
756
757                                         CALL_DEF_STRUCTURE *astructure
758
759                                         );
760
761 void EXPORT call_togl_highlightcolor (
762
763                                       CALL_DEF_STRUCTURE *astructure,
764                                       CALL_DEF_COLOR *acolor,
765                                       int create
766
767                                       );
768
769 void EXPORT call_togl_namesetstructure (
770
771                                         CALL_DEF_STRUCTURE *astructure
772
773                                         );
774
775 void EXPORT call_togl_removestructure (
776
777                                        CALL_DEF_STRUCTURE *astructure
778
779                                        );
780
781 void EXPORT call_togl_structure (
782
783                                  CALL_DEF_STRUCTURE *astructure
784
785                                  );
786
787 void EXPORT call_togl_transformstructure (
788
789   CALL_DEF_STRUCTURE *astructure
790
791   );
792
793 void EXPORT call_togl_degeneratestructure (
794
795   CALL_DEF_STRUCTURE *astructure
796
797   );
798
799 void EXPORT call_togl_connect (
800
801                                CALL_DEF_STRUCTURE *afather,
802                                CALL_DEF_STRUCTURE *ason
803
804                                );
805
806 void EXPORT call_togl_disconnect (
807
808                                   CALL_DEF_STRUCTURE *afather,
809                                   CALL_DEF_STRUCTURE *ason
810
811                                   );
812
813 int EXPORT call_togl_begin_animation (
814
815                                       CALL_DEF_VIEW *aview
816
817                                       );
818
819 void EXPORT call_togl_end_animation (
820
821                                      CALL_DEF_VIEW *aview
822
823                                      );
824
825 int EXPORT call_togl_begin (
826
827                             char *adisplay
828
829                             );
830
831 /*RIC120302*/
832 int EXPORT call_togl_begin_display (
833
834                                     void *pdisplay
835
836                                     );
837 /*RIC120302*/
838
839 void EXPORT call_togl_end (
840
841
842                            );
843
844 void EXPORT call_togl_structure_exploration (
845
846   long Id,
847   long LabelBegin,
848   long LabelEnd
849
850   );
851
852 void EXPORT call_togl_element_exploration (
853
854   long Id,
855   long elem_num,
856   long *type,
857   CALL_DEF_POINT *pt,
858   CALL_DEF_NORMAL *npt,
859   CALL_DEF_COLOR *cpt,
860   CALL_DEF_NORMAL *nfa
861
862   );
863
864 void EXPORT call_togl_element_type (
865
866                                     long Id,
867                                     long elem_num,
868                                     long *type
869
870                                     );
871
872 void EXPORT call_togl_activateview (
873
874                                     CALL_DEF_VIEW *aview
875
876                                     );
877
878 void EXPORT call_togl_antialiasing (
879
880                                     CALL_DEF_VIEW *aview,
881                                     int tag
882
883                                     );
884
885 void EXPORT call_togl_background (
886
887                                   CALL_DEF_VIEW *aview
888
889                                   );
890
891 void EXPORT call_togl_gradient_background (
892
893                                            int ws, int type,
894                                            tel_colour tcolor1, tel_colour tcolor2
895                                           
896                                           );
897
898 void EXPORT call_togl_set_gradient_type (
899  
900                                          int ws, int type
901
902                                         );
903
904 int EXPORT call_togl_project_raster (
905
906                                      int wsid,
907                                      float x,
908                                      float y,
909                                      float z,
910                                      int *ixr,
911                                      int *iyr
912
913                                      );
914
915 int EXPORT call_togl_adopt_to_rect( 
916                                    int,
917                                    int,
918                                    int 
919                                    );
920
921 int EXPORT call_togl_unproject_raster (
922
923                                        int wsid,
924                                        int xm,
925                                        int ym,
926                                        int xM,
927                                        int yM,
928                                        int ixr,
929                                        int iyr,
930                                        float *x,
931                                        float *y,
932                                        float *z
933
934                                        );
935
936 int EXPORT call_togl_unproject_raster_with_ray (
937
938   int wsid,
939   int xm,
940   int ym,
941   int xM,
942   int yM,
943   int ixr,
944   int iyr,
945   float *x,
946   float *y,
947   float *z,
948   float *dx,
949   float *dy,
950   float *dz
951
952   );
953
954 void EXPORT call_togl_cliplimit (
955
956                                  CALL_DEF_VIEW *aview,
957                                  int wait
958
959                                  );
960
961 void EXPORT call_togl_deactivateview (
962
963                                       CALL_DEF_VIEW *aview
964
965                                       );
966
967 void EXPORT call_togl_depthcueing (
968
969                                    CALL_DEF_VIEW *aview,
970                                    int tag
971
972                                    );
973
974 void EXPORT call_togl_displaystructure (
975
976                                         CALL_DEF_VIEW *aview,
977                                         int StructId,
978                                         int Priority
979
980                                         );
981
982 void EXPORT call_togl_erasestructure (
983
984                                       int ViewId,
985                                       int StructId
986
987                                       );
988
989 void EXPORT call_togl_init_pick (
990
991
992                                  );
993
994 void EXPORT call_togl_pick (
995
996                             CALL_DEF_PICK *apick
997
998                             );
999
1000 void EXPORT call_togl_ratio_window (
1001
1002                                     CALL_DEF_VIEW *aview
1003
1004                                     );
1005
1006 void EXPORT call_togl_redraw (
1007
1008                               CALL_DEF_VIEW *aview,
1009                               CALL_DEF_LAYER *anunderlayer,
1010                               CALL_DEF_LAYER *anoverlayer
1011
1012                               );
1013
1014 void EXPORT call_togl_redraw_area (
1015
1016                                    CALL_DEF_VIEW *aview,
1017                                    CALL_DEF_LAYER *anunderlayer,
1018                                    CALL_DEF_LAYER *anoverlayer,
1019                                    int x, int y, int width, int height
1020
1021                                    );
1022
1023 void EXPORT call_togl_removeview (
1024
1025                                   CALL_DEF_VIEW *aview
1026
1027                                   );
1028
1029 void EXPORT call_togl_setlight (
1030
1031                                 CALL_DEF_VIEW *aview
1032
1033                                 );
1034
1035 void EXPORT call_togl_setplane (
1036
1037                                 CALL_DEF_VIEW *aview
1038
1039                                 );
1040
1041 void EXPORT call_togl_setvisualisation (
1042
1043                                         CALL_DEF_VIEW *aview
1044
1045                                         );
1046
1047 void EXPORT call_togl_transparency (
1048
1049                                     int WsId,
1050                                     int ViewId,
1051                                     int Activity
1052
1053                                     );
1054
1055 void EXPORT call_togl_update (
1056
1057                               CALL_DEF_VIEW *aview,
1058                               CALL_DEF_LAYER *anunderlayer,
1059                               CALL_DEF_LAYER *anoverlayer
1060
1061                               );
1062
1063 int EXPORT call_togl_view (
1064
1065                            CALL_DEF_VIEW *aview
1066
1067                            );
1068
1069 int EXPORT call_togl_viewmapping (
1070
1071                                   CALL_DEF_VIEW *aview,
1072                                   int wait
1073
1074                                   );
1075
1076 int EXPORT call_togl_vieworientation (
1077
1078                                       CALL_DEF_VIEW *aview,
1079                                       int wait
1080
1081                                       );
1082
1083 int EXPORT call_togl_inquiretexture (
1084
1085
1086                                      );
1087
1088 int EXPORT call_togl_inquirelight (
1089
1090
1091                                    );
1092
1093 int EXPORT call_togl_inquireplane (
1094
1095
1096                                    );
1097
1098 int EXPORT call_togl_inquireview (
1099
1100
1101                                   );
1102
1103 int EXPORT call_togl_inquiremat (
1104
1105                                  CALL_DEF_VIEW *aview,
1106                                  CALL_DEF_MATRIX4X4 ori_matrix,
1107                                  CALL_DEF_MATRIX4X4 map_matrix
1108
1109                                  );
1110
1111 void EXPORT call_togl_view_exploration (
1112
1113                                         long Id
1114
1115                                         );
1116
1117 #ifdef OCC1188
1118 int EXPORT call_togl_create_texture (
1119
1120                                      int Type,
1121                                      unsigned int Width,
1122                                      unsigned int Height,
1123                                      unsigned char *Data,
1124                                      char *FileName             
1125
1126                                      );
1127
1128 void EXPORT call_togl_create_bg_texture (
1129
1130   CALL_DEF_VIEW *aview,
1131   int width,
1132   int height,
1133   unsigned char *data,
1134   int style
1135
1136   );
1137 #endif /* OCC1188 */
1138
1139 void EXPORT call_togl_set_bg_texture_style( 
1140
1141   CALL_DEF_VIEW* aview,
1142   int style
1143
1144   );
1145
1146 void EXPORT call_togl_destroy_texture (
1147
1148                                        int TexId
1149
1150                                        );
1151
1152 void EXPORT call_togl_modify_texture (
1153
1154                                       int TexId,
1155                                       CALL_DEF_INIT_TEXTURE *init_tex
1156
1157                                       );
1158
1159 void EXPORT call_togl_environment (
1160
1161                                    CALL_DEF_VIEW *aview
1162
1163                                    );           
1164
1165 /* Declarations des subroutines layer mode */
1166
1167 void EXPORT call_togl_layer2d (
1168
1169                                CALL_DEF_LAYER *alayer
1170
1171                                );
1172
1173 void EXPORT call_togl_removelayer2d (
1174
1175                                      CALL_DEF_LAYER *alayer
1176
1177                                      );
1178
1179 void EXPORT call_togl_begin_layer2d (
1180
1181                                      CALL_DEF_LAYER *alayer
1182
1183                                      );
1184
1185 void EXPORT call_togl_end_layer2d (
1186                                    );
1187
1188 void EXPORT call_togl_clear_layer2d (
1189
1190                                      CALL_DEF_LAYER *alayer
1191
1192                                      );
1193
1194 void EXPORT call_togl_begin_polyline2d (
1195                                         );
1196
1197 void EXPORT call_togl_end_polyline2d (
1198                                       );
1199
1200 void EXPORT call_togl_begin_polygon2d (
1201                                        );
1202
1203 void EXPORT call_togl_end_polygon2d (
1204                                      );
1205
1206 void EXPORT call_togl_move2d (
1207
1208                               float x,
1209                               float y
1210
1211                               );
1212
1213 void EXPORT call_togl_draw2d (
1214
1215                               float x,
1216                               float y
1217
1218                               );
1219
1220 void EXPORT call_togl_edge2d (
1221
1222                               float x,
1223                               float y
1224
1225                               );
1226
1227 void EXPORT call_togl_rectangle2d (
1228
1229                                    float x,
1230                                    float y,
1231                                    float w,
1232                                    float h
1233
1234                                    );
1235
1236 void EXPORT call_togl_set_color (
1237
1238                                  float r,
1239                                  float g,
1240                                  float b
1241
1242                                  );
1243
1244 void EXPORT call_togl_set_transparency (
1245
1246                                         float a
1247
1248                                         );
1249
1250 void EXPORT call_togl_unset_transparency (  );
1251
1252 void EXPORT call_togl_set_line_attributes (
1253
1254                                            long type,
1255                                            float width
1256
1257                                            );
1258
1259 void EXPORT call_togl_set_text_attributes (
1260
1261                                            Tchar* font,
1262                                            long type,
1263                                            float r,
1264                                            float g,
1265                                            float b
1266
1267                                            );
1268
1269 void EXPORT call_togl_set_text_attributes (
1270
1271                                            Tchar* font,
1272                                            Tint height,
1273                                            OSD_FontAspect type,
1274                                            float r,
1275                                            float g,
1276                                            float b
1277
1278                                            );
1279
1280 void EXPORT call_togl_set_text_scale_factors (
1281
1282                                               Tfloat x,
1283                                               Tfloat y
1284
1285                                               );
1286
1287 void EXPORT call_togl_text2d (
1288
1289                               Techar *s,
1290                               float x,
1291                               float y,
1292                               float height
1293
1294                               );
1295
1296 void EXPORT call_togl_textsize2d (
1297
1298                                   Techar *s,
1299                                   float height,
1300                                   float *width,
1301                                   float *ascent,
1302                                   float *descent
1303
1304                                   );
1305
1306 void EXPORT call_togl_backfacing (
1307
1308                                   CALL_DEF_VIEW*
1309
1310                                   );
1311
1312 /* *** group of parray functions *** */
1313
1314 void EXPORT call_togl_parray (
1315
1316                               CALL_DEF_GROUP *agroup,
1317                               CALL_DEF_PARRAY* parray
1318
1319                               );
1320
1321 void EXPORT call_togl_userdraw (
1322
1323                                 CALL_DEF_GROUP    *agroup,
1324                                 CALL_DEF_USERDRAW *anobject
1325
1326                                 );
1327
1328 /* ------------------------- */
1329 void EXPORT call_togl_print (
1330
1331                              CALL_DEF_VIEW *aview,
1332                              CALL_DEF_LAYER *anunderlayer,
1333                              CALL_DEF_LAYER *anoverlayer,
1334                              const Aspect_Drawable hPrintDC,
1335                              const int background,
1336                              const char* filename
1337
1338                              );
1339
1340
1341 #ifdef BUC61044
1342 void EXPORT call_togl_depthtest (
1343
1344                                  CALL_DEF_VIEW *aview,
1345                                  int            dFlag
1346
1347                                  );
1348
1349 int EXPORT call_togl_isdepthtest (
1350
1351                                   CALL_DEF_VIEW *aview
1352
1353                                   );
1354 #endif
1355
1356 #ifdef BUC61045
1357 void EXPORT call_togl_gllight (
1358
1359                                CALL_DEF_VIEW *aview,
1360                                int            dFlag
1361
1362                                );
1363
1364 int EXPORT call_togl_isgllight (
1365
1366                                 CALL_DEF_VIEW *aview
1367
1368                                 );
1369 #endif
1370
1371 /*----------------------------------------------------------------------*/
1372
1373 #endif