0023634: Eliminate Polyline and Polygon usage in drawers
[occt.git] / src / InterfaceGraphic / InterfaceGraphic_telem.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/*
20File: InterfaceGraphic_telem.h
21
2216/06/2000 : ATS : G005 : Copied from OpenGl_telem.h to support required
23for InterfaceGraphic_Parray.hxx definitions
24
2522/03/2004 : SAN : OCC4895 High-level interface for controlling polygon offsets
26
2720/05/2005 : SAN : OCC8854 Number of color components increased to include alpha value
28
29*/
30
31#ifndef INTERFACEGRAPHIC_TELEM_H
32#define INTERFACEGRAPHIC_TELEM_H
33
34#include <Standard.hxx>
1c35b92f 35#include <Standard_DefineAlloc.hxx>
7fd59977 36#include <InterfaceGraphic_tgl_all.hxx>
37#include <stdlib.h>
38
7fd59977 39struct TEL_TEXTURE_COORD
40{
41 float xy[2];
1c35b92f 42 DEFINE_STANDARD_ALLOC
7fd59977 43};
44
45typedef TEL_TEXTURE_COORD* tel_texture_coord;
46
b8ddfc2f 47class TEL_POINT
7fd59977 48{
b8ddfc2f 49 public:
50 float xyz[3];
1c35b92f 51 DEFINE_STANDARD_ALLOC
7fd59977 52};
53typedef TEL_POINT* tel_point;
54
55struct TEL_COLOUR
56{
57 /* OCC8854: san -- number of color components increased to include alpha value */
58 float rgb[4];
1c35b92f 59 DEFINE_STANDARD_ALLOC
7fd59977 60};
61typedef TEL_COLOUR* tel_colour;
62
63struct TEL_POINT_DATA
64{
65 int num;
66 TEL_POINT* data;
1c35b92f 67 DEFINE_STANDARD_ALLOC
7fd59977 68};
69typedef TEL_POINT_DATA* tel_point_data;
70
71struct TEL_TINT_DATA
72{
73 int num;
74 int* data;
1c35b92f 75 DEFINE_STANDARD_ALLOC
7fd59977 76};
77typedef TEL_TINT_DATA* tel_tint_data;
78
79struct TEL_MATRIX3_DATA
80{
81 TComposeType mode;
82 Tmatrix3 mat;
1c35b92f 83 DEFINE_STANDARD_ALLOC
7fd59977 84};
85typedef TEL_MATRIX3_DATA* tel_matrix3_data;
86
7fd59977 87struct TEL_ALIGN_DATA
88{
89 Tint Hmode;
90 Tint Vmode;
1c35b92f 91 DEFINE_STANDARD_ALLOC
7fd59977 92};
93typedef TEL_ALIGN_DATA* tel_align_data;
94
95typedef enum
96{
97 TLightAmbient,
98 TLightDirectional,
99 TLightPositional,
100 TLightSpot
101} TLightType;
102
103typedef enum
104{
105 TelHLColour,
106 TelHLForcedColour
107} THighlightType;
108
109typedef enum
110{
111 TelDCSuppressed,
112 TelDCAllowed
113} TDepthCueType;
114
115/* Proprietes materiels */
116struct TEL_SURF_PROP
117{
118 float amb, diff, spec, emsv;
119 float trans, shine;
120 float env_reflexion;
121 int isamb, isdiff, isspec, isemsv;
122 int isphysic;
123 TEL_COLOUR speccol, difcol, ambcol, emscol, matcol;
1c35b92f 124 DEFINE_STANDARD_ALLOC
7fd59977 125};
126typedef TEL_SURF_PROP* tel_surf_prop;
127
128typedef enum
129{
130 TelCullNone,
131 TelCullFront,
132 TelCullBack
133} TelCullMode;
134
135/* Interior Styles */
136#define TSM_SOLID 1
137#define TSM_HOLLOW 2
138#define TSM_EMPTY 3
139#define TSM_HATCH 4
140#define TSM_POINT 5
141#define TSM_HIDDENLINE 6
142
143/* Standard Line Styles */
144#define TEL_LS_SOLID 0
145#define TEL_LS_DOT 2
146#define TEL_LS_DASH_DOT 3
147#define TEL_LS_DASH 1
148#define TEL_LS_DOUBLE_DOT_DASH 4
149
150#define TEL_LS_USER_DEF_START 10
151
152/* Standard Hatch Styles */
153#define TEL_HS_SOLID 0
154#define TEL_HS_CROSS 1
155#define TEL_HS_CROSS_SPARSE 2
156#define TEL_HS_GRID 3
157#define TEL_HS_GRID_SPARSE 4
158#define TEL_HS_DIAG_45 5
159#define TEL_HS_DIAG_135 6
160#define TEL_HS_HORIZONTAL 7
161#define TEL_HS_VERTICAL 8
162#define TEL_HS_DIAG_45_SPARSE 9
163#define TEL_HS_DIAG_135_SPARSE 10
164#define TEL_HS_HORIZONTAL_SPARSE 11
165#define TEL_HS_VERTICAL_SPARSE 12
166
167#define TEL_HS_USER_DEF_START 15
168
169#define TEL_SHAPE_UNKNOWN 1
170#define TEL_SHAPE_COMPLEX 2
171#define TEL_SHAPE_CONCAVE 3
172#define TEL_SHAPE_CONVEX 4
173
174/* Key ids for area type primitives */
175#define NUM_FACETS_ID 1 /* key.data.ldata contains no. of facets */
176#define FNORMALS_ID 2 /* key.data.pdata is array of TEL_POINT */
177#define FACET_COLOUR_VALS_ID 3 /* key.data.pdata is array of TSM_COLOUR */
178#define VERTICES_ID 4 /* key.data.pdata is array of TEL_POINT */
179#define VERTEX_COLOUR_VALS_ID 5 /* key.data.pdata is array of TSM_COLOUR */
180#define VNORMALS_ID 6 /* key.data.pdata is array of TEL_POINT */
181#define NUM_VERTICES_ID 7 /* key.data.ldata is num of vertices */
182#define SHAPE_FLAG_ID 8 /* key.data.ldata is shape flag */
183#define EDGE_DATA_ID 9 /* key.data.pdata is edge data (Tint*) */
184#define CONNECTIVITY_ID 10 /* key.data.pdata is conn data (Tint*) */
185#define BOUNDS_DATA_ID 11 /* key.data.pdata is bounds data (Tint*) */
186#define NUM_LINES_ID 12 /* key.data.ldata is number of lines */
187#define NUM_ROWS_ID 13 /* key.data.ldata is number of rows */
188#define NUM_COLUMNS_ID 14 /* key.data.ldata is number of columns */
189#define VTEXTURECOORD_ID 15 /* key.data.pdata is array of TEL_TEXTURE_COORD */
190
191#define PARRAY_ID 16 /* key.data.pdata is a primitive array */
192
193/* Key ids for text primitives */
194#define TEXT_ATTACH_PT_ID 1 /* key.data.pdata contains tel_point */
195#define TEXT_STRING_ID 2 /* key.data.pdata contains Tchar * */
196
197
198/* Key ids for curve primitives */
199#define CURVE_TYPE_ID 1 /* key.data.ldata is curve type */
200/* TelCurveType :
201* Bezier
202* Cardinal
203* BSpline
204*/
205#define CURVE_NUM_POINTS_ID 2 /* key.data.ldata is num of points */
206#define CURVE_VERTICES_ID 3 /* key.data.pdata is array of TEL_POINT */
207
208
209/* Polymarker Types */
210#define TEL_PM_PLUS 0
211#define TEL_PM_STAR 1
212#define TEL_PM_CROSS 2
213#define TEL_PM_CIRC 3
214#define TEL_PM_DOT 4
215#define TEL_PM_USERDEFINED 5
216
217#define TEL_PM_USER_DEF_START 7
218
219#define TEL_SD_SHADING 0
220#define TEL_SD_TEXTURE 1
221
222#define TEL_SM_FLAT 1
223#define TEL_SM_GOURAUD 2
224
225#define TEL_POLYMARKER_FONT (short)1
226
227/* Standard Lighting Models */
228#define TEL_FRONT_BACK_LM 1
229
230/* Standard Materials */
231#define TEL_FRONT_MATERIAL 1
232#define TEL_BACK_MATERIAL 2
233
234/* facet flags */
235#define TEL_FAFLAG_NONE 1
236#define TEL_FAFLAG_NORMAL 2
237#define TEL_FAFLAG_COLOUR 3
238#define TEL_FAFLAG_COLOURNORMAL 4
239
240/* internal use */
241#define TEL_FA_NONE TEL_FAFLAG_NONE
242#define TEL_FA_NORMAL TEL_FAFLAG_NORMAL
243
244/* vertex flags */
245#define TEL_VTFLAG_NONE 1
246#define TEL_VTFLAG_NORMAL 2
247#define TEL_VTFLAG_COLOUR 3
248#define TEL_VTFLAG_COLOURNORMAL 4
249
250/* internal use */
251#define TEL_VT_NONE TEL_VTFLAG_NONE
252#define TEL_VT_NORMAL TEL_VTFLAG_NORMAL
253
254/* Defbasis identifier */
255#define TEL_BEZIER 1
256#define TEL_CARDINAL 2
257#define TEL_BSPLINE 3
258
259typedef enum
260{
261 TelBezierCurve = TEL_BEZIER,
262 TelCardinalCurve = TEL_CARDINAL,
263 TelBSplineCurve = TEL_BSPLINE
264} TelCurveType;
265
266typedef enum
267{
268 TelHLHSRNone,
269 TelHLHSRZBuff
270
271} TelHLHSRId;
272
273/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
274struct TEL_POFFSET_PARAM
275{
276 int mode;
277 float factor;
278 float units;
1c35b92f 279 DEFINE_STANDARD_ALLOC
7fd59977 280};
281typedef TEL_POFFSET_PARAM* tel_poffset_param;
282/* OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets */
283
284/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
285struct TEL_TRANSFORM_PERSISTENCE
286{
287 int mode;
288 float pointX;
289 float pointY;
290 float pointZ;
1c35b92f 291 DEFINE_STANDARD_ALLOC
7fd59977 292};
293typedef TEL_TRANSFORM_PERSISTENCE* tel_transform_persistence;
294/* ABD 29/10/04 Transform Persistence of Presentation( pan, zoom, rotate ) */
295
296#endif /* INTERFACEGRAPHIC_TELEM_H */