1 // Created on: 2003-09-09
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.
17 #include <Graphic3d_Group.hxx>
18 #include <MeshVS_Mesh.hxx>
19 #include <MeshVS_MeshEntityOwner.hxx>
20 #include <Prs3d_Root.hxx>
21 #include <PrsMgr_PresentationManager.hxx>
22 #include <PrsMgr_PresentationManager3d.hxx>
23 #include <SelectMgr_SelectableObject.hxx>
24 #include <Standard_Type.hxx>
25 #include <TColStd_ListIteratorOfListOfReal.hxx>
27 IMPLEMENT_STANDARD_RTTIEXT(MeshVS_MeshEntityOwner,SelectMgr_EntityOwner)
29 #ifndef MeshVS_PRSBUILDERHXX
30 #include <MeshVS_PrsBuilder.hxx>
34 //================================================================
35 // Function : Constructor MeshVS_MeshEntityOwner
37 //================================================================
38 MeshVS_MeshEntityOwner::MeshVS_MeshEntityOwner
39 ( const SelectMgr_SOPtr& SelObj,
40 const Standard_Integer ID,
41 const Standard_Address MeshEntity,
42 const MeshVS_EntityType& Type,
43 const Standard_Integer Priority,
44 const Standard_Boolean IsGroup )
45 : SelectMgr_EntityOwner ( SelObj, Priority ),
46 myAddr ( MeshEntity ),
54 //================================================================
57 //================================================================
58 Standard_Address MeshVS_MeshEntityOwner::Owner() const
63 //================================================================
66 //================================================================
67 MeshVS_EntityType MeshVS_MeshEntityOwner::Type() const
72 //================================================================
75 //================================================================
76 Standard_Boolean MeshVS_MeshEntityOwner::IsGroup() const
81 //================================================================
82 // Function : IsHilighted
84 //================================================================
85 Standard_Boolean MeshVS_MeshEntityOwner::IsHilighted ( const Handle(PrsMgr_PresentationManager)&,
86 const Standard_Integer ) const
88 return Standard_False;
91 //================================================================
92 // Function : HilightWithColor
94 //================================================================
95 void MeshVS_MeshEntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
96 const Handle(Prs3d_Drawer)& theStyle,
97 const Standard_Integer /*theMode*/ )
99 Handle( SelectMgr_SelectableObject ) aSelObj;
100 if ( HasSelectable() )
101 aSelObj = Selectable();
103 if ( thePM->IsImmediateModeOn() && aSelObj->IsKind( STANDARD_TYPE( MeshVS_Mesh ) ) )
105 Handle( MeshVS_Mesh ) aMesh = Handle( MeshVS_Mesh )::DownCast ( aSelObj );
106 aMesh->HilightOwnerWithColor ( thePM, theStyle, this );
110 //================================================================
111 // Function : Unhilight
113 //================================================================
114 void MeshVS_MeshEntityOwner::Unhilight ( const Handle(PrsMgr_PresentationManager)&,
115 const Standard_Integer )
119 //================================================================
122 //================================================================
123 void MeshVS_MeshEntityOwner::Clear ( const Handle(PrsMgr_PresentationManager)&,
124 const Standard_Integer )
128 //================================================================
131 //================================================================
132 Standard_Integer MeshVS_MeshEntityOwner::ID () const