0023870: Integration of new options of sweeping into BRepOffsetAPI_MakePipe algorithm.
[occt.git] / src / InterfaceGraphic / InterfaceGraphic_Portability.hxx
CommitLineData
b311480e 1// Copyright (c) 1991-1999 Matra Datavision
2// Copyright (c) 1999-2012 OPEN CASCADE SAS
3//
4// The content of this file is subject to the Open CASCADE Technology Public
5// License Version 6.5 (the "License"). You may not use the content of this file
6// except in compliance with the License. Please obtain a copy of the License
7// at http://www.opencascade.org and read it completely before using this file.
8//
9// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11//
12// The Original Code and all software distributed under the License is
13// distributed on an "AS IS" basis, without warranty of any kind, and the
14// Initial Developer hereby disclaims all such warranties, including without
15// limitation, any warranties of merchantability, fitness for a particular
16// purpose or non-infringement. Please see the License for the specific terms
17// and conditions governing the rights and limitations under the License.
18
7fd59977 19
20#ifndef InterfaceGraphic_PortabilityHeader
21#define InterfaceGraphic_PortabilityHeader
22
7fd59977 23/* structures pour portabilite des differents Phigs */
24/* SUNPHIGS, DECPHIGS, TGSPHIGS, G5GPHIGS, PEX */
25
26/***********************************************************************/
27/******************************** CONST ********************************/
28/***********************************************************************/
29
30#define CALL_DEF_ENABLE_MODE_PAINTERS 0
31#define CALL_DEF_ENABLE_MODE_ZBUFFER 1
32#define CALL_DEF_DISABLE_MODE_ZBUFFER -1
33#define CALL_DEF_ENABLE_ZBUFFER 2
34#define CALL_DEF_DISABLE_ZBUFFER -2
35#define CALL_DEF_TEST_CALL -99999
36
37/***********************************************************************/
38/********************************* DATA ********************************/
39/***********************************************************************/
40
41typedef struct {
42 int size;
43 char *data;
44} CALL_DEF_DATA;
45
46/***********************************************************************/
47/********************************** 2D *********************************/
48/***********************************************************************/
49
50typedef struct {
51 float x;
52 float y;
53} CALL_DEF_POINT2;
54
55typedef struct {
56 float x;
57 float y;
58} CALL_DEF_VECTOR2;
59
60/***********************************************************************/
61/********************************** 3D *********************************/
62/***********************************************************************/
63
64typedef struct {
65 float x;
66 float y;
67 float z;
68} CALL_DEF_POINT3;
69
70typedef struct {
71 float x;
72 float y;
73 float z;
74} CALL_DEF_VECTOR3;
75
76/***********************************************************************/
77/********************************* VIEW ********************************/
78/***********************************************************************/
79
80typedef float CALL_DEF_MATRIX3[4][4];
81
82typedef struct {
83 float x_min;
84 float x_max;
85 float y_min;
86 float y_max;
87} CALL_DEF_LIMIT;
88
89typedef struct {
90 float x_min;
91 float x_max;
92 float y_min;
93 float y_max;
94 float z_min;
95 float z_max;
96} CALL_DEF_LIMIT3;
97
98typedef struct {
99 CALL_DEF_MATRIX3 ori_matrix;
100 CALL_DEF_MATRIX3 map_matrix;
101 CALL_DEF_LIMIT3 clip_limit;
102 int xy_clip;
103 int back_clip;
104 int front_clip;
105
106#ifdef TGSPHIGS
107 int opacity;
108 int back_colr;
109 int outline;
110 int outline_colr;
111 int temporary;
112 int active;
113#endif
114} CALL_DEF_VIEWREP3;
115
116typedef struct {
117 CALL_DEF_LIMIT win;
118 CALL_DEF_LIMIT3 proj_vp;
119 int proj_type;
120 CALL_DEF_POINT3 proj_ref_point;
121 float view_plane;
122
123#if defined (SUNPHIGS) || defined (TGSPHIGS) || defined (G5GPHIGS) || defined (HPPHIGS) || defined (PEX5)
124 float back_plane;
125 float front_plane;
126#endif
127#ifdef DECPHIGS
128 float front_plane;
129 float back_plane;
130#endif
131} CALL_DEF_VIEWMAP3;
132
133/***********************************************************************/
134/********************************* LIGHT *******************************/
135/***********************************************************************/
136
137typedef struct {
138 int num_ints;
139 int *ints;
140} CALL_DEF_INTLIST;
141
142typedef struct {
143 float r;
144 float g;
145 float b;
146} CALL_DEF_RGB;
147
148typedef struct {
149 int colr_type;
150 CALL_DEF_RGB colr;
151} CALL_DEF_AMBLIGHTSRCREC;
152
153typedef struct {
154 int colr_type;
155 CALL_DEF_RGB colr;
156 CALL_DEF_VECTOR3 dir;
157} CALL_DEF_DIRLIGHTSRCREC;
158
159typedef struct {
160 int colr_type;
161 CALL_DEF_RGB colr;
162 CALL_DEF_POINT3 pos;
163 float coef[2];
164} CALL_DEF_POSLIGHTSRCREC;
165
166typedef struct {
167 int colr_type;
168 CALL_DEF_RGB colr;
169 CALL_DEF_POINT3 pos;
170 CALL_DEF_VECTOR3 dir;
171 float exp;
172 float coef[2];
173 float angle;
174} CALL_DEF_SPOTLIGHTSRCREC;
175
176typedef union {
177 CALL_DEF_AMBLIGHTSRCREC ambient;
178 CALL_DEF_DIRLIGHTSRCREC directional;
179 CALL_DEF_POSLIGHTSRCREC positional;
180 CALL_DEF_SPOTLIGHTSRCREC spot;
181} CALL_DEF_LIGHTSRCREC;
182
183typedef struct {
184 int type;
185 CALL_DEF_LIGHTSRCREC rec;
186} CALL_DEF_LIGHTSRCBUNDLE;
187
188/***********************************************************************/
189/**************************** CLIPPING PLANE ***************************/
190/***********************************************************************/
191
192typedef struct {
193 float a;
194 float b;
195 float c;
196 float d;
197 CALL_DEF_POINT3 point;
198 CALL_DEF_VECTOR3 norm;
199} CALL_DEF_HALF_SPACE;
200
201typedef struct {
202 int num_half_spaces;
203 CALL_DEF_HALF_SPACE *half_spaces;
204} CALL_DEF_HALF_SPACE_LIST;
205
206typedef struct {
207 int op;
208 CALL_DEF_HALF_SPACE_LIST half_spaces;
209} CALL_DEF_PLANEBUNDLE;
210
211/***********************************************************************/
212/******************************** SCREEN *******************************/
213/***********************************************************************/
214
215typedef struct {
216 int size_x;
217 int size_y;
218} CALL_DEF_INT_SIZE;
219
220typedef struct {
221 float size_x;
222 float size_y;
223} CALL_DEF_FLOAT_SIZE;
224
225typedef struct {
226 int dc_units;
227 CALL_DEF_FLOAT_SIZE size_dc;
228 CALL_DEF_INT_SIZE size_raster;
229} CALL_DEF_DISP_SPACE_SIZE;
230
231/***********************************************************************/
232/********************************* TEXT ********************************/
233/***********************************************************************/
234
235typedef struct {
236 int horizontal;
237 int vertical;
238} CALL_DEF_TEXT_ALIGN;
239
240#endif /* InterfaceGraphic_PortabilityHeader */