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