fb66bb28 |
1 | // Copyright (c) 2016 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 _AIS_ColoredDrawer_HeaderFile |
15 | #define _AIS_ColoredDrawer_HeaderFile |
16 | |
17 | #include <Prs3d_Drawer.hxx> |
18 | #include <Quantity_Color.hxx> |
19 | |
20 | //! Customizable properties. |
21 | class AIS_ColoredDrawer : public Prs3d_Drawer |
22 | { |
23 | DEFINE_STANDARD_RTTIEXT(AIS_ColoredDrawer, Prs3d_Drawer) |
24 | public: |
25 | |
26 | //! Default constructor. |
27 | AIS_ColoredDrawer (const Handle(Prs3d_Drawer)& theLink) |
28 | : myIsHidden (false), |
29 | myHasOwnColor (false), |
c1197a15 |
30 | myHasOwnTransp(false), |
fb66bb28 |
31 | myHasOwnWidth (false) |
32 | { |
33 | Link (theLink); |
34 | } |
35 | |
36 | bool IsHidden() const { return myIsHidden; } |
37 | void SetHidden (const bool theToHide) { myIsHidden = theToHide;} |
c1197a15 |
38 | |
fb66bb28 |
39 | bool HasOwnColor() const { return myHasOwnColor; } |
40 | void UnsetOwnColor() { myHasOwnColor = false; } |
41 | void SetOwnColor (const Quantity_Color& /*theColor*/) { myHasOwnColor = true; } |
c1197a15 |
42 | |
43 | bool HasOwnTransparency() const { return myHasOwnTransp; } |
44 | void UnsetOwnTransparency() { myHasOwnTransp = false; } |
45 | void SetOwnTransparency (Standard_Real /*theTransp*/) { myHasOwnTransp = true; } |
46 | |
fb66bb28 |
47 | bool HasOwnWidth() const { return myHasOwnWidth; } |
48 | void UnsetOwnWidth() { myHasOwnWidth = false; } |
49 | void SetOwnWidth (const Standard_Real /*theWidth*/) { myHasOwnWidth = true; } |
50 | |
51 | public: //! @name list of overridden properties |
52 | |
53 | bool myIsHidden; |
54 | bool myHasOwnColor; |
c1197a15 |
55 | bool myHasOwnTransp; |
fb66bb28 |
56 | bool myHasOwnWidth; |
57 | |
58 | }; |
59 | |
60 | DEFINE_STANDARD_HANDLE(AIS_ColoredDrawer, Prs3d_Drawer) |
61 | |
62 | #endif // _AIS_ColoredDrawer_HeaderFile |