Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:15

0001 // Created on: 2003-10-10
0002 // Created by: Alexander SOLOVYOV
0003 // Copyright (c) 2003-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _MeshVS_MeshEntityOwner_HeaderFile
0017 #define _MeshVS_MeshEntityOwner_HeaderFile
0018 
0019 #include <MeshVS_EntityType.hxx>
0020 #include <SelectMgr_EntityOwner.hxx>
0021 #include <PrsMgr_PresentationManager.hxx>
0022 class PrsMgr_PresentationManager;
0023 
0024 
0025 class MeshVS_MeshEntityOwner;
0026 DEFINE_STANDARD_HANDLE(MeshVS_MeshEntityOwner, SelectMgr_EntityOwner)
0027 
0028 //! The custom owner. This class provides methods to store owner information:
0029 //! 1) An address of element or node data structure
0030 //! 2) Type of node or element owner assigned
0031 //! 3) ID of node or element owner assigned
0032 class MeshVS_MeshEntityOwner : public SelectMgr_EntityOwner
0033 {
0034 
0035 public:
0036 
0037   
0038   Standard_EXPORT MeshVS_MeshEntityOwner(const SelectMgr_SelectableObject* SelObj, const Standard_Integer ID, const Standard_Address MeshEntity, const MeshVS_EntityType& Type, const Standard_Integer Priority = 0, const Standard_Boolean IsGroup = Standard_False);
0039   
0040   //! Returns an address of element or node data structure
0041   Standard_EXPORT Standard_Address Owner() const;
0042   
0043   //! Returns type of element or node data structure
0044   Standard_EXPORT MeshVS_EntityType Type() const;
0045   
0046   //! Returns ID of element or node data structure
0047   Standard_EXPORT Standard_Integer ID() const;
0048   
0049   //! Returns true if owner represents group of nodes or elements
0050   Standard_EXPORT Standard_Boolean IsGroup() const;
0051   
0052   //! Returns true if owner is hilighted
0053   Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) const Standard_OVERRIDE;
0054   
0055   //! Hilights owner with the certain color
0056   Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
0057                                                  const Handle(Prs3d_Drawer)& theStyle,
0058                                                  const Standard_Integer theMode) Standard_OVERRIDE;
0059   
0060   //! Strip hilight of owner
0061   Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) Standard_OVERRIDE;
0062   
0063   Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) Standard_OVERRIDE;
0064 
0065 
0066 
0067 
0068   DEFINE_STANDARD_RTTIEXT(MeshVS_MeshEntityOwner,SelectMgr_EntityOwner)
0069 
0070 protected:
0071 
0072 
0073 
0074 
0075 private:
0076 
0077 
0078   Standard_Address myAddr;
0079   MeshVS_EntityType myType;
0080   Standard_Integer myID;
0081   Standard_Boolean myIsGroup;
0082 
0083 
0084 };
0085 
0086 
0087 
0088 
0089 
0090 
0091 
0092 #endif // _MeshVS_MeshEntityOwner_HeaderFile