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), |
bf75be98 |
40 | Model (0), |
41 | Visualization (0), |
42 | NbActiveLight (0), |
43 | ActiveLight (NULL), |
4269bd1b |
44 | SurfaceDetail (0), |
45 | ClipPlanes() |
bf75be98 |
46 | { |
47 | // |
48 | } |
49 | |
50 | public: |
51 | |
52 | int Aliasing; |
53 | |
54 | int BackZClipping; |
55 | int FrontZClipping; |
56 | |
57 | int DepthCueing; |
58 | |
59 | float ZClipFrontPlane; |
60 | float ZClipBackPlane; |
61 | |
62 | float DepthFrontPlane; |
63 | float DepthBackPlane; |
64 | |
bf75be98 |
65 | int Model; |
66 | int Visualization; |
67 | |
68 | int NbActiveLight; |
12381341 |
69 | Graphic3d_CLight* ActiveLight; |
bf75be98 |
70 | |
bf75be98 |
71 | Handle(Graphic3d_TextureEnv) TextureEnv; |
72 | int SurfaceDetail; |
73 | |
51b10cd4 |
74 | Graphic3d_SequenceOfHClipPlane ClipPlanes; |
b5ac8292 |
75 | |
76 | Handle(Graphic3d_Camera) Camera; |
bf75be98 |
77 | }; |
78 | |
79 | class Graphic3d_CView |
80 | { |
81 | |
82 | public: |
83 | |
84 | Graphic3d_CView() |
85 | : WsId (-1), |
86 | ViewId (0), |
87 | ptrView (NULL), |
88 | IsDeleted (0), |
89 | IsOpen (0), |
90 | Active (0), |
91 | ptrUnderLayer (NULL), |
92 | ptrOverLayer (NULL), |
bf75be98 |
93 | Backfacing (0), |
b7cd4ba7 |
94 | GContext (NULL), |
bf75be98 |
95 | GDisplayCB (NULL), |
96 | GClientData (NULL), |
e276548b |
97 | ptrFBO (NULL), |
b7cd4ba7 |
98 | WasRedrawnGL (0), |
99 | IsCullingEnabled (Standard_True) |
bf75be98 |
100 | { |
b7cd4ba7 |
101 | memset (&DefWindow, 0, sizeof(DefWindow)); |
bf75be98 |
102 | } |
103 | |
104 | public: |
105 | |
106 | int WsId; |
107 | int ViewId; |
108 | void* ptrView; |
109 | |
110 | int IsDeleted; |
111 | int IsOpen; |
112 | |
113 | int Active; |
114 | |
bf75be98 |
115 | CALL_DEF_VIEWCONTEXT Context; |
116 | |
117 | CALL_DEF_WINDOW DefWindow; |
118 | |
119 | void* ptrUnderLayer; |
120 | void* ptrOverLayer; |
121 | |
bf75be98 |
122 | int Backfacing; |
123 | |
124 | Aspect_RenderingContext GContext; |
125 | Aspect_GraphicCallbackProc GDisplayCB; |
126 | void* GClientData; |
127 | |
128 | void* ptrFBO; |
129 | |
e276548b |
130 | //! Was the window redrawn by standard OpenGL? |
131 | mutable int WasRedrawnGL; |
132 | |
bc8c79bb |
133 | //! Specifies rendering parameters and effects. |
134 | Graphic3d_RenderingParams RenderParams; |
e276548b |
135 | |
b7cd4ba7 |
136 | //! Enables/disables frustum culling. |
137 | Standard_Boolean IsCullingEnabled; |
138 | |
bf75be98 |
139 | }; |
140 | |
bf75be98 |
141 | #endif // Graphic3d_CView_HeaderFile |