b311480e |
1 | -- Created on: 2007-01-24 |
2 | -- Created by: Sergey Kochetkov |
973c2be1 |
3 | -- Copyright (c) 2007-2014 OPEN CASCADE SAS |
b311480e |
4 | -- |
973c2be1 |
5 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
6 | -- |
973c2be1 |
7 | -- This library is free software; you can redistribute it and / or modify it |
8 | -- under the terms of the GNU Lesser General Public 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. |
b311480e |
12 | -- |
973c2be1 |
13 | -- Alternatively, this file may be used under the terms of Open CASCADE |
14 | -- commercial license or contractual agreement. |
7fd59977 |
15 | |
16 | class MeshOwner from MeshVS inherits EntityOwner from SelectMgr |
17 | |
18 | ---Purpose: The custom mesh owner used for advanced mesh selection. This class provides methods to store information: |
19 | -- 1) IDs of hilighted mesh nodes and elements |
20 | -- 2) IDs of mesh nodes and elements selected on the mesh |
21 | |
22 | uses |
23 | SOPtr from SelectMgr, |
24 | Integer from Standard, |
25 | EntityType from MeshVS, |
26 | HPackedMapOfInteger from TColStd, |
27 | PresentationManager3d from PrsMgr, |
28 | PresentationManager from PrsMgr, |
29 | NameOfColor from Quantity, |
30 | DataSource from MeshVS |
31 | |
32 | is |
33 | |
34 | Create ( theSelObj : SOPtr from SelectMgr; |
35 | theDS : DataSource from MeshVS; |
36 | thePriority : Integer = 0 ) returns mutable MeshOwner from MeshVS; |
37 | |
38 | GetDataSource( me ) returns DataSource from MeshVS; |
39 | ---C++: return const & |
40 | |
41 | GetSelectedNodes( me ) returns HPackedMapOfInteger from TColStd; |
42 | ---C++: return const & |
43 | ---Purpose: Returns ids of selected mesh nodes |
44 | |
45 | GetSelectedElements( me ) returns HPackedMapOfInteger from TColStd; |
46 | ---C++: return const & |
47 | ---Purpose: Returns ids of selected mesh elements |
48 | |
49 | AddSelectedEntities( me : mutable; Nodes : HPackedMapOfInteger from TColStd; |
50 | Elems : HPackedMapOfInteger from TColStd ) is virtual; |
51 | ---Purpose: Saves ids of selected mesh entities |
52 | |
53 | ClearSelectedEntities( me : mutable ) is virtual; |
54 | ---Purpose: Clears ids of selected mesh entities |
55 | |
56 | GetDetectedNodes( me ) returns HPackedMapOfInteger from TColStd; |
57 | ---C++: return const & |
58 | ---Purpose: Returns ids of hilighted mesh nodes |
59 | |
60 | GetDetectedElements( me ) returns HPackedMapOfInteger from TColStd; |
61 | ---C++: return const & |
62 | ---Purpose: Returns ids of hilighted mesh elements |
63 | |
64 | SetDetectedEntities( me : mutable; Nodes : HPackedMapOfInteger from TColStd; |
65 | Elems : HPackedMapOfInteger from TColStd ); |
66 | ---Purpose: Saves ids of hilighted mesh entities |
67 | |
68 | HilightWithColor ( me : mutable; PM : PresentationManager3d from PrsMgr; |
69 | theColor : NameOfColor from Quantity; |
70 | Mode : Integer = 0 ) is redefined; |
71 | |
72 | Unhilight( me : mutable; PM : PresentationManager from PrsMgr; |
73 | Mode : Integer from Standard = 0 ) is redefined; |
74 | |
75 | IsForcedHilight ( me ) returns Boolean from Standard is redefined; |
76 | |
77 | fields |
78 | |
79 | myDataSource : DataSource from MeshVS; |
80 | mySelectedNodes : HPackedMapOfInteger from TColStd is protected; |
81 | mySelectedElems : HPackedMapOfInteger from TColStd is protected; |
82 | myDetectedNodes : HPackedMapOfInteger from TColStd; |
83 | myDetectedElems : HPackedMapOfInteger from TColStd; |
84 | myLastID : Integer from Standard; |
85 | |
86 | end MeshOwner; |