1 // Created on: 2003-10-10
2 // Created by: Alexander SOLOVYOV
3 // Copyright (c) 2003-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #ifndef _MeshVS_MeshEntityOwner_HeaderFile
17 #define _MeshVS_MeshEntityOwner_HeaderFile
19 #include <Standard.hxx>
20 #include <Standard_Type.hxx>
22 #include <Standard_Address.hxx>
23 #include <MeshVS_EntityType.hxx>
24 #include <Standard_Integer.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <SelectMgr_EntityOwner.hxx>
27 #include <SelectMgr_SOPtr.hxx>
28 #include <PrsMgr_PresentationManager3d.hxx>
29 #include <Quantity_NameOfColor.hxx>
30 class PrsMgr_PresentationManager;
33 class MeshVS_MeshEntityOwner;
34 DEFINE_STANDARD_HANDLE(MeshVS_MeshEntityOwner, SelectMgr_EntityOwner)
36 //! The custom owner. This class provides methods to store owner information:
37 //! 1) An address of element or node data structure
38 //! 2) Type of node or element owner assigned
39 //! 3) ID of node or element owner assigned
40 class MeshVS_MeshEntityOwner : public SelectMgr_EntityOwner
46 Standard_EXPORT MeshVS_MeshEntityOwner(const SelectMgr_SOPtr& SelObj, const Standard_Integer ID, const Standard_Address MeshEntity, const MeshVS_EntityType& Type, const Standard_Integer Priority = 0, const Standard_Boolean IsGroup = Standard_False);
48 //! Returns an address of element or node data structure
49 Standard_EXPORT Standard_Address Owner() const;
51 //! Returns type of element or node data structure
52 Standard_EXPORT MeshVS_EntityType Type() const;
54 //! Returns ID of element or node data structure
55 Standard_EXPORT Standard_Integer ID() const;
57 //! Returns true if owner represents group of nodes or elements
58 Standard_EXPORT Standard_Boolean IsGroup() const;
60 //! Returns true if owner is hilighted
61 Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) const Standard_OVERRIDE;
63 //! Hilights owner with the certain color
64 Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
65 const Handle(Graphic3d_HighlightStyle)& theStyle,
66 const Standard_Integer theMode = 0) Standard_OVERRIDE;
68 //! Strip hilight of owner
69 Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) Standard_OVERRIDE;
71 Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& PM, const Standard_Integer Mode = 0) Standard_OVERRIDE;
76 DEFINE_STANDARD_RTTIEXT(MeshVS_MeshEntityOwner,SelectMgr_EntityOwner)
86 Standard_Address myAddr;
87 MeshVS_EntityType myType;
88 Standard_Integer myID;
89 Standard_Boolean myIsGroup;
100 #endif // _MeshVS_MeshEntityOwner_HeaderFile