|
||||
File indexing completed on 2025-01-18 10:04:53
0001 // Copyright (c) 2020 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 _SelectMgr_AndOrFilter_HeaderFile 0015 #define _SelectMgr_AndOrFilter_HeaderFile 0016 0017 #include <Standard.hxx> 0018 #include <Standard_Type.hxx> 0019 0020 #include <Graphic3d_NMapOfTransient.hxx> 0021 #include <SelectMgr_CompositionFilter.hxx> 0022 #include <SelectMgr_FilterType.hxx> 0023 0024 DEFINE_STANDARD_HANDLE(SelectMgr_AndOrFilter, SelectMgr_CompositionFilter) 0025 0026 //! A framework to define an OR or AND selection filter. 0027 //! To use an AND selection filter call SetUseOrFilter with False parameter. 0028 //! By default the OR selection filter is used. 0029 class SelectMgr_AndOrFilter : public SelectMgr_CompositionFilter 0030 { 0031 0032 public: 0033 0034 //! Constructs an empty selection filter. 0035 Standard_EXPORT SelectMgr_AndOrFilter (const SelectMgr_FilterType theFilterType); 0036 0037 //! Indicates that the selected Interactive Object passes the filter. 0038 Standard_EXPORT virtual Standard_Boolean IsOk (const Handle(SelectMgr_EntityOwner)& theObj) const Standard_OVERRIDE; 0039 0040 //! Disable selection of specified objects. 0041 Standard_EXPORT void SetDisabledObjects (const Handle(Graphic3d_NMapOfTransient)& theObjects); 0042 0043 //! @return a selection filter type (@sa SelectMgr_FilterType). 0044 SelectMgr_FilterType FilterType() const { return myFilterType; } 0045 0046 //! Sets a selection filter type. 0047 //! SelectMgr_FilterType_OR selection filter is used be default. 0048 //! @param theFilterType the filter type. 0049 void SetFilterType (const SelectMgr_FilterType theFilterType) { myFilterType = theFilterType; } 0050 0051 DEFINE_STANDARD_RTTIEXT(SelectMgr_AndOrFilter, SelectMgr_CompositionFilter) 0052 0053 private: 0054 0055 Handle(Graphic3d_NMapOfTransient) myDisabledObjects; //!< disabled objects. 0056 //! Selection isn't applied to these objects. 0057 SelectMgr_FilterType myFilterType; //!< selection filter type. SelectMgr_TypeFilter_OR by default. 0058 }; 0059 0060 #endif // _SelectMgr_AndOrFilter_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |