c5751993 |
1 | // Created on: 2014-03-31 |
2 | // Created by: Danila ULYANOV |
3 | // Copyright (c) 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 |
8 | // under the terms of the GNU Lesser General Public 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_Layer_Header |
17 | #define _OpenGl_Layer_Header |
18 | |
19 | #include <OpenGl_PriorityList.hxx> |
20 | #include <Graphic3d_ZLayerSettings.hxx> |
21 | |
22 | class Handle(OpenGl_Workspace); |
23 | |
24 | class OpenGl_Layer |
25 | { |
26 | public: |
27 | |
28 | //! Initializes associated priority list and layer properties |
29 | OpenGl_Layer (const Standard_Integer theNbPriorities = 11); |
30 | |
31 | //! Returns settings of the layer object. |
32 | const Graphic3d_ZLayerSettings LayerSettings() const { return myLayerSettings; }; |
33 | |
34 | //! Sets settings of the layer object. |
35 | void SetLayerSettings (Graphic3d_ZLayerSettings theSettings) |
36 | { |
37 | myLayerSettings = theSettings; |
38 | } |
39 | |
40 | //! Returns true if theSetting is enabled for the layer. |
41 | const Standard_Boolean IsSettingEnabled (const Graphic3d_ZLayerSetting theSetting) const |
42 | { |
43 | return myLayerSettings.IsSettingEnabled (theSetting); |
44 | } |
45 | |
46 | //! Returns reference to associated priority list. |
47 | OpenGl_PriorityList& PriorityList() { return myPriorityList; } |
48 | |
49 | //! Returns const reference to associated priority list. |
50 | const OpenGl_PriorityList& PriorityList() const { return myPriorityList; } |
51 | |
52 | void Render (const Handle(OpenGl_Workspace) &AWorkspace, int theDefaultDepthFunc) const; |
53 | |
54 | private: |
55 | |
56 | OpenGl_PriorityList myPriorityList; //!< Associated priority list object. |
57 | |
58 | Graphic3d_ZLayerSettings myLayerSettings; //!< Layer setting flags. |
59 | }; |
60 | #endif //_OpenGl_Layer_Header |