| 1 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
| 2 | // |
| 3 | // This file is part of Open CASCADE Technology software library. |
| 4 | // |
| 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 |
| 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. |
| 10 | // |
| 11 | // Alternatively, this file may be used under the terms of Open CASCADE |
| 12 | // commercial license or contractual agreement. |
| 13 | |
| 14 | #ifndef _Graphic3d_CView_HeaderFile |
| 15 | #define _Graphic3d_CView_HeaderFile |
| 16 | |
| 17 | #include <InterfaceGraphic_Graphic3d.hxx> |
| 18 | #include <InterfaceGraphic_Visual3d.hxx> |
| 19 | #include <Graphic3d_RenderingParams.hxx> |
| 20 | #include <Graphic3d_TextureEnv.hxx> |
| 21 | #include <Graphic3d_Camera.hxx> |
| 22 | |
| 23 | #include <Graphic3d_CLight.hxx> |
| 24 | #include <Graphic3d_SequenceOfHClipPlane.hxx> |
| 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), |
| 45 | SurfaceDetail (0), |
| 46 | ClipPlanes() |
| 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; |
| 71 | Graphic3d_CLight* ActiveLight; |
| 72 | |
| 73 | Handle(Graphic3d_TextureEnv) TextureEnv; |
| 74 | int SurfaceDetail; |
| 75 | |
| 76 | Graphic3d_SequenceOfHClipPlane ClipPlanes; |
| 77 | |
| 78 | Handle(Graphic3d_Camera) Camera; |
| 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), |
| 95 | Backfacing (0), |
| 96 | GContext (NULL), |
| 97 | GDisplayCB (NULL), |
| 98 | GClientData (NULL), |
| 99 | ptrFBO (NULL), |
| 100 | WasRedrawnGL (0) |
| 101 | { |
| 102 | memset(&DefWindow,0,sizeof(DefWindow)); |
| 103 | } |
| 104 | |
| 105 | public: |
| 106 | |
| 107 | int WsId; |
| 108 | int ViewId; |
| 109 | void* ptrView; |
| 110 | |
| 111 | int IsDeleted; |
| 112 | int IsOpen; |
| 113 | |
| 114 | int Active; |
| 115 | |
| 116 | CALL_DEF_VIEWCONTEXT Context; |
| 117 | |
| 118 | CALL_DEF_WINDOW DefWindow; |
| 119 | |
| 120 | void* ptrUnderLayer; |
| 121 | void* ptrOverLayer; |
| 122 | |
| 123 | int Backfacing; |
| 124 | |
| 125 | Aspect_RenderingContext GContext; |
| 126 | Aspect_GraphicCallbackProc GDisplayCB; |
| 127 | void* GClientData; |
| 128 | |
| 129 | void* ptrFBO; |
| 130 | |
| 131 | //! Was the window redrawn by standard OpenGL? |
| 132 | mutable int WasRedrawnGL; |
| 133 | |
| 134 | //! Specifies rendering parameters and effects. |
| 135 | Graphic3d_RenderingParams RenderParams; |
| 136 | |
| 137 | }; |
| 138 | |
| 139 | #endif // Graphic3d_CView_HeaderFile |