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 | // |
d5f74e42 |
5 | // This library is free software; you can redistribute it and/or modify it under |
6 | // the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
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> |
bc8c79bb |
19 | #include <Graphic3d_RenderingParams.hxx> |
cb389a77 |
20 | #include <Graphic3d_TextureEnv.hxx> |
b5ac8292 |
21 | #include <Graphic3d_Camera.hxx> |
22 | |
12381341 |
23 | #include <Graphic3d_CLight.hxx> |
51b10cd4 |
24 | #include <Graphic3d_SequenceOfHClipPlane.hxx> |
bf75be98 |
25 | |
26 | class CALL_DEF_VIEWCONTEXT |
27 | { |
28 | |
29 | public: |
30 | |
31 | CALL_DEF_VIEWCONTEXT() |
32 | : Aliasing (0), |
33 | BackZClipping (0), |
34 | FrontZClipping (0), |
35 | DepthCueing (0), |
36 | ZClipFrontPlane (0.0f), |
37 | ZClipBackPlane (0.0f), |
38 | DepthFrontPlane (0.0f), |
39 | DepthBackPlane (0.0f), |
40 | ZBufferActivity (0), |
41 | Model (0), |
42 | Visualization (0), |
43 | NbActiveLight (0), |
44 | ActiveLight (NULL), |
4269bd1b |
45 | SurfaceDetail (0), |
46 | ClipPlanes() |
bf75be98 |
47 | { |
48 | // |
49 | } |
50 | |
51 | public: |
52 | |
53 | int Aliasing; |
54 | |
55 | int BackZClipping; |
56 | int FrontZClipping; |
57 | |
58 | int DepthCueing; |
59 | |
60 | float ZClipFrontPlane; |
61 | float ZClipBackPlane; |
62 | |
63 | float DepthFrontPlane; |
64 | float DepthBackPlane; |
65 | |
66 | int ZBufferActivity; |
67 | int Model; |
68 | int Visualization; |
69 | |
70 | int NbActiveLight; |
12381341 |
71 | Graphic3d_CLight* ActiveLight; |
bf75be98 |
72 | |
bf75be98 |
73 | Handle(Graphic3d_TextureEnv) TextureEnv; |
74 | int SurfaceDetail; |
75 | |
51b10cd4 |
76 | Graphic3d_SequenceOfHClipPlane ClipPlanes; |
b5ac8292 |
77 | |
78 | Handle(Graphic3d_Camera) Camera; |
bf75be98 |
79 | }; |
80 | |
81 | class Graphic3d_CView |
82 | { |
83 | |
84 | public: |
85 | |
86 | Graphic3d_CView() |
87 | : WsId (-1), |
88 | ViewId (0), |
89 | ptrView (NULL), |
90 | IsDeleted (0), |
91 | IsOpen (0), |
92 | Active (0), |
93 | ptrUnderLayer (NULL), |
94 | ptrOverLayer (NULL), |
bf75be98 |
95 | Backfacing (0), |
b7cd4ba7 |
96 | GContext (NULL), |
bf75be98 |
97 | GDisplayCB (NULL), |
98 | GClientData (NULL), |
e276548b |
99 | ptrFBO (NULL), |
b7cd4ba7 |
100 | WasRedrawnGL (0), |
101 | IsCullingEnabled (Standard_True) |
bf75be98 |
102 | { |
b7cd4ba7 |
103 | memset (&DefWindow, 0, sizeof(DefWindow)); |
bf75be98 |
104 | } |
105 | |
106 | public: |
107 | |
108 | int WsId; |
109 | int ViewId; |
110 | void* ptrView; |
111 | |
112 | int IsDeleted; |
113 | int IsOpen; |
114 | |
115 | int Active; |
116 | |
bf75be98 |
117 | CALL_DEF_VIEWCONTEXT Context; |
118 | |
119 | CALL_DEF_WINDOW DefWindow; |
120 | |
121 | void* ptrUnderLayer; |
122 | void* ptrOverLayer; |
123 | |
bf75be98 |
124 | int Backfacing; |
125 | |
126 | Aspect_RenderingContext GContext; |
127 | Aspect_GraphicCallbackProc GDisplayCB; |
128 | void* GClientData; |
129 | |
130 | void* ptrFBO; |
131 | |
e276548b |
132 | //! Was the window redrawn by standard OpenGL? |
133 | mutable int WasRedrawnGL; |
134 | |
bc8c79bb |
135 | //! Specifies rendering parameters and effects. |
136 | Graphic3d_RenderingParams RenderParams; |
e276548b |
137 | |
b7cd4ba7 |
138 | //! Enables/disables frustum culling. |
139 | Standard_Boolean IsCullingEnabled; |
140 | |
bf75be98 |
141 | }; |
142 | |
bf75be98 |
143 | #endif // Graphic3d_CView_HeaderFile |