f7387c33a214560543b9fc0c60cd2f83eccb8406
[occt.git] / src / Select3D / Select3D_SensitiveEntity.cxx
1 // Created on: 1995-03-13
2 // Created by: Robert COUBLANC
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #include <Select3D_SensitiveEntity.hxx>
18 #include <Precision.hxx>
19 #include <SelectBasics_EntityOwner.hxx>
20 #include <Select3D_Macro.hxx>
21 #include <TopLoc_Location.hxx>
22
23
24 IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveEntity,SelectBasics_SensitiveEntity)
25
26 //=======================================================================
27 //function : Select3D_SensitiveEntity
28 //purpose  :
29 //=======================================================================
30 Select3D_SensitiveEntity::Select3D_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId)
31 : SelectBasics_SensitiveEntity (theOwnerId) {}
32
33 //=======================================================================
34 // function : Matches
35 // purpose  : Checks whether sensitive overlaps current selecting volume.
36 //            Stores minimum depth, distance to center of geometry and
37 //            closest point detected into thePickResult
38 //=======================================================================
39 Standard_Boolean Select3D_SensitiveEntity::Matches (SelectBasics_SelectingVolumeManager& /*theMgr*/,
40                                                     SelectBasics_PickResult& /*thePickResult*/)
41 {
42   return Standard_False;
43 }
44
45 //=======================================================================
46 //function : GetConnected
47 //purpose  : 
48 //=======================================================================
49
50 Handle(Select3D_SensitiveEntity) Select3D_SensitiveEntity::GetConnected()
51 {
52   Handle(Select3D_SensitiveEntity) aNewEntity;
53   return aNewEntity;
54 }
55
56 //=======================================================================
57 // function : BVH
58 // purpose  : Builds BVH tree for a sensitive if needed
59 //=======================================================================
60 void Select3D_SensitiveEntity::BVH()
61 {
62   return;
63 }
64
65 //=======================================================================
66 // function : Clear
67 // purpose  : Cleans up resources and memory
68 //=======================================================================
69 void Select3D_SensitiveEntity::Clear()
70 {
71   Set (NULL);
72 }
73
74 //=======================================================================
75 // function : HasInitLocation
76 // purpose  : Returns true if the shape corresponding to the entity has init location
77 //=======================================================================
78 Standard_Boolean Select3D_SensitiveEntity::HasInitLocation() const
79 {
80   return Standard_False;
81 }
82
83 //=======================================================================
84 // function : InvInitLocation
85 // purpose  : Returns inversed location transformation matrix if the shape corresponding
86 //            to this entity has init location set. Otherwise, returns identity matrix.
87 //=======================================================================
88 gp_Trsf Select3D_SensitiveEntity::InvInitLocation() const
89 {
90   return gp_Trsf();
91 }