Commit | Line | Data |
---|---|---|
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> | |
2de462d4 A |
28 | #include <OpenGl_tgl.hxx> |
29 | #include <NCollection_List.hxx> | |
7fd59977 | 30 | |
31 | typedef struct | |
32 | { | |
33 | Tfloat xmin; | |
34 | Tfloat xmax; | |
35 | Tfloat ymin; | |
36 | Tfloat ymax; | |
37 | } Tlimit; | |
38 | ||
39 | typedef 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 | 51 | typedef enum |
52 | { | |
53 | TelParallel, TelPerspective | |
54 | } TelProjType; | |
55 | ||
56 | typedef 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 | ||
68 | typedef 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 | ||
93 | typedef enum | |
94 | { | |
95 | UVN2XYZ, XYZ2UVN | |
96 | } TelCoordType; | |
97 | ||
98 | extern Tint TglUpdateView0; /* defined in telem/view */ | |
99 | ||
100 | extern void /* vrp, vpn, vup, error_ind, mat */ | |
101 | TelEvalViewOrientationMatrix(Tfloat*, Tfloat*, Tfloat*, Tfloat*, Tint*, Tmatrix3); | |
102 | ||
103 | extern void /* mapping, error_ind, mat */ | |
104 | TelEvalViewMappingMatrix( tel_view_mapping, Tint*, Tmatrix3 ); | |
105 | ||
106 | extern void /* mapping, error_ind, mat, cx, cy */ | |
107 | TelEvalViewMappingMatrixPick(tel_view_mapping, Tint*, Tmatrix3, Tfloat, Tfloat); | |
108 | ||
109 | extern TStatus /* ws, view_id, view_representation */ | |
110 | TelSetViewRepresentation( Tint, Tint, tel_view_rep ); | |
111 | ||
112 | extern TStatus /* ws, view_id, type, uvn, xyz */ | |
113 | TelConvertCoord( Tint, Tint, TelCoordType, Tfloat*, Tfloat* ); | |
114 | ||
115 | extern TStatus TelSetViewIndex( Tint, Tint ); /* ws, view_id */ | |
116 | extern TStatus TelSetViewProjection( Tint, Tint ); /* ws, view_id */ | |
117 | extern TStatus /* ws, view_id, view_representation */ | |
118 | TelGetViewRepresentation( Tint, Tint, tel_view_rep ); | |
119 | extern TStatus TelDeleteViewsForWS( Tint wsid ); | |
120 | ||
121 | ||
122 | extern void TelClearViews( Tint ); /* ws */ | |
123 | extern void TelClearBackground( Tint ); /* ws */ | |
124 | ||
125 | extern TStatus TelPrintViewRepresentation( Tint, Tint ); /* ws, view */ | |
126 | extern 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 |