973c2be1 |
1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
2 | // |
973c2be1 |
3 | // This file is part of Open CASCADE Technology software library. |
b311480e |
4 | // |
973c2be1 |
5 | // This library is free software; you can redistribute it and / or modify it |
6 | // under the terms of the GNU Lesser General Public version 2.1 as published |
7 | // by the Free Software Foundation, with special exception defined in the file |
8 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
9 | // distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
10 | // |
973c2be1 |
11 | // Alternatively, this file may be used under the terms of Open CASCADE |
12 | // commercial license or contractual agreement. |
b311480e |
13 | |
7fd59977 |
14 | #ifndef _Graphic3d_CView_HeaderFile |
15 | #define _Graphic3d_CView_HeaderFile |
16 | |
17 | #include <InterfaceGraphic_Graphic3d.hxx> |
18 | #include <InterfaceGraphic_Visual3d.hxx> |
bf75be98 |
19 | #include <Handle_Graphic3d_TextureEnv.hxx> |
12381341 |
20 | #include <Graphic3d_CLight.hxx> |
51b10cd4 |
21 | #include <Graphic3d_SequenceOfHClipPlane.hxx> |
bf75be98 |
22 | |
23 | class CALL_DEF_VIEWCONTEXT |
24 | { |
25 | |
26 | public: |
27 | |
28 | CALL_DEF_VIEWCONTEXT() |
29 | : Aliasing (0), |
30 | BackZClipping (0), |
31 | FrontZClipping (0), |
32 | DepthCueing (0), |
33 | ZClipFrontPlane (0.0f), |
34 | ZClipBackPlane (0.0f), |
35 | DepthFrontPlane (0.0f), |
36 | DepthBackPlane (0.0f), |
37 | ZBufferActivity (0), |
38 | Model (0), |
39 | Visualization (0), |
40 | NbActiveLight (0), |
41 | ActiveLight (NULL), |
4269bd1b |
42 | SurfaceDetail (0), |
43 | ClipPlanes() |
bf75be98 |
44 | { |
45 | // |
46 | } |
47 | |
48 | public: |
49 | |
50 | int Aliasing; |
51 | |
52 | int BackZClipping; |
53 | int FrontZClipping; |
54 | |
55 | int DepthCueing; |
56 | |
57 | float ZClipFrontPlane; |
58 | float ZClipBackPlane; |
59 | |
60 | float DepthFrontPlane; |
61 | float DepthBackPlane; |
62 | |
63 | int ZBufferActivity; |
64 | int Model; |
65 | int Visualization; |
66 | |
67 | int NbActiveLight; |
12381341 |
68 | Graphic3d_CLight* ActiveLight; |
bf75be98 |
69 | |
bf75be98 |
70 | Handle(Graphic3d_TextureEnv) TextureEnv; |
71 | int SurfaceDetail; |
72 | |
51b10cd4 |
73 | Graphic3d_SequenceOfHClipPlane ClipPlanes; |
bf75be98 |
74 | }; |
75 | |
76 | class Graphic3d_CView |
77 | { |
78 | |
79 | public: |
80 | |
81 | Graphic3d_CView() |
82 | : WsId (-1), |
83 | ViewId (0), |
84 | ptrView (NULL), |
85 | IsDeleted (0), |
86 | IsOpen (0), |
87 | Active (0), |
88 | ptrUnderLayer (NULL), |
89 | ptrOverLayer (NULL), |
bf75be98 |
90 | Backfacing (0), |
c24d4017 |
91 | GContext (NULL), |
bf75be98 |
92 | GDisplayCB (NULL), |
93 | GClientData (NULL), |
e276548b |
94 | ptrFBO (NULL), |
95 | WasRedrawnGL (0), |
96 | IsRaytracing (0), |
97 | IsShadowsEnabled (1), |
98 | IsReflectionsEnabled (1), |
99 | IsAntialiasingEnabled (0) |
bf75be98 |
100 | { |
c24d4017 |
101 | memset(&Orientation,0,sizeof(Orientation)); |
102 | memset(&Mapping,0,sizeof(Mapping)); |
103 | memset(&OrientationReset,0,sizeof(OrientationReset)); |
104 | memset(&MappingReset,0,sizeof(MappingReset)); |
105 | memset(&DefWindow,0,sizeof(DefWindow)); |
bf75be98 |
106 | } |
107 | |
108 | public: |
109 | |
110 | int WsId; |
111 | int ViewId; |
112 | void* ptrView; |
113 | |
114 | int IsDeleted; |
115 | int IsOpen; |
116 | |
117 | int Active; |
118 | |
119 | CALL_DEF_VIEWORIENTATION Orientation; |
120 | CALL_DEF_VIEWMAPPING Mapping; |
121 | |
122 | CALL_DEF_VIEWORIENTATION OrientationReset; |
123 | CALL_DEF_VIEWMAPPING MappingReset; |
124 | |
125 | CALL_DEF_VIEWCONTEXT Context; |
126 | |
127 | CALL_DEF_WINDOW DefWindow; |
128 | |
129 | void* ptrUnderLayer; |
130 | void* ptrOverLayer; |
131 | |
bf75be98 |
132 | int Backfacing; |
133 | |
134 | Aspect_RenderingContext GContext; |
135 | Aspect_GraphicCallbackProc GDisplayCB; |
136 | void* GClientData; |
137 | |
138 | void* ptrFBO; |
139 | |
e276548b |
140 | //! Was the window redrawn by standard OpenGL? |
141 | mutable int WasRedrawnGL; |
142 | |
143 | //! Enables/disables OpenCL-based ray-tracing. |
144 | int IsRaytracing; |
145 | |
146 | //! Enables/disables ray-traced sharp shadows. |
147 | int IsShadowsEnabled; |
148 | |
149 | //! Enables/disables ray-traced reflections. |
150 | int IsReflectionsEnabled; |
151 | |
152 | //! Enables/disables ray-traced adaptive anti-aliasing. |
153 | int IsAntialiasingEnabled; |
154 | |
bf75be98 |
155 | }; |
156 | |
7fd59977 |
157 | const Handle(Standard_Type)& TYPE(Graphic3d_CView); |
7fd59977 |
158 | |
bf75be98 |
159 | #endif // Graphic3d_CView_HeaderFile |