1 -- Created on: 1995-01-23
2 -- Created by: Mister rmi
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 deferred class SensitiveEntity from SelectBasics inherits TShared from MMgt
19 ---Purpose: root class; the inheriting classes will be able to give
20 -- sensitive Areas for the dynamic selection algorithms
24 BndBox3d from Select3D,
26 SelectingVolumeManager
31 Initialize (theOwnerId : EntityOwner;
32 theSensFactor : Real from Standard = 2.0);
35 theOwnerId : EntityOwner)
38 ---Purpose: Sets owner of the entity
42 returns any EntityOwner
46 ---Purpose: Returns pointer to owner of the entity
49 Matches (me : mutable;
50 theMgr : out SelectingVolumeManager from SelectBasics;
51 thePickResult : out PickResult from SelectBasics)
52 returns Boolean is deferred;
54 ---Purpose: Checks whether the sensitive entity is overlapped by
55 -- current selecting volume
57 SensitivityFactor (me)
58 returns Real from Standard;
60 ---Purpose: allows a better sensitivity for
61 -- a specific entity in selection algorithms
62 -- useful for small sized entities.
64 NbSubElements (me : mutable) returns Integer from Standard
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
72 BoundingBox (me : mutable) returns BndBox3d from Select3D is deferred;
73 ---Purpose: Returns bounding box of sensitive entity
75 BVH (me : mutable) is deferred;
76 ---Purpose: Builds BVH tree for sensitive if it is needed
78 Clear (me : mutable) is deferred;
79 ---Purpose: Clears up all the resources and memory allocated
81 SetSensitivityFactor (me : mutable;
82 theSensFactor :Real from Standard)
85 ---Purpose: Allows to manage the sensitivity of the entity
90 myOwnerId : EntityOwner from SelectBasics is protected;
91 mySFactor : Real from Standard;