0023363: [Regression] Lost gradient background when switching to the hollow interior...
[occt.git] / src / OpenGl / OpenGl_tgl_funcs.hxx
1 // Created by: PCT
2 // Copyright (c) 1995-1999 Matra Datavision
3 // Copyright (c) 1999-2012 OPEN CASCADE SAS
4 //
5 // The content of this file is subject to the Open CASCADE Technology Public
6 // License Version 6.5 (the "License"). You may not use the content of this file
7 // except in compliance with the License. Please obtain a copy of the License
8 // at http://www.opencascade.org and read it completely before using this file.
9 //
10 // The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 // main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 //
13 // The Original Code and all software distributed under the License is
14 // distributed on an "AS IS" basis, without warranty of any kind, and the
15 // Initial Developer hereby disclaims all such warranties, including without
16 // limitation, any warranties of merchantability, fitness for a particular
17 // purpose or non-infringement. Please see the License for the specific terms
18 // and conditions governing the rights and limitations under the License.
19
20
21 #ifndef OPENGL_TGL_FUNCS_H
22 #define OPENGL_TGL_FUNCS_H
23
24 typedef float matrix3[4][4];
25
26 typedef enum {
27   TYPE_PARAL,
28   TYPE_PERSPECT
29 } projtype;
30
31 typedef enum {
32   IND_NO_CLIP,
33   IND_CLIP
34 } clip_ind;
35
36 typedef struct {
37   float   x;  /* x coordinate */
38   float   y;  /* y coordinate */
39   float   z;  /* z coordinate */
40 } point3;
41
42 typedef struct {
43   float   delta_x;    /* x magnitude */
44   float   delta_y;    /* y magnitude */
45   float   delta_z;    /* z magnitude */
46 } vec3;
47
48 typedef struct {
49   float   x_min;  /* x min */
50   float   x_max;  /* x max */
51   float   y_min;  /* y min */
52   float   y_max;  /* y max */
53   float   z_min;  /* z min */
54   float   z_max;  /* z max */
55 } limit3;
56
57 typedef struct {
58   float   x_min;  /* x min */
59   float   x_max;  /* x max */
60   float   y_min;  /* y min */
61   float   y_max;  /* y max */
62 } limit;
63
64 typedef struct {
65   limit   win;    /* window limits */
66   limit3  proj_vp;    /* viewport limits */
67   projtype    proj_type;  /* projection type */
68   point3  proj_ref_point; /* projection reference point */
69   float   view_plane; /* view plane distance */
70   float   back_plane; /* back plane distance */
71   float   front_plane;    /* front plane distance */
72 } view_map3;
73
74 extern void call_func_eval_ori_matrix3 (const point3* vrp,
75                                         const vec3*   vpn,
76                                         const vec3*   vup,
77                                         int* err_ind,
78                                         float mout[4][4]);
79
80 extern void call_func_eval_map_matrix3(view_map3 *Map, int *err_ind, matrix3 mat);
81                                                                                         
82 #endif // OPENGL_TGL_FUNCS_H