0026147: Visualization - restore the ability to pick only fully included objects...
[occt.git] / src / SelectBasics / SelectBasics_SensitiveEntity.cdl
CommitLineData
b311480e 1-- Created on: 1995-01-23
2-- Created by: Mister rmi
3-- Copyright (c) 1995-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--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 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
17deferred class SensitiveEntity from SelectBasics inherits TShared from MMgt
18
f751596e 19 ---Purpose: root class; the inheriting classes will be able to give
20 -- sensitive Areas for the dynamic selection algorithms
7fd59977 21
22uses
23 EntityOwner,
f751596e 24 BndBox3d from Select3D,
25 PickResult,
26 SelectingVolumeManager
7fd59977 27
28is
29
30
f751596e 31 Initialize (theOwnerId : EntityOwner;
32 theSensFactor : Real from Standard = 2.0);
7fd59977 33
f751596e 34 Set (me : mutable;
35 theOwnerId : EntityOwner)
36 is virtual;
4269bd1b 37 ---Level: Public
f751596e 38 ---Purpose: Sets owner of the entity
7fd59977 39
40
f751596e 41 OwnerId (me)
42 returns any EntityOwner
43 is static;
7fd59977 44 ---Level: Public
f751596e 45 ---C++: return const&
46 ---Purpose: Returns pointer to owner of the entity
7fd59977 47
7fd59977 48
f751596e 49 Matches (me : mutable;
50 theMgr : out SelectingVolumeManager from SelectBasics;
51 thePickResult : out PickResult from SelectBasics)
52 returns Boolean is deferred;
53 ---Level: Public
54 ---Purpose: Checks whether the sensitive entity is overlapped by
55 -- current selecting volume
7fd59977 56
f751596e 57 SensitivityFactor (me)
58 returns Real from Standard;
7fd59977 59 ---C++: inline
60 ---Purpose: allows a better sensitivity for
61 -- a specific entity in selection algorithms
62 -- useful for small sized entities.
63
f751596e 64 NbSubElements (me : mutable) returns Integer from Standard
65 is deferred;
66 ---Purpose: Returns the number of sub-entities or elements in
67 -- sensitive entity. Is used to determine if entity is
68 -- complex and needs to pre-build BVH at the creation of
69 -- sensitive entity step or is light-weighted so the tree
70 -- can be build on demand with unnoticeable delay
7fd59977 71
f751596e 72 BoundingBox (me : mutable) returns BndBox3d from Select3D is deferred;
73 ---Purpose: Returns bounding box of sensitive entity
7fd59977 74
f751596e 75 BVH (me : mutable) is deferred;
76 ---Purpose: Builds BVH tree for sensitive if it is needed
7fd59977 77
f751596e 78 Clear (me : mutable) is deferred;
79 ---Purpose: Clears up all the resources and memory allocated
7fd59977 80
28ee613b 81 SetSensitivityFactor (me : mutable;
82 theSensFactor :Real from Standard)
83 is protected;
84 ---C++: inline
85 ---Purpose: Allows to manage the sensitivity of the entity
86
7fd59977 87
f751596e 88fields
89
90 myOwnerId : EntityOwner from SelectBasics is protected;
91 mySFactor : Real from Standard;
92end SensitiveEntity;