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