b311480e |
1 | -- Created on: 1997-03-04 |
2 | -- Created by: Robert COUBLANC |
3 | -- Copyright (c) 1997-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public version 2.1 as published |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class SignatureFilter from AIS inherits TypeFilter from AIS |
18 | |
19 | ---Purpose: Selects Interactive Objects through their signatures |
20 | -- and types. The signature provides an |
21 | -- additional characterization of an object's type, and |
22 | -- takes the form of an index. The filter questions each |
23 | -- Interactive Object in local context to determine |
24 | -- whether it has an non-null owner, and if so, whether |
25 | -- it has the desired signature. If the object returns true |
26 | -- in each case, it is kept. If not, it is rejected. |
27 | -- By default, the interactive object has a None type |
28 | -- and a signature of 0. If you want to give a particular |
29 | -- type and signature to your Interactive Object, you |
30 | -- must redefine two virtual methods: Type and Signature. |
31 | -- This filter is only used in an open local contexts. |
32 | -- In the Collector viewer, you can only locate |
33 | -- Interactive Objects which answer positively to the |
34 | -- positioned filters when a local context is open. |
35 | -- Warning |
36 | -- Some signatures have already been used by standard |
37 | -- objects delivered in AIS. These include: |
38 | -- - signature 0 - Shape |
39 | -- - signature 1 - Point |
40 | -- - signature 2 - Axis |
41 | -- - signature 3 - Trihedron |
42 | -- - signature 4 - PlaneTrihedron |
43 | -- - signature 5 - Line |
44 | -- - signature 6 - Circle |
45 | -- - signature 7 - Plane |
46 | |
47 | |
48 | |
49 | uses |
50 | |
51 | KindOfInteractive from AIS, |
52 | EntityOwner from SelectMgr |
53 | |
54 | is |
55 | |
56 | Create(aGivenKind : KindOfInteractive from AIS; |
57 | aGivenSignature : Integer from Standard) |
58 | returns mutable SignatureFilter from AIS; |
59 | --- Purpose: Initializes the signature filter, adding the signature |
60 | -- specification, aGivenSignature, to that for type, |
61 | -- aGivenKind, in AIS_TypeFilter. |
62 | |
63 | IsOk (me;anobj : EntityOwner from SelectMgr) |
64 | returns Boolean from Standard is redefined static; |
65 | ---Purpose: Returns False if the transient is not an AIS_InteractiveObject. |
66 | -- Returns False if the signature of InteractiveObject |
67 | -- is not the same as the stored one in the filter... |
68 | |
69 | |
70 | fields |
71 | mySig : Integer from Standard; |
72 | end SignatureFilter; |