Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 09:16:37

0001 // Copyright (c) 2016 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _AIS_ColoredDrawer_HeaderFile
0015 #define _AIS_ColoredDrawer_HeaderFile
0016 
0017 #include <Prs3d_Drawer.hxx>
0018 #include <Quantity_Color.hxx>
0019 
0020 //! Customizable properties.
0021 class AIS_ColoredDrawer : public Prs3d_Drawer
0022 {
0023   DEFINE_STANDARD_RTTIEXT(AIS_ColoredDrawer, Prs3d_Drawer)
0024 public:
0025   //! Default constructor.
0026   AIS_ColoredDrawer(const occ::handle<Prs3d_Drawer>& theLink)
0027       : myIsHidden(false),
0028         myHasOwnMaterial(false),
0029         myHasOwnColor(false),
0030         myHasOwnTransp(false),
0031         myHasOwnWidth(false)
0032   {
0033     Link(theLink);
0034   }
0035 
0036   bool IsHidden() const { return myIsHidden; }
0037 
0038   void SetHidden(const bool theToHide) { myIsHidden = theToHide; }
0039 
0040   bool HasOwnMaterial() const { return myHasOwnMaterial; }
0041 
0042   void UnsetOwnMaterial() { myHasOwnMaterial = false; }
0043 
0044   void SetOwnMaterial() { myHasOwnMaterial = true; }
0045 
0046   bool HasOwnColor() const { return myHasOwnColor; }
0047 
0048   void UnsetOwnColor() { myHasOwnColor = false; }
0049 
0050   void SetOwnColor(const Quantity_Color& /*theColor*/) { myHasOwnColor = true; }
0051 
0052   bool HasOwnTransparency() const { return myHasOwnTransp; }
0053 
0054   void UnsetOwnTransparency() { myHasOwnTransp = false; }
0055 
0056   void SetOwnTransparency(double /*theTransp*/) { myHasOwnTransp = true; }
0057 
0058   bool HasOwnWidth() const { return myHasOwnWidth; }
0059 
0060   void UnsetOwnWidth() { myHasOwnWidth = false; }
0061 
0062   void SetOwnWidth(const double /*theWidth*/) { myHasOwnWidth = true; }
0063 
0064 public: //! @name list of overridden properties
0065   bool myIsHidden;
0066   bool myHasOwnMaterial;
0067   bool myHasOwnColor;
0068   bool myHasOwnTransp;
0069   bool myHasOwnWidth;
0070 };
0071 
0072 #endif // _AIS_ColoredDrawer_HeaderFile