Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:54

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 
0026   //! Default constructor.
0027   AIS_ColoredDrawer (const Handle(Prs3d_Drawer)& theLink)
0028   : myIsHidden    (false),
0029     myHasOwnMaterial(false),
0030     myHasOwnColor (false),
0031     myHasOwnTransp(false),
0032     myHasOwnWidth (false)
0033   {
0034     Link (theLink);
0035   }
0036 
0037   bool IsHidden() const                                 { return myIsHidden;     }
0038   void SetHidden (const bool theToHide)                 { myIsHidden = theToHide;}
0039 
0040   bool HasOwnMaterial() const                           { return myHasOwnMaterial;  }
0041   void UnsetOwnMaterial()                               { myHasOwnMaterial = false; }
0042   void SetOwnMaterial()                                 { myHasOwnMaterial = true;  }
0043 
0044   bool HasOwnColor() const                              { return myHasOwnColor;  }
0045   void UnsetOwnColor()                                  { myHasOwnColor = false; }
0046   void SetOwnColor (const Quantity_Color& /*theColor*/) { myHasOwnColor = true;  }
0047 
0048   bool HasOwnTransparency() const                       { return myHasOwnTransp;  }
0049   void UnsetOwnTransparency()                           { myHasOwnTransp = false; }
0050   void SetOwnTransparency (Standard_Real /*theTransp*/) { myHasOwnTransp = true;  }
0051 
0052   bool HasOwnWidth() const                              { return myHasOwnWidth;  }
0053   void UnsetOwnWidth()                                  { myHasOwnWidth = false; }
0054   void SetOwnWidth (const Standard_Real /*theWidth*/)   { myHasOwnWidth = true;  }
0055 
0056 public:  //! @name list of overridden properties
0057 
0058   bool myIsHidden;
0059   bool myHasOwnMaterial;
0060   bool myHasOwnColor;
0061   bool myHasOwnTransp;
0062   bool myHasOwnWidth;
0063 
0064 };
0065 
0066 DEFINE_STANDARD_HANDLE(AIS_ColoredDrawer, Prs3d_Drawer)
0067 
0068 #endif // _AIS_ColoredDrawer_HeaderFile