Integration of OCCT 6.5.0 from SVN
[occt.git] / src / InterfaceGraphic / InterfaceGraphic_Visual3d.hxx
CommitLineData
7fd59977 1
2#ifndef InterfaceGraphic_Visual3dHeader
3#define InterfaceGraphic_Visual3dHeader
4
5/*
6
7 Copyright (C) 1991,1992,1993 by
8
9 MATRA DATAVISION, FRANCE
10
11This software is furnished in accordance with the terms and conditions
12of the contract and with the inclusion of the above copyright notice.
13This software or any other copy thereof may not be provided or otherwise
14be made available to any other person. No title to an ownership of the
15software is hereby transferred.
16
17At the termination of the contract, the software and all copies of this
18software must be deleted.
19
20Facility : CAS-CADE V1
21
22*/
23
24 /* CAL 02/08/94
25 * #include <InterfaceGraphic_X11.hxx>
26 * Retrait de InterfaceGraphic_X11.hxx et declaration de Window
27 * a la mode X11 dans les structures CALL_DEF_VIEW et CALL_DEF_PICK.
28 * En effet, un #define Opposite 4 se trouve dans X11/X.h
29 * et rentre en conflit avec la methode Opposite de math_Matrix.
30 *
31 * PCT 05/08/97
32 * ajout support texture mapping
33 *
34 * EUG 21/09/99 G003
35 * degenerated mode support
36 Add fields IsDegenerates,IsDegeneratesPrev,Backfacing
37 in CALL_DEF_VIEW structure.
38 * VKH 25/01/00 G004
39 * Dump a view
40 Add CALL_DEF_BITMAP reference in CALL_DEF_VIEW
41 */
42
43#ifndef RIC120302
44#define RIC120302 /*GG Add NEW fields in CALL_DEF_VIEW structure
45// to manage graphic context and call back
46*/
47#endif
48
49#include <InterfaceGraphic_Aspect.hxx>
50#ifdef RIC120302
51#include <Aspect_RenderingContext.hxx>
52#include <Aspect_GraphicCallbackProc.hxx>
53#endif
54
55#include <OSD_FontAspect.hxx>
56
57typedef float CALL_DEF_MATRIX4X4[4][4];
58
59/* SOMMET */
60
61typedef struct {
62
63 float x, y, z;
64
65} CALL_DEF_VERTEX;
66
67
68/* MODELE CLIPPING */
69
70typedef struct {
71
72 int WsId;
73
74 int ViewId;
75
76 int PlaneId;
77
78 int Active;
79
80 float CoefA;
81 float CoefB;
82 float CoefC;
83 float CoefD;
84
85} CALL_DEF_PLANE;
86
87
88/* SOURCE LUMINEUSE */
89
90typedef struct {
91
92 int WsId;
93
94 int ViewId;
95
96 int LightId;
97
98 int Active;
99
100 int LightType;
101
102 int Headlight;
103
104 CALL_DEF_COLOR Color;
105
106 CALL_DEF_VERTEX Position;
107
108 CALL_DEF_VERTEX Direction;
109
110 float Concentration;
111
112 float Attenuation[2];
113
114 float Angle;
115
116} CALL_DEF_LIGHT;
117
118
119/* ORIENTATION */
120
121typedef struct {
122
123 CALL_DEF_VERTEX ViewReferencePoint;
124 CALL_DEF_VERTEX ViewReferencePlane;
125 CALL_DEF_VERTEX ViewReferenceUp;
126 float ViewScaleX;
127 float ViewScaleY;
128 float ViewScaleZ;
129
130 int IsCustomMatrix;
131 float ModelViewMatrix[4][4];
132
133} CALL_DEF_VIEWORIENTATION;
134
135
136/* MAPPING */
137
138typedef struct {
139
140 int Projection;
141
142 CALL_DEF_VERTEX ProjectionReferencePoint;
143
144 float ViewPlaneDistance;
145 float BackPlaneDistance;
146 float FrontPlaneDistance;
147
148 struct {
149 float um, vm, uM, vM;
150 } WindowLimit;
151
152 int IsCustomMatrix;
153 float ProjectionMatrix[4][4];
154
155} CALL_DEF_VIEWMAPPING;
156
157
158/* CONTEXT */
159
160 typedef struct {
161
162 int Aliasing;
163
164 int BackZClipping;
165 int FrontZClipping;
166
167 int DepthCueing;
168
169 float ZClipFrontPlane;
170 float ZClipBackPlane;
171
172 float DepthFrontPlane;
173 float DepthBackPlane;
174
175 int ZBufferActivity;
176 int Model;
177 int Visualization;
178
179 int NbActiveLight;
180 CALL_DEF_LIGHT *ActiveLight;
181
182 int NbActivePlane;
183 CALL_DEF_PLANE *ActivePlane;
184
185 int TexEnvId;
186 int SurfaceDetail;
187
188} CALL_DEF_VIEWCONTEXT;
189
190
191/* VUE */
192
193typedef struct {
194
195 int WsId;
196 int ViewId;
197 void *ptrView;
198
199 int IsDeleted;
200 int IsOpen;
201
202 int Active;
203
204 CALL_DEF_VIEWORIENTATION Orientation;
205 CALL_DEF_VIEWMAPPING Mapping;
206
207 CALL_DEF_VIEWORIENTATION OrientationReset;
208 CALL_DEF_VIEWMAPPING MappingReset;
209
210 CALL_DEF_VIEWCONTEXT Context;
211
212 CALL_DEF_WINDOW DefWindow;
213
214 CALL_DEF_BITMAP DefBitmap;
215
216 void *ptrUnderLayer;
217 void *ptrOverLayer;
218
219 int IsDegenerates;
220 int IsDegeneratesPrev;
221 int Backfacing;
222#ifdef RIC120302
223 Aspect_RenderingContext GContext;
224 Aspect_GraphicCallbackProc GDisplayCB;
225 void* GClientData;
226#endif
227
228 void *ptrFBO;
229
230} CALL_DEF_VIEW;
231
232
233/* REPERAGE */
234
235typedef struct {
236
237 int WsId;
238 int ViewId;
239
240 int x, y;
241
242 CALL_DEF_WINDOW DefWindow;
243
244 struct {
245 float aperture;
246 int order;
247 int depth;
248 } Context;
249
250 struct {
251 int depth;
252 int *listid;
253 int *listpickid;
254 int *listelem;
255 } Pick;
256
257} CALL_DEF_PICK;
258
259/* Graduated trihedron */
260typedef void (*minMaxValuesCallback)(void*);
261typedef struct
262{
263 /* Names of axes */
264 char *xname, *yname, *zname;
265 /* Draw names */
266 unsigned char xdrawname, ydrawname, zdrawname;
267 /* Draw values */
268 unsigned char xdrawvalues, ydrawvalues, zdrawvalues;
269 /* Draw grid */
270 unsigned char drawgrid;
271 /* Draw axes */
272 unsigned char drawaxes;
273 /* Number of splits along axes */
274 unsigned int nbx, nby, nbz;
275 /* Offset for drawing values */
276 int xoffset, yoffset, zoffset;
277 /* Offset for drawing names of axes */
278 int xaxisoffset, yaxisoffset, zaxisoffset;
279 /* Draw tickmarks */
280 unsigned char xdrawtickmarks, ydrawtickmarks, zdrawtickmarks;
281 /* Length of tickmarks */
282 unsigned int xtickmarklength, ytickmarklength, ztickmarklength;
283 /* Grid color */
284 float gridcolor[3];
285 /* X name color */
286 float xnamecolor[3];
287 /* Y name color */
288 float ynamecolor[3];
289 /* Z name color */
290 float znamecolor[3];
291 /* X color of axis and values */
292 float xcolor[3];
293 /* Y color of axis and values */
294 float ycolor[3];
295 /* Z color of axis and values */
296 float zcolor[3];
297 /* Font name of names of axes: Courier, Arial, ... */
298 char* fontOfNames;
299 /* Style of names of axes: OSD_FA_Regular, OSD_FA_Bold, ... */
300 OSD_FontAspect styleOfNames;
301 /* Size of names of axes: 8, 10, 12, 14, ... */
302 int sizeOfNames;
303 /* Font name of values: Courier, Arial, ... */
304 char* fontOfValues;
305 /* Style of values: OSD_FA_Regular, OSD_FA_Bold, ... */
306 OSD_FontAspect styleOfValues;
307 /* Size of values: 8, 10, 12, 14, ... */
308 int sizeOfValues;
309
310 /* Callback function to define boundary box of displayed objects */
311 minMaxValuesCallback cbCubicAxes;
312 void* ptrVisual3dView;
313
314} CALL_DEF_GRADUATEDTRIHEDRON;
315
316#endif /* InterfaceGraphic_Visual3dHeader */