0024739: TKOpenGl - port ray-tracing from OpenCL to GLSL for better integration and...
[occt.git] / src / OpenGl / OpenGl_tgl_funcs.hxx
1 // Created by: PCT
2 // Copyright (c) 1995-1999 Matra Datavision
3 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #ifndef OPENGL_TGL_FUNCS_H
17 #define OPENGL_TGL_FUNCS_H
18
19 typedef float matrix3[4][4];
20
21 typedef enum {
22   TYPE_PARAL,
23   TYPE_PERSPECT
24 } projtype;
25
26 typedef enum {
27   IND_NO_CLIP,
28   IND_CLIP
29 } clip_ind;
30
31 typedef struct {
32   float   x;  /* x coordinate */
33   float   y;  /* y coordinate */
34   float   z;  /* z coordinate */
35 } point3;
36
37 typedef struct {
38   float   delta_x;    /* x magnitude */
39   float   delta_y;    /* y magnitude */
40   float   delta_z;    /* z magnitude */
41 } vec3;
42
43 typedef struct {
44   float   x_min;  /* x min */
45   float   x_max;  /* x max */
46   float   y_min;  /* y min */
47   float   y_max;  /* y max */
48   float   z_min;  /* z min */
49   float   z_max;  /* z max */
50 } limit3;
51
52 typedef struct {
53   float   x_min;  /* x min */
54   float   x_max;  /* x max */
55   float   y_min;  /* y min */
56   float   y_max;  /* y max */
57 } limit;
58
59 typedef struct {
60   limit   win;    /* window limits */
61   limit3  proj_vp;    /* viewport limits */
62   projtype    proj_type;  /* projection type */
63   point3  proj_ref_point; /* projection reference point */
64   float   view_plane; /* view plane distance */
65   float   back_plane; /* back plane distance */
66   float   front_plane;    /* front plane distance */
67 } view_map3;
68
69 extern void call_func_eval_ori_matrix3 (const point3* vrp,
70                                         const vec3*   vpn,
71                                         const vec3*   vup,
72                                         int* err_ind,
73                                         float mout[4][4]);
74
75 extern void call_func_eval_map_matrix3(view_map3 *Map, int *err_ind, matrix3 mat);
76                                                                                         
77 #endif // OPENGL_TGL_FUNCS_H