0022792: Globally defined symbol PI conflicts with VTK definition (Intel compiler)
[occt.git] / src / OpenGl / OpenGl_telem_view.hxx
CommitLineData
7fd59977 1/***********************************************************************
2
3FONCTION :
4----------
5File OpenGl_telem_view.h :
6
7
8REMARQUES:
9----------
10
11
12HISTORIQUE DES MODIFICATIONS :
13--------------------------------
14xx-xx-xx : xxx ; Creation.
1502-07-96 : FMN ; Suppression WSWSHeight et WSWSWidth
16Suppression de TelSetWSWindow
1703-07-96 : FMN ; A une workstation correspond une vue.
18Suppression de TelGetViewportAtLocation()
19Suppression de TelPrintAllViews()
2003-03-98 : FMN ; Suppression variable externe TglWhetherPerspective
21
22************************************************************************/
23
24#ifndef OPENGL_TELEM_VIEW_H
25#define OPENGL_TELEM_VIEW_H
26
27#include <OpenGl_telem.hxx>
2de462d4
A
28#include <OpenGl_tgl.hxx>
29#include <NCollection_List.hxx>
7fd59977 30
31typedef struct
32{
33 Tfloat xmin;
34 Tfloat xmax;
35 Tfloat ymin;
36 Tfloat ymax;
37} Tlimit;
38
39typedef struct
40{
41 Tfloat xmin;
42 Tfloat xmax;
43 Tfloat ymin;
44 Tfloat ymax;
45 Tfloat zmin;
46 Tfloat zmax;
47} Tlimit3;
48
2de462d4
A
49
50
7fd59977 51typedef enum
52{
53 TelParallel, TelPerspective
54} TelProjType;
55
56typedef struct
57{
58 Tlimit window;
59 Tlimit3 viewport;
60 TelProjType proj;
61 Tfloat prp[3];
62 Tfloat vpd;
63 Tfloat fpd;
64 Tfloat bpd;
65} TEL_VIEW_MAPPING, *tel_view_mapping;
66
67
68typedef struct
69{
70 Tmatrix3 orientation_matrix;
71 Tmatrix3 mapping_matrix;
72 Tlimit3 clip_limit;
73 Tint clip_xy;
74 Tint clip_back;
75 Tint clip_front;
76 Tint shield_indicator;
77 TEL_COLOUR shield_colour;
78 Tint border_indicator;
79 TEL_COLOUR border_colour;
80 Tint active_status;
2de462d4 81 NCollection_List<CALL_DEF_PLANE> clipping_planes;
7fd59977 82 struct
83 {
84 Tfloat vrp[3];
85 Tfloat vpn[3];
86 Tfloat vup[3];
87 TEL_VIEW_MAPPING map;
88 Tfloat scaleFactors[3];
89 } extra;
90} TEL_VIEW_REP, *tel_view_rep;
91
92
93typedef enum
94{
95 UVN2XYZ, XYZ2UVN
96} TelCoordType;
97
98extern Tint TglUpdateView0; /* defined in telem/view */
99
100extern void /* vrp, vpn, vup, error_ind, mat */
101TelEvalViewOrientationMatrix(Tfloat*, Tfloat*, Tfloat*, Tfloat*, Tint*, Tmatrix3);
102
103extern void /* mapping, error_ind, mat */
104TelEvalViewMappingMatrix( tel_view_mapping, Tint*, Tmatrix3 );
105
106extern void /* mapping, error_ind, mat, cx, cy */
107TelEvalViewMappingMatrixPick(tel_view_mapping, Tint*, Tmatrix3, Tfloat, Tfloat);
108
109extern TStatus /* ws, view_id, view_representation */
110TelSetViewRepresentation( Tint, Tint, tel_view_rep );
111
112extern TStatus /* ws, view_id, type, uvn, xyz */
113TelConvertCoord( Tint, Tint, TelCoordType, Tfloat*, Tfloat* );
114
115extern TStatus TelSetViewIndex( Tint, Tint ); /* ws, view_id */
116extern TStatus TelSetViewProjection( Tint, Tint ); /* ws, view_id */
117extern TStatus /* ws, view_id, view_representation */
118TelGetViewRepresentation( Tint, Tint, tel_view_rep );
119extern TStatus TelDeleteViewsForWS( Tint wsid );
120
121
122extern void TelClearViews( Tint ); /* ws */
123extern void TelClearBackground( Tint ); /* ws */
124
125extern TStatus TelPrintViewRepresentation( Tint, Tint ); /* ws, view */
126extern TStatus Tel2Dto3D( Tint ws, Tint vid, Tint x, Tint y,
127 Tfloat *x1, Tfloat *y1, Tfloat *z1,
128 Tfloat *x2, Tfloat *y2, Tfloat *z2 );
129/* x is from bottom */
130/* y is from top */
131
132#endif