]> OCCT Git - occt-copy.git/commitdiff
0030687: Visualization - remove redundant interfaces SelectBasics_EntityOwner and...
authorkgv <kgv@opencascade.com>
Tue, 21 May 2019 16:42:15 +0000 (19:42 +0300)
committerkgv <kgv@opencascade.com>
Tue, 21 May 2019 16:42:15 +0000 (19:42 +0300)
SelectBasics_EntityOwner has been merged into SelectMgr_EntityOwner.
Unused property SelectMgr_EntityOwner::ResetLocation() has been removed.
SelectBasics package has been moved from TKService to TKV3d.

SelectBasics_SensitiveEntity has been merged into Select3D_SensitiveEntity.

101 files changed:
dox/dev_guides/upgrade/upgrade.md
dox/user_guides/visualization/visualization.md
samples/mfc/standard/03_Viewer2d/src/StdAfx.h
src/AIS/AIS_Axis.cxx
src/AIS/AIS_ColoredShape.cxx
src/AIS/AIS_ConnectedInteractive.cxx
src/AIS/AIS_InteractiveContext_1.cxx
src/AIS/AIS_Manipulator.cxx
src/AIS/AIS_Plane.cxx
src/AIS/AIS_Point.cxx
src/AIS/AIS_Trihedron.cxx
src/AIS/AIS_Trihedron.hxx
src/MeshVS/MeshVS_CommonSensitiveEntity.cxx
src/MeshVS/MeshVS_CommonSensitiveEntity.hxx
src/MeshVS/MeshVS_DummySensitiveEntity.cxx
src/MeshVS/MeshVS_DummySensitiveEntity.hxx
src/MeshVS/MeshVS_Mesh.cxx
src/MeshVS/MeshVS_MeshEntityOwner.cxx
src/MeshVS/MeshVS_MeshOwner.cxx
src/MeshVS/MeshVS_PrsBuilder.cxx
src/MeshVS/MeshVS_PrsBuilder.hxx
src/MeshVS/MeshVS_SensitiveFace.cxx
src/MeshVS/MeshVS_SensitiveFace.hxx
src/MeshVS/MeshVS_SensitiveMesh.cxx
src/MeshVS/MeshVS_SensitiveMesh.hxx
src/MeshVS/MeshVS_SensitivePolyhedron.cxx
src/MeshVS/MeshVS_SensitivePolyhedron.hxx
src/MeshVS/MeshVS_SensitiveQuad.cxx
src/MeshVS/MeshVS_SensitiveSegment.cxx
src/MeshVS/MeshVS_SensitiveSegment.hxx
src/Select3D/Select3D_InteriorSensitivePointSet.cxx
src/Select3D/Select3D_InteriorSensitivePointSet.hxx
src/Select3D/Select3D_SensitiveBox.cxx
src/Select3D/Select3D_SensitiveBox.hxx
src/Select3D/Select3D_SensitiveCircle.cxx
src/Select3D/Select3D_SensitiveCircle.hxx
src/Select3D/Select3D_SensitiveCurve.cxx
src/Select3D/Select3D_SensitiveCurve.hxx
src/Select3D/Select3D_SensitiveEntity.cxx
src/Select3D/Select3D_SensitiveEntity.hxx
src/Select3D/Select3D_SensitiveFace.cxx
src/Select3D/Select3D_SensitiveFace.hxx
src/Select3D/Select3D_SensitiveGroup.cxx
src/Select3D/Select3D_SensitiveGroup.hxx
src/Select3D/Select3D_SensitivePoint.cxx
src/Select3D/Select3D_SensitivePoint.hxx
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitivePoly.hxx
src/Select3D/Select3D_SensitivePrimitiveArray.cxx
src/Select3D/Select3D_SensitivePrimitiveArray.hxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveSegment.hxx
src/Select3D/Select3D_SensitiveSet.cxx
src/Select3D/Select3D_SensitiveSet.hxx
src/Select3D/Select3D_SensitiveTriangle.cxx
src/Select3D/Select3D_SensitiveTriangle.hxx
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/Select3D/Select3D_SensitiveTriangulation.hxx
src/Select3D/Select3D_SensitiveWire.cxx
src/Select3D/Select3D_SensitiveWire.hxx
src/SelectBasics/FILES
src/SelectBasics/SelectBasics.cxx [deleted file]
src/SelectBasics/SelectBasics.hxx
src/SelectBasics/SelectBasics_EntityOwner.cxx [deleted file]
src/SelectBasics/SelectBasics_EntityOwner.hxx
src/SelectBasics/SelectBasics_PickResult.hxx
src/SelectBasics/SelectBasics_SensitiveEntity.cxx [deleted file]
src/SelectBasics/SelectBasics_SensitiveEntity.hxx
src/SelectMgr/SelectMgr_EntityOwner.cxx
src/SelectMgr/SelectMgr_EntityOwner.hxx
src/SelectMgr/SelectMgr_IndexedDataMapOfOwnerCriterion.hxx
src/SelectMgr/SelectMgr_SelectableObject.cxx
src/SelectMgr/SelectMgr_Selection.cxx
src/SelectMgr/SelectMgr_Selection.hxx
src/SelectMgr/SelectMgr_SensitiveEntity.cxx
src/SelectMgr/SelectMgr_SensitiveEntity.hxx
src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx
src/SelectMgr/SelectMgr_SortCriterion.hxx
src/SelectMgr/SelectMgr_ViewerSelector.cxx
src/SelectMgr/SelectMgr_ViewerSelector.hxx
src/StdSelect/StdSelect_BRepOwner.cxx
src/StdSelect/StdSelect_BRepOwner.hxx
src/StdSelect/StdSelect_BRepSelectionTool.cxx
src/StdSelect/StdSelect_IndexedDataMapOfOwnerPrs.hxx
src/StdSelect/StdSelect_ViewerSelector3d.cxx
src/TKService/PACKAGES
src/TKV3d/PACKAGES
src/ViewerTest/ViewerTest.cxx
tools/VInspector/VInspector_ItemContext.cxx
tools/VInspector/VInspector_ItemEntityOwner.cxx
tools/VInspector/VInspector_ItemEntityOwner.hxx
tools/VInspector/VInspector_ItemPresentableObject.cxx
tools/VInspector/VInspector_ItemSelection.cxx
tools/VInspector/VInspector_ItemSensitiveEntity.cxx
tools/VInspector/VInspector_ItemSensitiveEntity.hxx
tools/VInspector/VInspector_Tools.cxx
tools/VInspector/VInspector_Tools.hxx
tools/VInspector/VInspector_ViewModel.cxx
tools/VInspector/VInspector_ViewModel.hxx
tools/VInspector/VInspector_Window.cxx
tools/VInspector/VInspector_Window.hxx

index a01664d375112c60a6f97db0449e21c5c31cfb47..c67248800ff7dca45f1db87532587e6f801b196b 100644 (file)
@@ -1738,12 +1738,14 @@ or updating presentation without recomputation (see *AIS_InteractiveObject::Sync
 * *Aspect_IS_HIDDENLINE* does not implicitly enables drawing mesh edges anymore.
   Specify Graphic3d_AspectFillArea3d::SetDrawEdges(true) with Graphic3d_AspectFillArea3d::SetInteriorStyle(Aspect_IS_HIDDENLINE) to get previous behavior of Aspect_IS_HIDDENLINE style.
 
-@subsection upgrade_740_modedprs PrsMgr_ModedPresentation removal
+@subsection upgrade_740_modedprs PrsMgr and SelectMgr hierarchy clean up
 
 Proxy classes *Prs3d_Presentation*, *PrsMgr_ModedPresentation* and *PrsMgr_Prs* have been removed.
 Code iterating through the list of low-level structures AIS_InteractiveObject::Presentations() should be updated to access PrsMgr_Presentation directly.
 Forward declarations of *Prs3d_Presentation* should be corrected, since it is now a typedef to *Graphic3d_Structure*.
 
+Proxy classes *SelectBasics_SensitiveEntity* and *SelectBasics_EntityOwner* have been removed - *Select3D_SensitiveEntity* and *SelectMgr_EntityOwner* should be now used directly instead.
+
 @subsection upgrade_740_geproj Custom defines within env.bat
 
 *env.bat* produced by Visual Studio project generator *genproj.bat* has been modified so that *%CSF_DEFINES%* variable is reset to initial state.
index b709ee1834030f859ad71132e1fd9f84f09ced61..56221469eef8364642ec007c6cd75be928c331de 100644 (file)
@@ -226,8 +226,6 @@ Selection is implemented as a combination of various algorithms divided among se
 #### SelectBasics
 
 *SelectBasics* package contains basic classes and interfaces for selection. The most notable are:
-  - *SelectBasics_SensitiveEntity* -- the base definition of a sensitive entity;
-  - *SelectBasics_EntityOwner* -- the base definition of the an entity owner -- the link between the sensitive entity and the object to be selected;
   - *SelectBasics_PickResult* -- the structure for storing quantitative results of detection procedure, for example, depth and distance to the center of geometry;
   - *SelectBasics_SelectingVolumeManager* -- the interface for interaction with the current selection frustum.
 
@@ -247,9 +245,11 @@ Each custom sensitive entity must inherit at least *SelectBasics_SensitiveEntity
   - triangulation;
   - wire.
 
-Each basic sensitive entity inherits *Select3D_SensitiveEntity*, which is a child class of *SelectBasics_SensitiveEntity*.
+Each basic sensitive entity inherits *Select3D_SensitiveEntity*.
 The package also contains two auxiliary classes, *Select3D_SensitivePoly* and *Select3D_SensitiveSet*.
 
+*Select3D_SensitiveEntity* -- the base definition of a sensitive entity.
+
 *Select3D_SensitiveSet* -- a base class for all complex sensitive entities that require the third level BVH usage. It implements traverse of the tree and defines an interface for the methods that check sub-entities.
 
 *Select3D_SensitivePoly* -- describes an arbitrary point set and implements basic functions for selection. It is important to know that this class does not perform any internal data checks. Hence, custom implementations of sensitive entity inherited from *Select3D_SensitivePoly* must satisfy the terms of Separating Axis Theorem to use standard OCCT overlap detection methods.
index c3f90b909ac93fe3574070cb7a62c95ccca1941c..74dc294861a299b58f5c7e1d47e6a242e332d4f3 100755 (executable)
@@ -155,7 +155,6 @@ class ISession2D_InteractiveObject;
 class V3d_Viewer;
 class SelectMgr_SelectableObject;
 class TCollection_AsciiString;
-class SelectBasics_EntityOwner;
 class gp_Pnt2d;
 
 //{{AFX_INSERT_LOCATION}}
index aab1609717f0d775f4160e402f493ebff661976a..7783e90d4068f2a505603721ceffab457f86aab7 100644 (file)
 #include <Prs3d_Projector.hxx>
 #include <Quantity_Color.hxx>
 #include <Select3D_SensitiveSegment.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
-#include <Standard_Type.hxx>
 #include <StdPrs_Curve.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <TopoDS.hxx>
@@ -199,8 +197,7 @@ void AIS_Axis::Compute(const Handle(Prs3d_Projector)& aProjector, const Handle(G
 void AIS_Axis::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
                                const Standard_Integer)
 {
-  Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this);
-  eown -> SelectBasics_EntityOwner::Set(3);
+  Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner (this, 3);
   Handle(Select3D_SensitiveSegment) seg = new Select3D_SensitiveSegment(eown,
                                                                        myPfirst,
                                                                        myPlast);
index 584d277d6d3314c11e0f4c6a64fedadd7924b206..c433572a25bf58de3cfb433fef115fb9913431f2 100644 (file)
@@ -512,8 +512,8 @@ void AIS_ColoredShape::ComputeSelection (const Handle(SelectMgr_Selection)& theS
   Handle(SelectMgr_SelectableObject) aThis (this);
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (aSelEntIter.Value()->BaseSensitive()->OwnerId());
-    anOwner->Set (aThis);
+    const Handle(SelectMgr_EntityOwner)& anOwner = aSelEntIter.Value()->BaseSensitive()->OwnerId();
+    anOwner->SetSelectable (aThis);
   }
 
   StdSelect_BRepSelectionTool::PreBuildBVH (theSelection);
index cd58808f1478f8bc5201b863066ea91efd56d0c7..ad7ce7acb504bd92a9b06ab97936ddc07cf8457d 100644 (file)
@@ -233,7 +233,7 @@ void AIS_ConnectedInteractive::ComputeSelection (const Handle(SelectMgr_Selectio
 
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (TheRefSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    if (Handle(Select3D_SensitiveEntity) aSensitive = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
+    if (const Handle(Select3D_SensitiveEntity)& aSensitive = aSelEntIter.Value()->BaseSensitive())
     {
       // Get the copy of SE3D
       if (Handle(Select3D_SensitiveEntity) aNewSensitive = aSensitive->GetConnected())
@@ -271,7 +271,7 @@ void AIS_ConnectedInteractive::computeSubShapeSelection (const Handle(SelectMgr_
   Shapes2EntitiesMap aShapes2EntitiesMap;
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aRefSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    if (Handle(Select3D_SensitiveEntity) aSE = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
+    if (const Handle(Select3D_SensitiveEntity)& aSE = aSelEntIter.Value()->BaseSensitive())
     {
       if (Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast (aSE->OwnerId()))
       {
index 65f7a29f7c13eee44cda6bcb05510d6d722b5a41..5d73dbf143e1a141e69b4ab72f466ecfc936f5b1 100644 (file)
@@ -30,7 +30,7 @@
 #include <Prs3d_LineAspect.hxx>
 #include <Prs3d_Presentation.hxx>
 #include <Quantity_Color.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Filter.hxx>
 #include <SelectMgr_OrFilter.hxx>
@@ -1136,9 +1136,9 @@ void AIS_InteractiveContext::EntityOwners(Handle(SelectMgr_IndexedMapOfOwner)& t
 
     for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
     {
-      if (Handle(SelectBasics_SensitiveEntity) aEntity = aSelEntIter.Value()->BaseSensitive())
+      if (Handle(Select3D_SensitiveEntity) aEntity = aSelEntIter.Value()->BaseSensitive())
       {
-        if (Handle(SelectMgr_EntityOwner) aOwner = Handle(SelectMgr_EntityOwner)::DownCast(aEntity->OwnerId()))
+        if (const Handle(SelectMgr_EntityOwner)& aOwner = aEntity->OwnerId())
         {
           theOwners->Add (aOwner);
         }
index 1e8fddc7113dfd5298ece40f54f61fb3c3e41382..780ebf3473d30f2efd63055ba917239e63d7977c 100644 (file)
@@ -85,7 +85,7 @@ namespace
   {
   public:
     //! Main constructor.
-    ManipSensCircle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+    ManipSensCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                      const Handle(Geom_Circle)& theCircle,
                      const Standard_Integer theNbPnts)
     : Select3D_SensitiveCircle (theOwnerId, theCircle, Standard_False, theNbPnts),
@@ -104,7 +104,7 @@ namespace
   class ManipSensTriangulation : public Select3D_SensitiveTriangulation, public ManipSensRotation
   {
   public:
-    ManipSensTriangulation (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+    ManipSensTriangulation (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                             const Handle(Poly_Triangulation)& theTrg,
                             const gp_Dir& thePlaneNormal)
     : Select3D_SensitiveTriangulation (theOwnerId, theTrg, TopLoc_Location(), Standard_True),
index 76fa3af8e0bcf5c6f1b7c0340d55c55c5ec2269b..1f7dd56d89bb7507dce5b8cd7d9493b926153359 100644 (file)
@@ -43,7 +43,6 @@
 #include <Prs3d_ShadingAspect.hxx>
 #include <Quantity_Color.hxx>
 #include <Select3D_SensitiveTriangulation.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <Standard_Type.hxx>
 #include <StdPrs_Plane.hxx>
index 955fa443149827242f621ba8307995c96697afe5..44eb8d9d2dfbe0da8148471741858a356d7e919b 100644 (file)
@@ -31,7 +31,6 @@
 #include <Prs3d_Projector.hxx>
 #include <Quantity_Color.hxx>
 #include <Select3D_SensitivePoint.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <Standard_Type.hxx>
 #include <StdPrs_Point.hxx>
@@ -124,7 +123,6 @@ void AIS_Point::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
                                  const Standard_Integer /*aMode*/)
 {
   Handle(SelectMgr_EntityOwner) eown = new SelectMgr_EntityOwner(this,10);
-//  eown -> SelectBasics_EntityOwner::Set(5);
   Handle(Select3D_SensitivePoint) sp = new Select3D_SensitivePoint(eown,
                                                                   myComponent->Pnt());
   aSelection->Add(sp);
index ba87081a435b0e011d7f0738ebb70d365aa0740f..7a2936dc3053aa9c32a25676a4fcda1370ec2d20 100644 (file)
@@ -43,7 +43,6 @@
 #include <Select3D_SensitivePrimitiveArray.hxx>
 #include <Select3D_SensitiveSegment.hxx>
 #include <Select3D_SensitiveTriangle.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <Standard_Type.hxx>
 
@@ -732,14 +731,14 @@ void AIS_Trihedron::SetDrawArrows (const Standard_Boolean theToDraw)
 //function : createSensitiveEntity
 //purpose  :
 //=======================================================================
-Handle(SelectBasics_SensitiveEntity) AIS_Trihedron::createSensitiveEntity (const Prs3d_DatumParts thePart,
-                                                   const Handle(SelectBasics_EntityOwner)& theOwner) const
+Handle(Select3D_SensitiveEntity) AIS_Trihedron::createSensitiveEntity (const Prs3d_DatumParts thePart,
+                                                   const Handle(SelectMgr_EntityOwner)& theOwner) const
 {
   Handle(Prs3d_DatumAspect) anAspect = myDrawer->DatumAspect();
   Handle(Graphic3d_ArrayOfPrimitives) aPrimitives = arrayOfPrimitives (thePart);
   if (aPrimitives.IsNull())
   {
-    return Handle(SelectBasics_SensitiveEntity)();
+    return Handle(Select3D_SensitiveEntity)();
   }
 
   if (thePart >= Prs3d_DP_XOYAxis
@@ -769,7 +768,7 @@ Handle(SelectBasics_SensitiveEntity) AIS_Trihedron::createSensitiveEntity (const
     const gp_Pnt anXYZ2 = aSegments->Vertice (2);
     return new Select3D_SensitiveSegment (theOwner, anXYZ1, anXYZ2);
   }
-  return Handle(SelectBasics_SensitiveEntity)();
+  return Handle(Select3D_SensitiveEntity)();
 }
 
 // =======================================================================
index 9576915ce951bea790af30414bd72571c79e987d..e50a34b5da7a5913af6da200f309b20e3dbb9c46 100644 (file)
@@ -225,8 +225,8 @@ protected:
 protected:
 
   //! Creates a sensitive entity for the datum part that will be used in selection owner creation.
-  Standard_EXPORT Handle(SelectBasics_SensitiveEntity) createSensitiveEntity (const Prs3d_DatumParts thePart,
-                                                     const Handle(SelectBasics_EntityOwner)& theOwner) const;
+  Standard_EXPORT Handle(Select3D_SensitiveEntity) createSensitiveEntity (const Prs3d_DatumParts thePart,
+                                                     const Handle(SelectMgr_EntityOwner)& theOwner) const;
 
   //! Computes presentation for display mode equal 1.
   Standard_EXPORT void computePresentation (const Handle(PrsMgr_PresentationManager3d)& thePrsMgr,
index eacba59f27deac68cc0dac12838ec29797b1d584..2f118c1adb7c9c4be8a0ba731f00c6262b413292 100644 (file)
@@ -27,9 +27,9 @@ IMPLEMENT_STANDARD_RTTIEXT (MeshVS_CommonSensitiveEntity, Select3D_SensitiveSet)
 //function : Constructor
 //purpose  :
 //=======================================================================
-MeshVS_CommonSensitiveEntity::MeshVS_CommonSensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwner,
-                                                            const Handle(MeshVS_Mesh)&              theParentMesh,
-                                                            const MeshVS_MeshSelectionMethod        theSelMethod)
+MeshVS_CommonSensitiveEntity::MeshVS_CommonSensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwner,
+                                                            const Handle(MeshVS_Mesh)& theParentMesh,
+                                                            const MeshVS_MeshSelectionMethod theSelMethod)
 : Select3D_SensitiveSet (theOwner),
   myDataSource (theParentMesh->GetDataSource()),
   mySelMethod (theSelMethod)
index dd2ea1d5640e3474eb9902983bbdd6df61613f29..fd87f9e08f8962f568feb646a2200b163731c9c7 100644 (file)
@@ -28,9 +28,9 @@ class MeshVS_CommonSensitiveEntity : public Select3D_SensitiveSet
 public:
 
   //! Default constructor.
-  Standard_EXPORT MeshVS_CommonSensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwner,
-                                                const Handle(MeshVS_Mesh)&              theParentMesh,
-                                                const MeshVS_MeshSelectionMethod        theSelMethod);
+  Standard_EXPORT MeshVS_CommonSensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwner,
+                                                const Handle(MeshVS_Mesh)& theParentMesh,
+                                                const MeshVS_MeshSelectionMethod theSelMethod);
 
   //! Destructor.
   Standard_EXPORT virtual ~MeshVS_CommonSensitiveEntity();
index ce81d39f06509825025201ed9f585c5ec0d29c6f..143f277daae1daaffc8a64d890e2ac16f2dd0378 100644 (file)
 
 #include <MeshVS_DummySensitiveEntity.hxx>
 
-#include <Bnd_Box2d.hxx>
-#include <SelectBasics_EntityOwner.hxx>
-#include <TColgp_Array1OfPnt2d.hxx>
-
-
-IMPLEMENT_STANDARD_RTTIEXT(MeshVS_DummySensitiveEntity,SelectBasics_SensitiveEntity)
+IMPLEMENT_STANDARD_RTTIEXT(MeshVS_DummySensitiveEntity, Select3D_SensitiveEntity)
 
 //================================================================
 // Function : Constructor MeshVS_DummySensitiveEntity
 // Purpose  :
 //================================================================
-MeshVS_DummySensitiveEntity::MeshVS_DummySensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId)
-: SelectBasics_SensitiveEntity (theOwnerId)
+MeshVS_DummySensitiveEntity::MeshVS_DummySensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwnerId)
+: Select3D_SensitiveEntity (theOwnerId)
 {}
 
 //================================================================
index 1e2bba9fde0160de70a3dfdbc8b60ff0cc9fe8a1..729cad77a9ab9f395289cd888e54ae4116e503c3 100644 (file)
 #include <Standard_Type.hxx>
 
 #include <Select3D_BndBox3d.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <SelectBasics_SelectingVolumeManager.hxx>
 
-class SelectBasics_EntityOwner;
-
-
 //! This class allows to create owners to all elements or nodes,
 //! both hidden and shown, but these owners user cannot select "by hands"
 //! in viewer. They means for internal application tasks, for example, receiving
 //! all owners, both for hidden and shown entities.
-class MeshVS_DummySensitiveEntity : public SelectBasics_SensitiveEntity
+class MeshVS_DummySensitiveEntity : public Select3D_SensitiveEntity
 {
 public:
 
-  Standard_EXPORT MeshVS_DummySensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId);
+  Standard_EXPORT MeshVS_DummySensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwnerId);
 
   Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
                                                     SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
@@ -51,9 +48,11 @@ public:
 
   Standard_EXPORT virtual gp_GTrsf InvInitLocation() const Standard_OVERRIDE;
 
-  DEFINE_STANDARD_RTTIEXT(MeshVS_DummySensitiveEntity,SelectBasics_SensitiveEntity)
+  virtual gp_Pnt CenterOfGeometry() const Standard_OVERRIDE { return gp_Pnt(); }
+
+  DEFINE_STANDARD_RTTIEXT(MeshVS_DummySensitiveEntity, Select3D_SensitiveEntity)
 };
 
-DEFINE_STANDARD_HANDLE(MeshVS_DummySensitiveEntity, SelectBasics_SensitiveEntity)
+DEFINE_STANDARD_HANDLE(MeshVS_DummySensitiveEntity, Select3D_SensitiveEntity)
 
 #endif // _MeshVS_DummySensitiveEntity_HeaderFile
index 108dc57e354db02d09d2834e0ce63c67a7505445..57bb641134df406d52244cdcf654ed09bbed3bd4 100644 (file)
@@ -49,7 +49,7 @@
 #include <Select3D_SensitiveGroup.hxx>
 #include <Select3D_SensitivePoint.hxx>
 #include <Select3D_SensitiveTriangle.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <SelectMgr_SequenceOfOwner.hxx>
@@ -542,7 +542,7 @@ void MeshVS_Mesh::ComputeSelection (const Handle(SelectMgr_Selection)& theSelect
               }
               else //if ( aType == MeshVS_ET_0D )   // Custom : not only 0D-elements !!!
               {
-                Handle(SelectBasics_SensitiveEntity) anEnt = myHilighter->CustomSensitiveEntity (anOwner, aKey);
+                Handle(Select3D_SensitiveEntity) anEnt = myHilighter->CustomSensitiveEntity (anOwner, aKey);
                 if (!anEnt.IsNull())
                 {
                   theSelection->Add (anEnt);
@@ -635,7 +635,7 @@ void MeshVS_Mesh::ComputeSelection (const Handle(SelectMgr_Selection)& theSelect
               }
               else //if ( aType == MeshVS_ET_0D )   // Custom : not only 0D-elements !!!
               {
-                Handle(SelectBasics_SensitiveEntity) anEnt = myHilighter->CustomSensitiveEntity (anOwner, aKey);
+                Handle(Select3D_SensitiveEntity) anEnt = myHilighter->CustomSensitiveEntity (anOwner, aKey);
                 if (!anEnt.IsNull())
                 {
                   theSelection->Add (anEnt);
index 247d8cac24bb0947a596c231493c374c793d9826..9ff4d9927c6688378aaf4f9f5bddd422264a9929 100644 (file)
@@ -20,7 +20,6 @@
 #include <Prs3d_Root.hxx>
 #include <PrsMgr_PresentationManager.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_SelectableObject.hxx>
 #include <Standard_Type.hxx>
 #include <TColStd_ListIteratorOfListOfReal.hxx>
@@ -49,7 +48,7 @@ MeshVS_MeshEntityOwner::MeshVS_MeshEntityOwner
   myID      ( ID ),
   myIsGroup ( IsGroup )
 {
-  SelectBasics_EntityOwner::Set ( Priority );
+  //
 }
 
 //================================================================
index 700e90b79226ab153f968cd553c14375819ed2d4..ef64a208ced0ccdb408867604ddd483cd682d4e2 100644 (file)
@@ -19,7 +19,6 @@
 #include <MeshVS_MeshOwner.hxx>
 #include <PrsMgr_PresentationManager.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_SelectableObject.hxx>
 #include <Standard_Type.hxx>
 #include <TColStd_HPackedMapOfInteger.hxx>
@@ -44,7 +43,6 @@ MeshVS_MeshOwner::MeshVS_MeshOwner (const SelectMgr_SOPtr&           theSelObj,
   myLastID = -1;
   if( !theDS.IsNull() )
     myDataSource = theDS;
-  SelectBasics_EntityOwner::Set ( thePriority );
 }
 
 //================================================================
index 347b55576fb3b5019920ebc2e9b3c8575d487b23..991a8a0732ed61396eb3d6ec09437c899eb06e0b 100644 (file)
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
+#include <MeshVS_PrsBuilder.hxx>
 
 #include <MeshVS_DataSource.hxx>
 #include <MeshVS_Drawer.hxx>
 #include <MeshVS_Mesh.hxx>
-#include <MeshVS_PrsBuilder.hxx>
 #include <Prs3d_Presentation.hxx>
 #include <Prs3d_Root.hxx>
-#include <SelectBasics_EntityOwner.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
-#include <Standard_Type.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(MeshVS_PrsBuilder,Standard_Transient)
 
@@ -66,8 +64,8 @@ void MeshVS_PrsBuilder::CustomBuild ( const Handle(Prs3d_Presentation)&,
 // Function : CustomSensitiveEntity
 // Purpose  :
 //================================================================
-Handle( SelectBasics_SensitiveEntity ) MeshVS_PrsBuilder::CustomSensitiveEntity
-  ( const Handle( SelectBasics_EntityOwner )&,
+Handle( Select3D_SensitiveEntity ) MeshVS_PrsBuilder::CustomSensitiveEntity
+  ( const Handle(SelectMgr_EntityOwner)&,
     const Standard_Integer ) const
 {
   return 0;
index eb5007209e4d181f9d5e826bfe60dcce0c3e0bd1..4fc363b597b01d1104ffaed1a700aec4e89c5464 100644 (file)
 class MeshVS_DataSource;
 class MeshVS_Drawer;
 class MeshVS_Mesh;
-class SelectBasics_SensitiveEntity;
-class SelectBasics_EntityOwner;
+class Select3D_SensitiveEntity;
+class SelectMgr_EntityOwner;
 
-
-class MeshVS_PrsBuilder;
 DEFINE_STANDARD_HANDLE(MeshVS_PrsBuilder, Standard_Transient)
 
 //! This class is parent for all builders using in MeshVS_Mesh.
@@ -58,7 +56,7 @@ public:
   Standard_EXPORT virtual void CustomBuild (const Handle(Prs3d_Presentation)& Prs, const TColStd_PackedMapOfInteger& IDs, TColStd_PackedMapOfInteger& IDsToExclude, const Standard_Integer DisplayMode) const;
   
   //! This method is called to build sensitive of custom elements ( they have MeshVS_ET_0D type )
-  Standard_EXPORT virtual Handle(SelectBasics_SensitiveEntity) CustomSensitiveEntity (const Handle(SelectBasics_EntityOwner)& Owner, const Standard_Integer SelectMode) const;
+  Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) CustomSensitiveEntity (const Handle(SelectMgr_EntityOwner)& Owner, const Standard_Integer SelectMode) const;
   
   //! Returns flags, assigned with builder during creation
   Standard_EXPORT Standard_Integer GetFlags() const;
index 105db04a7f5de96f6dbbd3c6374976a50e07feaa..c17600271149a774706f09fc7ae184ebd995d43e 100644 (file)
 // commercial license or contractual agreement.
 
 #include <MeshVS_SensitiveFace.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 
-
 IMPLEMENT_STANDARD_RTTIEXT(MeshVS_SensitiveFace,Select3D_SensitiveFace)
 
 //=======================================================================
 // name    : MeshVS_SensitiveFace::MeshVS_SensitiveFace
 // Purpose :
 //=======================================================================
-MeshVS_SensitiveFace::MeshVS_SensitiveFace (const Handle(SelectBasics_EntityOwner)& theOwnerId,
-                                            const TColgp_Array1OfPnt&               thePnts,
-                                            const Select3D_TypeOfSensitivity        theSensitivity)
+MeshVS_SensitiveFace::MeshVS_SensitiveFace (const Handle(SelectMgr_EntityOwner)& theOwnerId,
+                                            const TColgp_Array1OfPnt& thePnts,
+                                            const Select3D_TypeOfSensitivity theSensitivity)
 : Select3D_SensitiveFace (theOwnerId, thePnts, theSensitivity)
 {
   gp_XYZ aCenter (0.0, 0.0, 0.0);
index b50935ebd31329b3d89b96f772467c1fb856991b..02b38ccca128def59b51ae1673852bc262204218 100644 (file)
 #include <Select3D_SensitiveFace.hxx>
 #include <Select3D_TypeOfSensitivity.hxx>
 
-class SelectBasics_EntityOwner;
-
 //! This class provides custom sensitive face, which will be selected if it center is in rectangle.
 class MeshVS_SensitiveFace : public Select3D_SensitiveFace
 {
 public:
   
-  Standard_EXPORT MeshVS_SensitiveFace (const Handle(SelectBasics_EntityOwner)& theOwner,
+  Standard_EXPORT MeshVS_SensitiveFace (const Handle(SelectMgr_EntityOwner)& theOwner,
                                         const TColgp_Array1OfPnt& thePoints,
                                         const Select3D_TypeOfSensitivity theSensType = Select3D_TOS_INTERIOR);
 
index 29a3944d3b7c02196142dfb9784b4c618a9a6788..3feb84de21133050ae8aad516983f3ed629c7b51 100644 (file)
@@ -19,7 +19,6 @@
 #include <TColStd_Array1OfReal.hxx>
 #include <TColStd_HPackedMapOfInteger.hxx>
 #include <Select3D_SensitiveEntity.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <TopLoc_Location.hxx>
 #include <MeshVS_DataSource.hxx>
 #include <MeshVS_MeshOwner.hxx>
@@ -32,7 +31,7 @@ IMPLEMENT_STANDARD_RTTIEXT(MeshVS_SensitiveMesh,Select3D_SensitiveEntity)
 // name    : MeshVS_SensitiveMesh::MeshVS_SensitiveMesh
 // Purpose :
 //=======================================================================
-MeshVS_SensitiveMesh::MeshVS_SensitiveMesh (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+MeshVS_SensitiveMesh::MeshVS_SensitiveMesh (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                             const Standard_Integer theMode)
 : Select3D_SensitiveEntity (theOwnerId)
 {
index 8d460a8c655e8f8608fbe8635aba3663538d8322..c24ec2aedd4f8812296c71b14022cbc5167cc8b5 100644 (file)
 #include <Select3D_SensitiveEntity.hxx>
 #include <Select3D_BndBox3d.hxx>
 
-class SelectBasics_EntityOwner;
 class Select3D_SensitiveEntity;
 
-
 //! This class provides custom mesh sensitive entity used in advanced mesh selection.
 class MeshVS_SensitiveMesh : public Select3D_SensitiveEntity
 {
 public:
   
-  Standard_EXPORT MeshVS_SensitiveMesh (const Handle(SelectBasics_EntityOwner)& theOwner,
+  Standard_EXPORT MeshVS_SensitiveMesh (const Handle(SelectMgr_EntityOwner)& theOwner,
                                         const Standard_Integer theMode = 0);
   
   Standard_EXPORT Standard_Integer GetMode() const;
   
   Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
 
+  //! Checks whether sensitive overlaps current selecting volume.
+  virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
+                                    SelectBasics_PickResult& thePickResult) Standard_OVERRIDE
+  {
+    (void )theMgr;
+    (void )thePickResult;
+    return Standard_False;
+  }
+
   //! Returns the amount of mesh nodes
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
 
index f64964163d3f4b1c17b38e068da74060b50c38b1..f367406f2da06d38ba1b21f42da20a83b9710789 100644 (file)
@@ -20,7 +20,6 @@
 #include <MeshVS_Tool.hxx>
 #include <NCollection_Vec4.hxx>
 #include <Select3D_SensitiveEntity.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <TColgp_Array1OfPnt.hxx>
 #include <TColgp_HArray1OfPnt.hxx>
 #include <TColgp_Array1OfPnt2d.hxx>
@@ -33,7 +32,7 @@ IMPLEMENT_STANDARD_RTTIEXT(MeshVS_SensitivePolyhedron,Select3D_SensitiveEntity)
 // Function : Constructor MeshVS_SensitivePolyhedron
 // Purpose  :
 //================================================================
-MeshVS_SensitivePolyhedron::MeshVS_SensitivePolyhedron (const Handle(SelectBasics_EntityOwner)& theOwner,
+MeshVS_SensitivePolyhedron::MeshVS_SensitivePolyhedron (const Handle(SelectMgr_EntityOwner)& theOwner,
                                                         const TColgp_Array1OfPnt& theNodes,
                                                         const Handle(MeshVS_HArray1OfSequenceOfInteger)& theTopo)
 : Select3D_SensitiveEntity (theOwner),
index f8075e2f95f033eed01f7565cf6a9b18c3f8d6eb..0aac9ccd0c506c6366defd4b7f6a9c9392a805cc 100644 (file)
@@ -28,7 +28,6 @@
 #include <Select3D_SensitiveEntity.hxx>
 #include <Select3D_BndBox3d.hxx>
 
-class SelectBasics_EntityOwner;
 class Select3D_SensitiveEntity;
 class TopLoc_Location;
 class Bnd_Box2d;
@@ -46,7 +45,7 @@ class MeshVS_SensitivePolyhedron : public Select3D_SensitiveEntity
 {
 public:
 
-  Standard_EXPORT MeshVS_SensitivePolyhedron (const Handle(SelectBasics_EntityOwner)& theOwner,
+  Standard_EXPORT MeshVS_SensitivePolyhedron (const Handle(SelectMgr_EntityOwner)& theOwner,
                                               const TColgp_Array1OfPnt& theNodes,
                                               const Handle(MeshVS_HArray1OfSequenceOfInteger)& theTopo);
 
index 846a9842b6fcbffda91694df69a6da72950b6820..454d9da39cdac04029418a53047a032b4749a08f 100644 (file)
@@ -55,8 +55,7 @@ MeshVS_SensitiveQuad::MeshVS_SensitiveQuad (const Handle(SelectMgr_EntityOwner)&
 //=======================================================================
 Handle(Select3D_SensitiveEntity) MeshVS_SensitiveQuad::GetConnected()
 {
-  return new MeshVS_SensitiveQuad (Handle(SelectMgr_EntityOwner)::DownCast (OwnerId()),
-    myVertices[0], myVertices[1], myVertices[2], myVertices[3]);
+  return new MeshVS_SensitiveQuad (myOwnerId, myVertices[0], myVertices[1], myVertices[2], myVertices[3]);
 }
 
 //=======================================================================
index 7ff7e21ad3e59ce3f54fb1b747d8ddd3390d2aad..0db77e05bd4641369a10c44e59232f5288952e9d 100644 (file)
 
 #include <MeshVS_SensitiveSegment.hxx>
 
-#include <SelectBasics_EntityOwner.hxx>
-
-
 IMPLEMENT_STANDARD_RTTIEXT(MeshVS_SensitiveSegment,Select3D_SensitiveSegment)
 
 //=======================================================================
 // name    : MeshVS_SensitiveSegment::MeshVS_SensitiveSegment
 // Purpose :
 //=======================================================================
-MeshVS_SensitiveSegment::MeshVS_SensitiveSegment (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+MeshVS_SensitiveSegment::MeshVS_SensitiveSegment (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                   const gp_Pnt& theFirstPnt,
                                                   const gp_Pnt& theLastPnt)
 : Select3D_SensitiveSegment (theOwnerId, theFirstPnt, theLastPnt)
index 2d047201aa57cdaadde70d36f5d0734202d6082e..174f5c19d929436012b75880a53415ce2d5981f5 100644 (file)
 #ifndef _MeshVS_SensitiveSegment_HeaderFile
 #define _MeshVS_SensitiveSegment_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Type.hxx>
-
 #include <gp_Pnt.hxx>
 #include <Select3D_SensitiveSegment.hxx>
 
-class SelectBasics_EntityOwner;
-class gp_Pnt;
-
-
 //! This class provides custom sensitive face, which will be selected if it center is in rectangle.
 class MeshVS_SensitiveSegment : public Select3D_SensitiveSegment
 {
 public:
 
-  Standard_EXPORT MeshVS_SensitiveSegment (const Handle(SelectBasics_EntityOwner)& theOwner,
+  Standard_EXPORT MeshVS_SensitiveSegment (const Handle(SelectMgr_EntityOwner)& theOwner,
                                            const gp_Pnt& theFirstPnt,
                                            const gp_Pnt& theLastPnt);
 
index 7e0c76e78cdbde6bf74da61f9d0c5b686afdaa98..bc7d0a9edf7ff7cb8799e03f8aad9a7221703e15 100644 (file)
@@ -86,7 +86,7 @@ private:
 // purpose  : Splits the given point set thePoints onto planar convex
 //            polygons
 // =======================================================================
-Select3D_InteriorSensitivePointSet::Select3D_InteriorSensitivePointSet (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_InteriorSensitivePointSet::Select3D_InteriorSensitivePointSet (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                                         const TColgp_Array1OfPnt& thePoints)
   : Select3D_SensitiveSet (theOwnerId)
 {
index 4375f221a0a1d107b9b4a7cf90c2f3444d12bb54..b9c7d658f2e03f742629e7b03f7dd820aee5bc6b 100644 (file)
@@ -25,7 +25,7 @@
 #include <Select3D_SensitiveSet.hxx>
 
 class gp_Pnt;
-class SelectBasics_EntityOwner;
+class SelectMgr_EntityOwner;
 
 typedef NCollection_Vector<Handle(Select3D_SensitivePoly)> Select3D_VectorOfHPoly;
 
@@ -37,7 +37,7 @@ class Select3D_InteriorSensitivePointSet : public Select3D_SensitiveSet
 public:
 
   //! Splits the given point set thePoints onto planar convex polygons
-  Standard_EXPORT Select3D_InteriorSensitivePointSet (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_InteriorSensitivePointSet (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                       const TColgp_Array1OfPnt& thePoints);
 
   //! Initializes the given array theHArrayOfPnt by 3d coordinates of vertices of the
index 526ee3fad8ef061ecfb8079fdc6dec186ab6c153..d5f169599bfd7acf2dd893f0f146f722c8dce970 100644 (file)
@@ -22,7 +22,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveBox,Select3D_SensitiveEntity)
 // Function: Select3D_SensitiveBox
 // Purpose :
 //==================================================
-Select3D_SensitiveBox::Select3D_SensitiveBox (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveBox::Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                               const Bnd_Box& theBox)
 : Select3D_SensitiveEntity (theOwnerId)
 {
@@ -40,7 +40,7 @@ Select3D_SensitiveBox::Select3D_SensitiveBox (const Handle(SelectBasics_EntityOw
 // Purpose :
 //==================================================
 
-Select3D_SensitiveBox::Select3D_SensitiveBox (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveBox::Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                               const Standard_Real theXMin,
                                               const Standard_Real theYMin,
                                               const Standard_Real theZMin,
index 79569b77b0b5bad939b3625f40524941983674dd..06f91d02c67f86e96687c8ee08abdf1542652939 100644 (file)
@@ -28,7 +28,7 @@ public:
 
   //! Constructs a sensitive box object defined by the
   //! owner theOwnerId, and the box theBox.
-  Standard_EXPORT Select3D_SensitiveBox (const Handle(SelectBasics_EntityOwner)& theOwnerId, const Bnd_Box& theBox);
+  Standard_EXPORT Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner)& theOwnerId, const Bnd_Box& theBox);
 
   //! Constructs a sensitive box object defined by the
   //! owner theOwnerId, and the coordinates theXmin, theYMin, theZMin, theXMax, theYMax, theZMax.
@@ -36,7 +36,7 @@ public:
   //! the front lower left hand corner of the box,
   //! and theXMax, theYMax and theZMax define the maximum
   //! point in the back upper right hand corner of the box.
-  Standard_EXPORT Select3D_SensitiveBox (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveBox (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                          const Standard_Real theXMin,
                                          const Standard_Real theYMin,
                                          const Standard_Real theZMin,
index 3048abc41a5ccc6ee794d7346ab705c83914e4d2..e1523f1e4be9e7988b83d93d765f6e9ba66a887d 100644 (file)
@@ -58,7 +58,7 @@ namespace
 //function : Select3D_SensitiveCircle (constructor)
 //purpose  : Definition of a sensitive circle
 //=======================================================================
-Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                    const Handle(Geom_Circle)& theCircle,
                                                    const Standard_Boolean theIsFilled,
                                                    const Standard_Integer theNbPnts)
@@ -116,7 +116,7 @@ Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectBasics_Ent
 //function : Select3D_SensitiveCircle (constructor)
 //purpose  : Definition of a sensitive arc
 //=======================================================================
-Select3D_SensitiveCircle::Select3D_SensitiveCircle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCircle::Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                     const Handle(Geom_Circle)& theCircle,
                                                     const Standard_Real theU1,
                                                     const Standard_Real theU2,
@@ -174,7 +174,7 @@ Select3D_SensitiveCircle::Select3D_SensitiveCircle (const Handle(SelectBasics_En
 //function : Select3D_SensitiveCircle
 //purpose  :
 //=======================================================================
-Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                    const Handle(TColgp_HArray1OfPnt)& thePnts3d,
                                                    const Standard_Boolean theIsFilled)
 : Select3D_SensitivePoly (theOwnerId, thePnts3d, static_cast<Standard_Boolean> (!theIsFilled)),
@@ -199,7 +199,7 @@ Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectBasics_Ent
 //purpose  :
 //=======================================================================
 
-Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCircle::Select3D_SensitiveCircle(const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                    const TColgp_Array1OfPnt& thePnts3d,
                                                    const Standard_Boolean theIsFilled)
 : Select3D_SensitivePoly (theOwnerId, thePnts3d, !theIsFilled),
index 0d3445463beb3004c27c45adb26be5030feac56b..9f9e2884fdb64eb7177c2d2a7fec58433229134f 100644 (file)
@@ -37,7 +37,7 @@ public:
   //! Constructs the sensitive circle object defined by the
   //! owner theOwnerId, the circle theCircle, the boolean
   //! theIsFilled and the number of points theNbPnts.
-  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                             const Handle(Geom_Circle)& theCircle,
                                             const Standard_Boolean theIsFilled = Standard_False,
                                             const Standard_Integer theNbPnts = 12);
@@ -46,7 +46,7 @@ public:
   //! owner theOwnerId, the circle theCircle, the parameters theU1
   //! and theU2, the boolean theIsFilled and the number of points theNbPnts.
   //! theU1 and theU2 define the first and last points of the arc on theCircle.
-  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                             const Handle(Geom_Circle)& theCircle,
                                             const Standard_Real theU1,
                                             const Standard_Real theU2,
@@ -59,7 +59,7 @@ public:
   //! circle. The triangle i+1 lies on the intersection of the
   //! tangents to the circle of i and i+2. Note, that the first point of thePnts3d
   //! must be equal to the last point of thePnts3d.
-  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                             const Handle(TColgp_HArray1OfPnt)& thePnts3d,
                                             const Standard_Boolean theIsFilled = Standard_False);
 
@@ -67,7 +67,7 @@ public:
   //! owner theOwnerId, the array of points thePnts3d, and the boolean theIsFilled.
   //! If the length of thePnts3d is more then 1, the first point of thePnts3d
   //! must be equal to the last point of thePnts3d.
-  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCircle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                             const TColgp_Array1OfPnt& thePnts3d,
                                             const Standard_Boolean theIsFilled = Standard_False);
 
index d94a0bca1aa36bd2b74f35ec7c7b8545ecf30a51..06669d2e959fa6ad004ae168acbac97de5d6ccdb 100644 (file)
@@ -25,7 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveCurve,Select3D_SensitivePoly)
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                   const Handle(Geom_Curve)& theCurve,
                                                   const Standard_Integer theNbPnts)
 : Select3D_SensitivePoly (theOwnerId, Standard_True, theNbPnts),
@@ -39,7 +39,7 @@ Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectBasics_Enti
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                   const Handle(TColgp_HArray1OfPnt)& thePoints)
 : Select3D_SensitivePoly (theOwnerId, thePoints, Standard_True)
 
@@ -51,7 +51,7 @@ Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectBasics_Enti
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveCurve::Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                   const TColgp_Array1OfPnt& thePoints)
 : Select3D_SensitivePoly (theOwnerId, thePoints, Standard_True)
 {
index c2951d7799642ff0f940c75f9b5b6b83b51f4c6d..1e63a87bdc49bee1ca4b48700a5193e3185ffd77 100644 (file)
@@ -36,18 +36,18 @@ public:
   //! Constructs a sensitive curve object defined by the
   //! owner theOwnerId, the curve theCurve, and the
   //! maximum number of points on the curve: theNbPnts.
-  Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                            const Handle(Geom_Curve)& theCurve,
                                            const Standard_Integer theNbPnts = 17);
 
   //! Constructs a sensitive curve object defined by the
   //! owner theOwnerId and the set of points ThePoints.
-  Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                            const Handle(TColgp_HArray1OfPnt)& thePoints);
 
   //! Creation of Sensitive Curve from Points.
   //!          Warning : This Method should disappear in the next version...
-  Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveCurve (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                            const TColgp_Array1OfPnt& thePoints);
 
   //! Returns the copy of this
index ec0c57b5c1076de7ef375751dab56e1a237bdffb..c9550a6b245bd7ac888802fe54de7d483b061bee 100644 (file)
 
 #include <Select3D_SensitiveEntity.hxx>
 
-#include <Precision.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 
-IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveEntity,SelectBasics_SensitiveEntity)
+IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveEntity, Standard_Transient)
 
 //=======================================================================
 //function : Select3D_SensitiveEntity
 //purpose  :
 //=======================================================================
-Select3D_SensitiveEntity::Select3D_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId)
-: SelectBasics_SensitiveEntity (theOwnerId) {}
-
-//=======================================================================
-// function : Matches
-// purpose  : Checks whether sensitive overlaps current selecting volume.
-//            Stores minimum depth, distance to center of geometry and
-//            closest point detected into thePickResult
-//=======================================================================
-Standard_Boolean Select3D_SensitiveEntity::Matches (SelectBasics_SelectingVolumeManager& /*theMgr*/,
-                                                    SelectBasics_PickResult& /*thePickResult*/)
-{
-  return Standard_False;
-}
-
-//=======================================================================
-//function : GetConnected
-//purpose  : 
-//=======================================================================
-
-Handle(Select3D_SensitiveEntity) Select3D_SensitiveEntity::GetConnected()
-{
-  Handle(Select3D_SensitiveEntity) aNewEntity;
-  return aNewEntity;
-}
-
-//=======================================================================
-// function : BVH
-// purpose  : Builds BVH tree for a sensitive if needed
-//=======================================================================
-void Select3D_SensitiveEntity::BVH()
-{
-  return;
-}
-
-//=======================================================================
-// function : Clear
-// purpose  : Cleans up resources and memory
-//=======================================================================
-void Select3D_SensitiveEntity::Clear()
-{
-  Set (NULL);
-}
-
-//=======================================================================
-// function : HasInitLocation
-// purpose  : Returns true if the shape corresponding to the entity has init location
-//=======================================================================
-Standard_Boolean Select3D_SensitiveEntity::HasInitLocation() const
-{
-  return Standard_False;
-}
-
-//=======================================================================
-// function : InvInitLocation
-// purpose  : Returns inversed location transformation matrix if the shape corresponding
-//            to this entity has init location set. Otherwise, returns identity matrix.
-//=======================================================================
-gp_GTrsf Select3D_SensitiveEntity::InvInitLocation() const
+Select3D_SensitiveEntity::Select3D_SensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwnerId)
+: myOwnerId (theOwnerId),
+  mySFactor (2)
 {
-  return gp_GTrsf();
+  //
 }
index 12c3006818b052f7ee0f60b70ba808dc1c52395d..506acd516690ac56866e26f80488f9922302548b 100644 (file)
 #ifndef _Select3D_SensitiveEntity_HeaderFile
 #define _Select3D_SensitiveEntity_HeaderFile
 
+#include <gp_GTrsf.hxx>
+#include <gp_Trsf.hxx>
+#include <Standard_Assert.hxx>
+#include <Standard_Transient.hxx>
+#include <Select3D_BndBox3d.hxx>
+#include <SelectBasics_SelectingVolumeManager.hxx>
+#include <SelectBasics_PickResult.hxx>
 #include <SelectBasics_SensitiveEntity.hxx>
 #include <SelectMgr_SelectingVolumeManager.hxx>
 #include <TopLoc_Location.hxx>
 
-class SelectBasics_EntityOwner;
+class SelectMgr_EntityOwner;
 
-//!  Abstract framework to define 3D sensitive entities.
-//! As the selection process uses the principle of a
-//! projection of 3D shapes onto a 2D view where
-//! nearness to a rectangle determines whether a shape
-//! is picked or not, all 3D shapes need to be converted
-//! into 2D ones in order to be selected.
-class Select3D_SensitiveEntity : public SelectBasics_SensitiveEntity
+//! Abstract framework to define 3D sensitive entities.
+class Select3D_SensitiveEntity : public Standard_Transient
 {
+  DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveEntity, Standard_Transient)
 public:
 
-  //! Originally this method intended to return sensitive
-  //! entity with new location aLocation, but currently sensitive
-  //! entities do not hold a location, instead HasLocation() and
-  //! Location() methods call corresponding entity owner's methods.
-  //! Thus all entities returned by GetConnected() share the same
-  //! location propagated from corresponding selectable object.
-  //! You must redefine this function for any type of
-  //! sensitive entity which can accept another connected
-  //! sensitive entity.//can be connected to another sensitive entity.
-  Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected();
+  //! Returns pointer to owner of the entity
+  const Handle(SelectMgr_EntityOwner)& OwnerId() const { return myOwnerId; }
+
+  //! Sets owner of the entity
+  virtual void Set (const Handle(SelectMgr_EntityOwner)& theOwnerId)
+  {
+    myOwnerId = theOwnerId;
+  }
+
+  //! allows a better sensitivity for a specific entity in selection algorithms useful for small sized entities.
+  Standard_Integer SensitivityFactor() const { return mySFactor; }
+
+  //! Allows to manage sensitivity of a particular sensitive entity
+  void SetSensitivityFactor (const Standard_Integer theNewSens)
+  {
+    Standard_ASSERT_RAISE (theNewSens > 0, "Error! Selection sensitivity have positive value.");
+    mySFactor = theNewSens;
+  }
+
+  //! Originally this method intended to return sensitive entity with new location aLocation,
+  //! but currently sensitive entities do not hold a location,
+  //! instead HasLocation() and Location() methods call corresponding entity owner's methods.
+  //! Thus all entities returned by GetConnected() share the same location propagated from corresponding selectable object.
+  //! You must redefine this function for any type of sensitive entity which can accept another connected sensitive entity.
+  virtual Handle(Select3D_SensitiveEntity) GetConnected() { return Handle(Select3D_SensitiveEntity)(); }
 
   //! Checks whether sensitive overlaps current selecting volume.
-  //! Stores minimum depth, distance to center of geometry and
-  //! closest point detected into thePickResult
-  Standard_EXPORT virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
-                                                    SelectBasics_PickResult& thePickResult) Standard_OVERRIDE;
-
-  //! Returns the number of sub-entities or elements in
-  //! sensitive entity. Is used to determine if entity is
-  //! complex and needs to pre-build BVH at the creation of
-  //! sensitive entity step or is light-weighted so the tree
-  //! can be build on demand with unnoticeable delay
-  virtual Standard_Integer NbSubElements() Standard_OVERRIDE = 0;
+  //! Stores minimum depth, distance to center of geometry and closest point detected into thePickResult
+  virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr,
+                                    SelectBasics_PickResult& thePickResult) = 0;
+
+  //! Returns the number of sub-entities or elements in sensitive entity.
+  //! Is used to determine if entity is complex and needs to pre-build BVH at the creation of sensitive entity step
+  //! or is light-weighted so the tree can be build on demand with unnoticeable delay.
+  virtual Standard_Integer NbSubElements() = 0;
 
   //! Returns bounding box of a sensitive with transformation applied
-  virtual Select3D_BndBox3d BoundingBox() Standard_OVERRIDE = 0;
+  virtual Select3D_BndBox3d BoundingBox() = 0;
 
   //! Returns center of a sensitive with transformation applied
   virtual gp_Pnt CenterOfGeometry() const = 0;
 
   //! Builds BVH tree for a sensitive if needed
-  Standard_EXPORT virtual void BVH() Standard_OVERRIDE;
+  virtual void BVH() {}
 
   //! Clears up all resources and memory
-  Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
+  virtual void Clear() { Set (Handle(SelectMgr_EntityOwner)()); }
 
   //! Returns true if the shape corresponding to the entity has init location
-  Standard_EXPORT virtual Standard_Boolean HasInitLocation() const Standard_OVERRIDE;
+  virtual Standard_Boolean HasInitLocation() const { return Standard_False; }
 
-  //! Returns inversed location transformation matrix if the shape corresponding
-  //! to this entity has init location set. Otherwise, returns identity matrix.
-  Standard_EXPORT virtual gp_GTrsf InvInitLocation() const Standard_OVERRIDE;
+  //! Returns inversed location transformation matrix if the shape corresponding to this entity has init location set.
+  //! Otherwise, returns identity matrix.
+  virtual gp_GTrsf InvInitLocation() const { return gp_GTrsf(); }
 
-  DEFINE_STANDARD_RTTIEXT(Select3D_SensitiveEntity,SelectBasics_SensitiveEntity)
+protected:
+
+  Standard_EXPORT Select3D_SensitiveEntity (const Handle(SelectMgr_EntityOwner)& theOwnerId);
 
 protected:
 
-  Standard_EXPORT Select3D_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId);
+  Handle(SelectMgr_EntityOwner) myOwnerId;
+  Standard_Integer mySFactor;
+
 };
 
-DEFINE_STANDARD_HANDLE(Select3D_SensitiveEntity, SelectBasics_SensitiveEntity)
+DEFINE_STANDARD_HANDLE(Select3D_SensitiveEntity, Standard_Transient)
+
+// for porting old code
+typedef Select3D_SensitiveEntity SelectBasics_SensitiveEntity;
 
 #endif // _Select3D_SensitiveEntity_HeaderFile
index 790b89c18255127736751ac155442a54c74b8c73..0ae25aed5b640e8794748c5cdd5363b4c93901ad 100644 (file)
@@ -25,7 +25,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveFace,Select3D_SensitiveEntity)
 // Function: Hide this constructor to the next version...
 // Purpose : simply avoid interfering with the version update
 //==================================================
-Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                 const TColgp_Array1OfPnt& thePoints,
                                                 const Select3D_TypeOfSensitivity theType)
 : Select3D_SensitiveEntity (theOwnerId),
@@ -45,7 +45,7 @@ Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectBasics_Entity
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveFace::Select3D_SensitiveFace (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                 const Handle(TColgp_HArray1OfPnt)& thePoints,
                                                 const Select3D_TypeOfSensitivity theType)
 : Select3D_SensitiveEntity (theOwnerId),
index b46d8246d36854f843f5ea349c3682d4335fe591..5567c9f07a2815522d3e71a1240a86855ad57366 100644 (file)
@@ -37,7 +37,7 @@ public:
   //! owner theOwnerId, the array of points thePoints, and
   //! the sensitivity type theType.
   //! The array of points is the outer polygon of the geometric face.
-  Standard_EXPORT Select3D_SensitiveFace (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveFace (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                           const TColgp_Array1OfPnt& thePoints,
                                           const Select3D_TypeOfSensitivity theType);
 
@@ -45,7 +45,7 @@ public:
   //! owner theOwnerId, the array of points thePoints, and
   //! the sensitivity type theType.
   //! The array of points is the outer polygon of the geometric face.
-  Standard_EXPORT Select3D_SensitiveFace (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveFace (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                           const Handle(TColgp_HArray1OfPnt)& thePoints,
                                           const Select3D_TypeOfSensitivity theType);
 
index 9827b397e46ee37bc9a0bc2bd0dffc37aae902b1..d01499d6c3f29ab2c3eb4799e187bc739ad4c6e6 100644 (file)
@@ -24,7 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveGroup,Select3D_SensitiveSet)
 //function : Creation
 //purpose  :
 //=======================================================================
-Select3D_SensitiveGroup::Select3D_SensitiveGroup (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveGroup::Select3D_SensitiveGroup (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                   const Standard_Boolean theIsMustMatchAll)
 : Select3D_SensitiveSet (theOwnerId),
   myMustMatchAll (theIsMustMatchAll),
@@ -35,7 +35,7 @@ Select3D_SensitiveGroup::Select3D_SensitiveGroup (const Handle(SelectBasics_Enti
 //function : Creation
 //purpose  :
 //=======================================================================
-Select3D_SensitiveGroup::Select3D_SensitiveGroup (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveGroup::Select3D_SensitiveGroup (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                   Select3D_EntitySequence& theEntities,
                                                   const Standard_Boolean theIsMustMatchAll)
 : Select3D_SensitiveSet (theOwnerId),
@@ -236,7 +236,7 @@ Standard_Boolean Select3D_SensitiveGroup::Matches (SelectBasics_SelectingVolumeM
 //function : Set
 //purpose  :
 //=======================================================================
-void Select3D_SensitiveGroup::Set (const Handle(SelectBasics_EntityOwner)& theOwnerId)
+void Select3D_SensitiveGroup::Set (const Handle(SelectMgr_EntityOwner)& theOwnerId)
 { 
   Select3D_SensitiveEntity::Set (theOwnerId);
   for (Select3D_IndexedMapOfEntity::Iterator anEntityIter (myEntities); anEntityIter.More(); anEntityIter.Next())
index 27540f4cb44c94cde7ca4b253ff679863dd639c7..37efcf6cb0727041a3aa87cd302cbeac872b438b 100644 (file)
@@ -39,12 +39,12 @@ public:
   //! This is a set of sensitive 3D entities. The sensitive
   //! entities will be defined using the function Add to fill
   //! the entity owner OwnerId. If MatchAll is false, nothing can be added.
-  Standard_EXPORT Select3D_SensitiveGroup (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveGroup (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                            const Standard_Boolean theIsMustMatchAll = Standard_True);
 
   //! Constructs a sensitive group object defined by the list
   //! TheList and the entity owner OwnerId. If MatchAll is false, nothing is done.
-  Standard_EXPORT Select3D_SensitiveGroup (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveGroup (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                            Select3D_EntitySequence& theEntities,
                                            const Standard_Boolean theIsMustMatchAll = Standard_True);
 
@@ -118,7 +118,7 @@ public:
   Standard_EXPORT virtual Handle(Select3D_SensitiveEntity) GetConnected() Standard_OVERRIDE;
 
   //! Sets the owner for all entities in group
-  Standard_EXPORT void Set (const Handle(SelectBasics_EntityOwner)& theOwnerId) Standard_OVERRIDE;
+  Standard_EXPORT void Set (const Handle(SelectMgr_EntityOwner)& theOwnerId) Standard_OVERRIDE;
 
   //! Returns bounding box of the group. If location transformation
   //! is set, it will be applied
index b54560964a743ab3c02940d6e023c5caeca9ad0b..39bca11760e908d2148e66007e106ec2168d2a6c 100644 (file)
@@ -22,7 +22,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitivePoint,Select3D_SensitiveEntity)
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitivePoint::Select3D_SensitivePoint (const Handle(SelectBasics_EntityOwner)& theOwner,
+Select3D_SensitivePoint::Select3D_SensitivePoint (const Handle(SelectMgr_EntityOwner)& theOwner,
                                                   const gp_Pnt& thePoint)
 : Select3D_SensitiveEntity (theOwner)
 {
index be1088fd79ccc409432fa53767295f8e3d1e9635..a8c6e8c249d6d97904699b5fb5f927b74494c6df 100644 (file)
@@ -28,7 +28,7 @@ public:
 
   //! Constructs a sensitive point object defined by the
   //! owner OwnerId and the point Point.
-  Standard_EXPORT Select3D_SensitivePoint (const Handle(SelectBasics_EntityOwner)& theOwnerId, const gp_Pnt& thePoint);
+  Standard_EXPORT Select3D_SensitivePoint (const Handle(SelectMgr_EntityOwner)& theOwnerId, const gp_Pnt& thePoint);
 
   //! Returns the amount of sub-entities in sensitive
   Standard_EXPORT virtual Standard_Integer NbSubElements() Standard_OVERRIDE;
index 20ffe84904ee520b20b1790b400d3859c6e6d135..61a02bf94bed4a1ecb0f1e02a0d94ab641b090a1 100644 (file)
@@ -19,7 +19,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitivePoly,Select3D_SensitiveSet)
 // Function: Select3D_SensitivePoly
 // Purpose :
 //==================================================
-Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                 const TColgp_Array1OfPnt& thePoints,
                                                 const Standard_Boolean theIsBVHEnabled)
 : Select3D_SensitiveSet (theOwnerId),
@@ -60,7 +60,7 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectBasics_Entity
 // Function: Select3D_SensitivePoly
 // Purpose :
 //==================================================
-Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                 const Handle(TColgp_HArray1OfPnt)& thePoints,
                                                 const Standard_Boolean theIsBVHEnabled)
 : Select3D_SensitiveSet (theOwnerId),
@@ -101,7 +101,7 @@ Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectBasics_Entity
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitivePoly::Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                 const Standard_Boolean theIsBVHEnabled,
                                                 const Standard_Integer theNbPnts)
 : Select3D_SensitiveSet (theOwnerId),
index bb0b7c2deb148515de13114fbfa4dc6d2a544888..e530093d114d9f9b2fa6a86a12214d751353017c 100644 (file)
@@ -36,7 +36,7 @@ public:
   //! owner OwnerId, the array of points ThePoints, and
   //! the sensitivity type Sensitivity.
   //! The array of points is the outer polygon of the geometric face.
-  Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                           const TColgp_Array1OfPnt& thePoints,
                                           const Standard_Boolean theIsBVHEnabled);
 
@@ -44,14 +44,14 @@ public:
   //! owner OwnerId, the array of points ThePoints, and
   //! the sensitivity type Sensitivity.
   //! The array of points is the outer polygon of the geometric face.
-  Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                           const Handle(TColgp_HArray1OfPnt)& thePoints,
                                           const Standard_Boolean theIsBVHEnabled);
 
   //! Constructs the sensitive circle object defined by the
   //! owner OwnerId, the circle Circle, the Boolean
   //! FilledCircle and the number of points NbOfPoints.
-  Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitivePoly (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                           const Standard_Boolean theIsBVHEnabled,
                                           const Standard_Integer theNbPnts = 6);
 
index 494f2eef98398857e1a86ce034e4bfb2b58eea0f..0671d58690636d369d79f021b89d1d88747b6de2 100644 (file)
@@ -155,7 +155,7 @@ private:
 // function : Select3D_SensitivePrimitiveArray
 // purpose  :
 // =======================================================================
-Select3D_SensitivePrimitiveArray::Select3D_SensitivePrimitiveArray (const Handle(SelectBasics_EntityOwner)& theOwnerId)
+Select3D_SensitivePrimitiveArray::Select3D_SensitivePrimitiveArray (const Handle(SelectMgr_EntityOwner)& theOwnerId)
 : Select3D_SensitiveSet (theOwnerId),
   myPosData (NULL),
   myPosStride (Standard_Size(-1)),
@@ -610,7 +610,7 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitivePrimitiveArray::GetConnected(
 //function : Set
 //purpose  :
 //=======================================================================
-void Select3D_SensitivePrimitiveArray::Set (const Handle(SelectBasics_EntityOwner)& theOwnerId)
+void Select3D_SensitivePrimitiveArray::Set (const Handle(SelectMgr_EntityOwner)& theOwnerId)
 {
   base_type::Set (theOwnerId);
   if (!myGroups.IsNull())
index 851b16304f00f906696903bc2f8665fed63df0ab..f579d7dc7a51320baa10d4cedd39586c928f13e6 100644 (file)
@@ -33,7 +33,7 @@ class Select3D_SensitivePrimitiveArray : public Select3D_SensitiveSet
 public:
 
   //! Constructs an empty sensitive object.
-  Standard_EXPORT Select3D_SensitivePrimitiveArray (const Handle(SelectBasics_EntityOwner)& theOwnerId);
+  Standard_EXPORT Select3D_SensitivePrimitiveArray (const Handle(SelectMgr_EntityOwner)& theOwnerId);
 
   //! Return patch size limit (1 by default).
   Standard_Integer PatchSizeMax() const { return myPatchSizeMax; }
@@ -251,7 +251,7 @@ public:
   }
 
   //! Sets the owner for all entities in group
-  Standard_EXPORT virtual void Set (const Handle(SelectBasics_EntityOwner)& theOwnerId) Standard_OVERRIDE;
+  Standard_EXPORT virtual void Set (const Handle(SelectMgr_EntityOwner)& theOwnerId) Standard_OVERRIDE;
 
   //! Builds BVH tree for sensitive set.
   Standard_EXPORT virtual void BVH() Standard_OVERRIDE;
index ef146614c15726fdfa8fc32ed40d2c13184d44b8..8d51376315a9d9bd7da7523c246c8761f62fd7de 100644 (file)
@@ -26,7 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveSegment,Select3D_SensitiveEntity)
 // Function : Create
 // Purpose  : Constructor
 //=====================================================
-Select3D_SensitiveSegment::Select3D_SensitiveSegment (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveSegment::Select3D_SensitiveSegment (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                       const gp_Pnt& theFirstPnt,
                                                       const gp_Pnt& theLastPnt)
 : Select3D_SensitiveEntity (theOwnerId)
index 01d8977b20f193d9a16f43b4b63cd0b64d8fb11a..3aefcca48fa254aa9e300bb12a2affdc283dfc77 100644 (file)
@@ -29,7 +29,7 @@ public:
 
   //! Constructs the sensitive segment object defined by
   //! the owner theOwnerId, the points theFirstPnt, theLastPnt
-  Standard_EXPORT Select3D_SensitiveSegment (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveSegment (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                              const gp_Pnt& theFirstPnt,
                                              const gp_Pnt& theLastPnt);
 
index c7e606ad069bb151b9811ae42245177549a99369..e5e40aacd0e9a83b5a18a5ac841a164e3437f806 100644 (file)
@@ -47,7 +47,7 @@ void Select3D_SensitiveSet::SetDefaultBVHBuilder (const Handle(Select3D_BVHBuild
 // function : Select3D_SensitiveSet
 // purpose  : Creates new empty sensitive set and its content
 //=======================================================================
-Select3D_SensitiveSet::Select3D_SensitiveSet (const Handle(SelectBasics_EntityOwner)& theOwnerId)
+Select3D_SensitiveSet::Select3D_SensitiveSet (const Handle(SelectMgr_EntityOwner)& theOwnerId)
 : Select3D_SensitiveEntity (theOwnerId),
   myDetectedIdx (-1)
 {
index b03a68e859c98484b5d6b3e21e012886607db4a2..029880ab8d9c1feb5d35e17558638270bce82690 100644 (file)
@@ -20,7 +20,6 @@
 #include <Select3D_BndBox3d.hxx>
 #include <Select3D_BVHBuilder3d.hxx>
 #include <Select3D_SensitiveEntity.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 
 //! This class is base class for handling overlap detection of complex sensitive
 //! entities. It provides an interface for building BVH tree for some set of entities.
@@ -44,7 +43,7 @@ public:
 public:
 
   //! Creates new empty sensitive set and its content
-  Standard_EXPORT Select3D_SensitiveSet (const Handle(SelectBasics_EntityOwner)& theOwnerId);
+  Standard_EXPORT Select3D_SensitiveSet (const Handle(SelectMgr_EntityOwner)& theOwnerId);
 
 public:
 
index fc246755e1f7184f7a439a62cc141aae6b234711..e5828bc9bc5377af2a54d8382cba4a3542a58941 100644 (file)
@@ -26,7 +26,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveTriangle,Select3D_SensitiveEntity)
 // Function: Creation
 // Purpose :
 //==================================================
-Select3D_SensitiveTriangle::Select3D_SensitiveTriangle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveTriangle::Select3D_SensitiveTriangle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                         const gp_Pnt& thePnt0,
                                                         const gp_Pnt& thePnt1,
                                                         const gp_Pnt& thePnt2,
index f066cb4adf186b5a09db7e66b375d4c4b52ecfda..a9e04da0302ba2719a33efc8eb4f21b54fdc09d5 100644 (file)
@@ -34,7 +34,7 @@ public:
 
   //! Constructs a sensitive triangle object defined by the
   //! owner theOwnerId, the points P1, P2, P3, and the type of sensitivity Sensitivity.
-  Standard_EXPORT Select3D_SensitiveTriangle (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveTriangle (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                               const gp_Pnt& thePnt0,
                                               const gp_Pnt& thePnt1,
                                               const gp_Pnt& thePnt2,
index c5839501020689d6dbbd6e2c7d08fe7f376218a0..859019a73935d0c4f872818db6947bd02b611955 100644 (file)
@@ -53,7 +53,7 @@ namespace
 //function : Select3D_SensitiveTriangulation
 //purpose  :
 //=======================================================================
-Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                                   const Handle(Poly_Triangulation)& theTrg,
                                                                   const TopLoc_Location& theInitLoc,
                                                                   const Standard_Boolean theIsInterior)
@@ -140,7 +140,7 @@ Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(S
 //function : Select3D_SensitiveTriangulation
 //purpose  :
 //=======================================================================
-Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+Select3D_SensitiveTriangulation::Select3D_SensitiveTriangulation (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                                   const Handle(Poly_Triangulation)& theTrg,
                                                                   const TopLoc_Location& theInitLoc,
                                                                   const Handle(TColStd_HArray1OfInteger)& theFreeEdges,
index 2317c240bec5815cc1e9c20058cdb17ace7b4461..2d384f344d5c39e8ac524eab29c68a114e9e1b70 100644 (file)
@@ -36,7 +36,7 @@ public:
   //! Constructs a sensitive triangulation object defined by
   //! the owner theOwnerId, the triangulation theTrg,
   //! the location theInitLoc, and the flag theIsInterior.
-  Standard_EXPORT Select3D_SensitiveTriangulation (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveTriangulation (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                    const Handle(Poly_Triangulation)& theTrg,
                                                    const TopLoc_Location& theInitLoc,
                                                    const Standard_Boolean theIsInterior = Standard_True);
@@ -47,7 +47,7 @@ public:
   //! theFreeEdges, the center of gravity theCOG, and the flag theIsInterior.
   //! As free edges and the center of gravity do not have
   //! to be computed later, this syntax reduces computation time.
-  Standard_EXPORT Select3D_SensitiveTriangulation (const Handle(SelectBasics_EntityOwner)& theOwnerId,
+  Standard_EXPORT Select3D_SensitiveTriangulation (const Handle(SelectMgr_EntityOwner)& theOwnerId,
                                                    const Handle(Poly_Triangulation)& theTrg,
                                                    const TopLoc_Location& theInitLoc,
                                                    const Handle(TColStd_HArray1OfInteger)& theFreeEdges,
index 8185e4e167d7b6254380be2140039b642d6798be..6f0128b3e5434b880a6d080e94cbe01f6944e166 100644 (file)
@@ -28,7 +28,7 @@ IMPLEMENT_STANDARD_RTTIEXT(Select3D_SensitiveWire,Select3D_SensitiveSet)
 // Function : Select3D_SensitiveWire
 // Purpose  :
 //=====================================================
-Select3D_SensitiveWire::Select3D_SensitiveWire (const Handle(SelectBasics_EntityOwner)& theOwnerId)
+Select3D_SensitiveWire::Select3D_SensitiveWire (const Handle(SelectMgr_EntityOwner)& theOwnerId)
 : Select3D_SensitiveSet (theOwnerId),
   myCenter (0.0, 0.0, 0.0)
 {}
@@ -188,7 +188,7 @@ Handle(Select3D_SensitiveEntity) Select3D_SensitiveWire::GetLastDetected() const
 //function : Set
 //purpose  :
 //=======================================================================
-void Select3D_SensitiveWire::Set (const Handle(SelectBasics_EntityOwner)& theOwnerId)
+void Select3D_SensitiveWire::Set (const Handle(SelectMgr_EntityOwner)& theOwnerId)
 {
   Select3D_SensitiveEntity::Set (theOwnerId);
 
index a32f4752dddea2bd396d9558c3071423989fe3bd..3b4f76e95a4cc3e03689a31180f5407de54e2700 100644 (file)
@@ -27,7 +27,7 @@ public:
 
   //! Constructs a sensitive wire object defined by the
   //! owner theOwnerId
-  Standard_EXPORT Select3D_SensitiveWire (const Handle(SelectBasics_EntityOwner)& theOwnerId);
+  Standard_EXPORT Select3D_SensitiveWire (const Handle(SelectMgr_EntityOwner)& theOwnerId);
 
   //! Adds the sensitive entity theSensitive to this framework.
   Standard_EXPORT void Add (const Handle(Select3D_SensitiveEntity)& theSensitive);
@@ -41,7 +41,7 @@ public:
   Standard_EXPORT const NCollection_Vector<Handle(Select3D_SensitiveEntity)>& GetEdges();
 
   //! Sets the owner for all entities in wire
-  Standard_EXPORT void Set (const Handle(SelectBasics_EntityOwner)& theOwnerId) Standard_OVERRIDE;
+  Standard_EXPORT virtual void Set (const Handle(SelectMgr_EntityOwner)& theOwnerId) Standard_OVERRIDE;
 
   Standard_EXPORT Handle(Select3D_SensitiveEntity) GetLastDetected() const;
 
index 246d485a0f5d4e322a11c6c22c77e57be683a7ca..169e58d3ca15b4ef75874094c7bbba741b8e1b27 100644 (file)
@@ -1,8 +1,5 @@
-SelectBasics.cxx
 SelectBasics.hxx
-SelectBasics_EntityOwner.cxx
 SelectBasics_EntityOwner.hxx
 SelectBasics_PickResult.hxx
 SelectBasics_SelectingVolumeManager.hxx
-SelectBasics_SensitiveEntity.cxx
 SelectBasics_SensitiveEntity.hxx
diff --git a/src/SelectBasics/SelectBasics.cxx b/src/SelectBasics/SelectBasics.cxx
deleted file mode 100644 (file)
index 8877be8..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-// Created on: 1995-02-23
-// Created by: Mister rmi
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-
-#include <SelectBasics.hxx>
-
-Standard_Integer SelectBasics::MaxOwnerPriority()
-{return 9;}
-
-Standard_Integer SelectBasics::MinOwnerPriority()
-{return 0;}
-
index 34390c813a0c94c23e53f57ac50f3064dc4d2673..7b1037f2de7fcc0eadb51039942c0ae8075243fe 100644 (file)
@@ -26,14 +26,10 @@ class SelectBasics
 {
 public:
 
-  DEFINE_STANDARD_ALLOC
-
-  //! Structure to provide all-in-one result of selection of sensitive
-  //! for "Matches" method of SelectBasics_SensitiveEntity.
-  Standard_EXPORT static Standard_Integer MaxOwnerPriority();
-  
-  Standard_EXPORT static Standard_Integer MinOwnerPriority();
+  //! Structure to provide all-in-one result of selection of sensitive for "Matches" method of Select3D_SensitiveEntity.
+  static Standard_Integer MaxOwnerPriority() { return 9; }
 
+  static Standard_Integer MinOwnerPriority() { return 0; }
 };
 
 #endif // _SelectBasics_HeaderFile
diff --git a/src/SelectBasics/SelectBasics_EntityOwner.cxx b/src/SelectBasics/SelectBasics_EntityOwner.cxx
deleted file mode 100644 (file)
index 5580543..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Created on: 1995-02-09
-// Created by: Mister rmi
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <SelectBasics_EntityOwner.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(SelectBasics_EntityOwner, Standard_Transient)
-
-//========================================
-// Function : SelectBasics_EntityOwner
-// Purpose  :
-//========================================
-SelectBasics_EntityOwner::SelectBasics_EntityOwner (const Standard_Integer thePriority)
-: mypriority (thePriority)
-{
-  //
-}
-
-//========================================
-// Function : SelectBasics_EntityOwner
-// Purpose  :
-//========================================
-SelectBasics_EntityOwner::SelectBasics_EntityOwner()
-: mypriority (0)
-{
-  //
-}
index a03aa131d35cb372937b981858db5b3b15703c28..b542e309b7b339f3a1730b8e1b60c6db8fc4ec08 100644 (file)
 #ifndef _SelectBasics_EntityOwner_HeaderFile
 #define _SelectBasics_EntityOwner_HeaderFile
 
-#include <Standard.hxx>
-#include <Standard_Transient.hxx>
-#include <Standard_Type.hxx>
-#include <TopLoc_Location.hxx>
-
-//! defines an abstract owner of sensitive primitives.
-//! Owners are typically used to establish a connection
-//! between sensitive entities and high-level objects (e.g. presentations).
-//!
-//! Priority : It's possible to give a priority:
-//! the scale : [0-9] ; the default priority is 0
-//! it allows the predominance of one selected object upon
-//! another one if many objects are selected at the same time
-//!
-//! example : Selection of shapes : the owners are
-//! selectable objects (presentations)
-//!
-//! a user can give vertex priority [3], edges [2] faces [1] shape [0],
-//! so that if during selection one vertex one edge and one face are
-//! simultaneously detected, the vertex will only be hilighted.
-class SelectBasics_EntityOwner : public Standard_Transient
-{
-  DEFINE_STANDARD_RTTIEXT(SelectBasics_EntityOwner, Standard_Transient)
-public:
-
-  //! sets the selectable priority of the owner
-  void SetPriority (const Standard_Integer thePriority) { mypriority = thePriority; }
-
-  Standard_Integer Priority() const { return mypriority; }
-
-  Standard_EXPORT virtual Standard_Boolean HasLocation() const = 0;
-
-  Standard_EXPORT virtual void SetLocation (const TopLoc_Location& aLoc) = 0;
-
-  Standard_EXPORT virtual void ResetLocation() = 0;
-
-  Standard_EXPORT virtual TopLoc_Location Location() const = 0;
-
-public:
-
-  //! sets the selectable priority of the owner
-  void Set (const Standard_Integer thePriority) { SetPriority (thePriority); }
-
-protected:
-
-  Standard_EXPORT SelectBasics_EntityOwner (const Standard_Integer thePriority);
-
-  Standard_EXPORT SelectBasics_EntityOwner();
-
-protected:
-
-  Standard_Integer mypriority;
-
-};
-
-DEFINE_STANDARD_HANDLE(SelectBasics_EntityOwner, Standard_Transient)
+#include <SelectMgr_EntityOwner.hxx>
 
 #endif // _SelectBasics_EntityOwner_HeaderFile
index 03bcc16a49b2469246feba34ee205536ea51fb5f..56a119bd223e00f9a62f85c38aa09a2840ff9da2 100644 (file)
@@ -16,8 +16,7 @@
 #ifndef _SelectBasics_PickResult_HeaderFile
 #define _SelectBasics_PickResult_HeaderFile
 
-#include <Standard.hxx>
-#include <NCollection_Vec4.hxx>
+#include <gp_Pnt.hxx>
 
 //! This structure provides unified access to the results of Matches() method in all sensitive entities,
 //! so that it defines a Depth (distance to the entity along picking ray) and a closest Point on entity.
diff --git a/src/SelectBasics/SelectBasics_SensitiveEntity.cxx b/src/SelectBasics/SelectBasics_SensitiveEntity.cxx
deleted file mode 100644 (file)
index 99fc2a4..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Created on: 1995-01-23
-// Created by: Mister rmi
-// Copyright (c) 1995-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <SelectBasics_SensitiveEntity.hxx>
-
-#include <SelectBasics_EntityOwner.hxx>
-#include <TColStd_HArray1OfBoolean.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(SelectBasics_SensitiveEntity, Standard_Transient)
-
-//=======================================================================
-// function : SelectBasics_SensitiveEntity
-// purpose  : Creates new empty sensitive entity instance
-//=======================================================================
-SelectBasics_SensitiveEntity::SelectBasics_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId)
-: myOwnerId (theOwnerId),
-  mySFactor (2) {}
-
-//=======================================================================
-// function : Set
-// purpose  : Sets owner of the entity
-//=======================================================================
-void SelectBasics_SensitiveEntity::Set (const Handle(SelectBasics_EntityOwner)& theOwnerId)
-{
-  myOwnerId = theOwnerId;
-}
index 70a79269f347913f753630c47b1ffeafbaf586ee..dd8bf99c5a7075b9d1f9f31419acc99608cd75a1 100644 (file)
 #ifndef _SelectBasics_SensitiveEntity_HeaderFile
 #define _SelectBasics_SensitiveEntity_HeaderFile
 
-#include <gp_GTrsf.hxx>
-#include <gp_Trsf.hxx>
-#include <Standard_Transient.hxx>
-#include <SelectBasics_SelectingVolumeManager.hxx>
-#include <SelectBasics_PickResult.hxx>
-#include <Select3D_BndBox3d.hxx>
-
-class SelectBasics_EntityOwner;
-
-//! root class; the inheriting classes will be able to give
-//! sensitive Areas for the dynamic selection algorithms
-class SelectBasics_SensitiveEntity : public Standard_Transient
-{
-  DEFINE_STANDARD_RTTIEXT(SelectBasics_SensitiveEntity, Standard_Transient)
-public:
-
-  //! Sets owner of the entity
-  Standard_EXPORT virtual void Set (const Handle(SelectBasics_EntityOwner)& theOwnerId);
-
-  //! Returns pointer to owner of the entity
-  const Handle(SelectBasics_EntityOwner)& OwnerId() const { return myOwnerId; }
-
-  //! Checks whether the sensitive entity is overlapped by
-  //! current selecting volume
-  virtual Standard_Boolean Matches (SelectBasics_SelectingVolumeManager& theMgr, SelectBasics_PickResult& thePickResult) = 0;
-
-  //! allows a better sensitivity for
-  //! a specific entity in selection algorithms
-  //! useful for small sized entities.
-  Standard_Integer SensitivityFactor() const { return mySFactor; }
-
-  //! Allows to manage sensitivity of a particular sensitive entity
-  void SetSensitivityFactor (const Standard_Integer theNewSens)
-  {
-    Standard_ASSERT_RAISE (theNewSens > 0, "Error! Selection sensitivity have positive value.");
-    mySFactor = theNewSens;
-  }
-
-  //! Returns the number of sub-entities or elements in
-  //! sensitive entity. Is used to determine if entity is
-  //! complex and needs to pre-build BVH at the creation of
-  //! sensitive entity step or is light-weighted so the tree
-  //! can be build on demand with unnoticeable delay
-  virtual Standard_Integer NbSubElements() = 0;
-
-  //! Returns bounding box of sensitive entity
-  virtual Select3D_BndBox3d BoundingBox() = 0;
-
-  //! Builds BVH tree for sensitive if it is needed
-  virtual void BVH() = 0;
-
-  //! Clears up all the resources and memory allocated
-  virtual void Clear() = 0;
-
-  //! Returns true if the shape corresponding to the entity has init location
-  virtual Standard_Boolean HasInitLocation() const = 0;
-
-  //! Returns inversed location transformation matrix if the shape corresponding
-  //! to this entity has init location set. Otherwise, returns identity matrix.
-  virtual gp_GTrsf InvInitLocation() const = 0;
-
-protected:
-
-  Standard_EXPORT SelectBasics_SensitiveEntity (const Handle(SelectBasics_EntityOwner)& theOwnerId);
-
-protected:
-
-  Handle(SelectBasics_EntityOwner) myOwnerId;
-  Standard_Integer mySFactor;
-
-};
-
-DEFINE_STANDARD_HANDLE(SelectBasics_SensitiveEntity, Standard_Transient)
+#include <Select3D_SensitiveEntity.hxx>
 
 #endif // _SelectBasics_SensitiveEntity_HeaderFile
index ca0e6746bcdcaf5673600c13789e3301c8a1837b..d537c01dd67f9aa3935d67bc53b344a3759eea60 100644 (file)
 
 #include <SelectMgr_EntityOwner.hxx>
 
-#include <PrsMgr_PresentationManager.hxx>
-#include <Standard_NoSuchObject.hxx>
-#include <Standard_Type.hxx>
-#include <TopLoc_Location.hxx>
-
-IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_EntityOwner,SelectBasics_EntityOwner)
+IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_EntityOwner, Standard_Transient)
 
 //==================================================
 // Function: SelectMgr_EntityOwner
 // Purpose :
 //==================================================
 SelectMgr_EntityOwner::SelectMgr_EntityOwner (const Standard_Integer thePriority)
-: SelectBasics_EntityOwner (thePriority),
-  mySelectable (NULL),
+: mySelectable (NULL),
+  mypriority (thePriority),
   myIsSelected (Standard_False),
   myFromDecomposition (Standard_False)
 {
@@ -42,8 +37,8 @@ SelectMgr_EntityOwner::SelectMgr_EntityOwner (const Standard_Integer thePriority
 //==================================================
 SelectMgr_EntityOwner::SelectMgr_EntityOwner (const Handle(SelectMgr_SelectableObject)& theSelObj,
                                               const Standard_Integer thePriority)
-: SelectBasics_EntityOwner (thePriority),
-  mySelectable (theSelObj.operator->()),
+: mySelectable (theSelObj.get()),
+  mypriority (thePriority),
   myIsSelected (Standard_False),
   myFromDecomposition (Standard_False)
 {
@@ -56,8 +51,8 @@ SelectMgr_EntityOwner::SelectMgr_EntityOwner (const Handle(SelectMgr_SelectableO
 //==================================================
 SelectMgr_EntityOwner::SelectMgr_EntityOwner (const Handle(SelectMgr_EntityOwner)& theOwner,
                                               const Standard_Integer thePriority)
-: SelectBasics_EntityOwner (thePriority),
-  mySelectable (theOwner->mySelectable),
+: mySelectable (theOwner->mySelectable),
+  mypriority (thePriority),
   myIsSelected (Standard_False),
   myFromDecomposition (Standard_False)
 {
@@ -65,39 +60,14 @@ SelectMgr_EntityOwner::SelectMgr_EntityOwner (const Handle(SelectMgr_EntityOwner
 }
 
 //=======================================================================
-//function : SetSelectable
-//purpose  :
-//=======================================================================
-void SelectMgr_EntityOwner::SetSelectable (const Handle(SelectMgr_SelectableObject)& theSelObj)
-{
-  mySelectable = theSelObj.operator->();
-}
-
-//=======================================================================
-//function : Selectable
-//purpose  :
-//=======================================================================
-Handle(SelectMgr_SelectableObject) SelectMgr_EntityOwner::Selectable() const
-{  
-  return mySelectable;
-}
-
-//=======================================================================
-//function : IsHilighted
+//function : HilightWithColor
 //purpose  :
 //=======================================================================
-Standard_Boolean SelectMgr_EntityOwner::IsHilighted (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
-                                                     const Standard_Integer theMode) const
-{
-  return mySelectable != NULL
-      && thePrsMgr->IsHighlighted (mySelectable, theMode);
-}
-
-void SelectMgr_EntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
+void SelectMgr_EntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePM,
                                               const Handle(Prs3d_Drawer)& theStyle,
                                               const Standard_Integer theMode)
 {
-  if (!HasSelectable())
+  if (mySelectable == NULL)
   {
     return;
   }
@@ -112,74 +82,3 @@ void SelectMgr_EntityOwner::HilightWithColor (const Handle(PrsMgr_PresentationMa
     mySelectable->HilightOwnerWithColor (thePM, theStyle, this);
   }
 }
-
-void SelectMgr_EntityOwner::Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, const Standard_Integer )
-{
-  if (HasSelectable())
-  {
-    thePrsMgr->Unhighlight (mySelectable);
-  }
-}
-
-void SelectMgr_EntityOwner::Clear(const Handle(PrsMgr_PresentationManager)&,
-                                 const Standard_Integer)
-{
-// nothing done on the selectable here...
-}
-
-//=======================================================================
-//function : about Transformation
-//purpose  : 
-//=======================================================================
-
-Standard_Boolean SelectMgr_EntityOwner::HasLocation() const
-{
-  return (HasSelectable() && mySelectable->HasTransformation());
-}
-
-void SelectMgr_EntityOwner::SetLocation(const TopLoc_Location&)
-{
-}
-
-TopLoc_Location SelectMgr_EntityOwner::Location() const
-{
-  return !HasLocation() ? TopLoc_Location() : TopLoc_Location(mySelectable->Transformation());
-}
-
-void SelectMgr_EntityOwner::ResetLocation()
-{
-}
-
-Standard_Boolean SelectMgr_EntityOwner::IsAutoHilight () const
-{
-  return mySelectable == NULL
-      || mySelectable->IsAutoHilight();
-}
-
-Standard_Boolean SelectMgr_EntityOwner::IsForcedHilight () const
-{
-  return Standard_False;
-}
-
-//=======================================================================
-//function : SetZLayer
-//purpose  :
-//=======================================================================
-void SelectMgr_EntityOwner::SetZLayer (const Standard_Integer )
-{
-  //
-}
-
-//=======================================================================
-//function : UpdateHighlightTrsf
-//purpose  :
-//=======================================================================
-void SelectMgr_EntityOwner::UpdateHighlightTrsf (const Handle(V3d_Viewer)& theViewer,
-                                                 const Handle(PrsMgr_PresentationManager3d)& theManager,
-                                                 const Standard_Integer theDispMode)
-{
-  if (mySelectable == NULL)
-    return;
-
-  theManager->UpdateHighlightTrsf (theViewer, mySelectable, theDispMode);
-}
index f52150d6c8ffcf20a70c977f9458b8c6f6d1894e..eec5e128f1ab5ec026ec4fe5712fdedee5450bf8 100644 (file)
 #ifndef _SelectMgr_EntityOwner_HeaderFile
 #define _SelectMgr_EntityOwner_HeaderFile
 
-#include <Graphic3d_ZLayerId.hxx>
-#include <Prs3d_Drawer.hxx>
-#include <PrsMgr_PresentationManager3d.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <PrsMgr_PresentationManager.hxx>
 #include <SelectMgr_SelectableObject.hxx>
-#include <Standard.hxx>
-#include <Standard_Boolean.hxx>
-#include <Standard_Integer.hxx>
-#include <Standard_Type.hxx>
-#include <Quantity_NameOfColor.hxx>
+#include <TopLoc_Location.hxx>
 
 class V3d_Viewer;
 
 //! A framework to define classes of owners of sensitive primitives.
-//! The owner is the link between application and
-//! selection data structures.
-//! For the application to make its own objects selectable,
-//! it must define owner classes inheriting this framework.
-class SelectMgr_EntityOwner : public SelectBasics_EntityOwner
+//! The owner is the link between application and selection data structures.
+//! For the application to make its own objects selectable, it must define owner classes inheriting this framework.
+class SelectMgr_EntityOwner : public Standard_Transient
 {
-  DEFINE_STANDARD_RTTIEXT(SelectMgr_EntityOwner, SelectBasics_EntityOwner)
+  DEFINE_STANDARD_RTTIEXT(SelectMgr_EntityOwner, Standard_Transient)
 public:
 
   //! Initializes the selection priority aPriority.
@@ -50,25 +41,37 @@ public:
   //! Constructs a framework from existing one
   //! anSO being attributed the selection priority aPriority.
   Standard_EXPORT SelectMgr_EntityOwner(const Handle(SelectMgr_EntityOwner)& theOwner, const Standard_Integer aPriority = 0);
-  
+
+  //! Return selection priority (within range [0-9]) for results with the same depth; 0 by default.
+  //! Example - selection of shapes:
+  //! the owners are selectable objects (presentations) a user can give vertex priority [3], edges [2] faces [1] shape [0],
+  //! so that if during selection one vertex one edge and one face are simultaneously detected, the vertex will only be hilighted.
+  Standard_Integer Priority() const { return mypriority; }
+
+  //! Sets the selectable priority of the owner within range [0-9].
+  void SetPriority (Standard_Integer thePriority) { mypriority = thePriority; }
+
   //! Returns true if there is a selectable object to serve as an owner.
   Standard_Boolean HasSelectable() const { return mySelectable != NULL; }
 
   //! Returns a selectable object detected in the working context.
-  Standard_EXPORT virtual Handle(SelectMgr_SelectableObject) Selectable() const;
+  virtual Handle(SelectMgr_SelectableObject) Selectable() const { return mySelectable; }
 
   //! Sets the selectable object.
-  Standard_EXPORT virtual void SetSelectable (const Handle(SelectMgr_SelectableObject)& theSelObj);
+  virtual void SetSelectable (const Handle(SelectMgr_SelectableObject)& theSelObj) { mySelectable = theSelObj.get(); }
 
-  //! Returns true if the presentation manager aPM
-  //! highlights selections corresponding to the selection mode aMode.
-  Standard_EXPORT virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0) const;
+  //! Returns true if the presentation manager highlights selections corresponding to the selection mode.
+  virtual Standard_Boolean IsHilighted (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
+                                        const Standard_Integer theMode = 0) const
+  {
+    return mySelectable != NULL
+        && thePrsMgr->IsHighlighted (mySelectable, theMode);
+  }
   
-  //! Highlights selectable object's presentation with mode theMode in presentation manager
-  //! with given highlight style. Also a check for auto-highlight is performed - if
-  //! selectable object manages highlighting on its own, execution will be passed to
-  //! SelectMgr_SelectableObject::HilightOwnerWithColor method
-  Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager3d)& thePM,
+  //! Highlights selectable object's presentation with display mode in presentation manager with given highlight style.
+  //! Also a check for auto-highlight is performed - if selectable object manages highlighting on its own,
+  //! execution will be passed to SelectMgr_SelectableObject::HilightOwnerWithColor method.
+  Standard_EXPORT virtual void HilightWithColor (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
                                                  const Handle(Prs3d_Drawer)& theStyle,
                                                  const Standard_Integer theMode = 0);
 
@@ -76,49 +79,84 @@ public:
   //! This object could be the owner of a sensitive primitive.
   //! @param thePrsMgr presentation manager
   //! @param theMode   obsolete argument for compatibility, should be ignored by implementations
-  Standard_EXPORT virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr, const Standard_Integer theMode = 0);
+  virtual void Unhilight (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
+                          const Standard_Integer theMode = 0)
+  {
+    (void )theMode;
+    if (mySelectable != NULL)
+    {
+      thePrsMgr->Unhighlight (mySelectable);
+    }
+  }
 
   //! Clears the owners matching the value of the selection
   //! mode aMode from the presentation manager object aPM.
-  Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0);
-  
-  Standard_EXPORT virtual Standard_Boolean HasLocation() const Standard_OVERRIDE;
-  
-  Standard_EXPORT virtual void SetLocation (const TopLoc_Location& aLoc) Standard_OVERRIDE;
-  
-  Standard_EXPORT virtual void ResetLocation() Standard_OVERRIDE;
-  
-  Standard_EXPORT virtual TopLoc_Location Location() const Standard_OVERRIDE;
-  
+  virtual void Clear (const Handle(PrsMgr_PresentationManager)& thePrsMgr,
+                      const Standard_Integer theMode = 0) /// TODO
+  {
+    (void )thePrsMgr;
+    (void )theMode;
+  }
+
+  //! Returns TRUE if selectable has transformation.
+  virtual Standard_Boolean HasLocation() const { return mySelectable != NULL && mySelectable->HasTransformation(); }
+
+  //! Returns transformation of selectable.
+  virtual TopLoc_Location Location() const
+  {
+    return mySelectable != NULL && mySelectable->HasTransformation()
+         ? TopLoc_Location(mySelectable->Transformation())
+         : TopLoc_Location();
+  }
+
+  //! Change owner location (callback for handling change of location of selectable object).
+  virtual void SetLocation (const TopLoc_Location& theLocation)
+  {
+    (void )theLocation;
+  }
+
+  //! @return Standard_True if the owner is selected.
+  Standard_Boolean IsSelected() const { return myIsSelected; }
+
   //! Set the state of the owner.
   //! @param theIsSelected [in] shows if owner is selected.
   void SetSelected (const Standard_Boolean theIsSelected) { myIsSelected = theIsSelected; }
 
-  //! @return Standard_True if the owner is selected.
-  Standard_Boolean IsSelected() const { return myIsSelected; }
+  //! Returns selection state.
+  Standard_DEPRECATED ("Deprecated method - IsSelected() should be used instead")
+  Standard_Integer State() const { return myIsSelected ? 1 : 0; }
 
   //! Set the state of the owner.
   //! The method is deprecated. Use SetSelected() instead.
   void State (const Standard_Integer theStatus) { myIsSelected = (theStatus == 1); }
 
-  Standard_Integer State() const { return myIsSelected ? 1 : 0; }
+  //! if owner is not auto hilighted, for group contains many such owners will be called one method HilightSelected of SelectableObject
+  virtual Standard_Boolean IsAutoHilight() const
+  {
+    return mySelectable == NULL
+        || mySelectable->IsAutoHilight();
+  }
 
-  //! if owner is not auto hilighted, for group contains many such owners
-  //! will be called one method HilightSelected of SelectableObject
-  Standard_EXPORT virtual Standard_Boolean IsAutoHilight() const;
-  
-  //! if this method returns TRUE the owner will allways call method
-  //! Hilight for SelectableObject when the owner is detected. By default
-  //! it always return FALSE.
-  Standard_EXPORT virtual Standard_Boolean IsForcedHilight() const;
+  //! if this method returns TRUE the owner will always call method Hilight for SelectableObject when the owner is detected.
+  //! By default it always return FALSE.
+  virtual Standard_Boolean IsForcedHilight() const { return Standard_False; }
   
   //! Set Z layer ID and update all presentations.
-  Standard_EXPORT virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId);
+  virtual void SetZLayer (const Graphic3d_ZLayerId theLayerId)
+  {
+    (void )theLayerId;
+  }
 
   //! Implements immediate application of location transformation of parent object to dynamic highlight structure
-  Standard_EXPORT virtual void UpdateHighlightTrsf (const Handle(V3d_Viewer)& theViewer,
-                                                    const Handle(PrsMgr_PresentationManager3d)& theManager,
-                                                    const Standard_Integer theDispMode);
+  virtual void UpdateHighlightTrsf (const Handle(V3d_Viewer)& theViewer,
+                                    const Handle(PrsMgr_PresentationManager)& theManager,
+                                    const Standard_Integer theDispMode)
+  {
+    if (mySelectable != NULL)
+    {
+      theManager->UpdateHighlightTrsf (theViewer, mySelectable, theDispMode);
+    }
+  }
 
   //! Returns true if pointer to selectable object of this owner is equal to the given one
   Standard_Boolean IsSameSelectable (const Handle(SelectMgr_SelectableObject)& theOther) const
@@ -135,16 +173,25 @@ public:
 public:
 
   //! Sets the selectable object.
+  Standard_DEPRECATED ("Deprecated method - SetSelectable() should be used instead")
   void Set (const Handle(SelectMgr_SelectableObject)& theSelObj) { SetSelectable (theSelObj); }
 
+  //! sets the selectable priority of the owner
+  Standard_DEPRECATED ("Deprecated method - SetPriority() should be used instead")
+  void Set (const Standard_Integer thePriority) { SetPriority (thePriority); }
+
 protected:
 
   SelectMgr_SelectableObject* mySelectable;        //!< raw pointer to selectable object
+  Standard_Integer            mypriority;          //!< selection priority (for result with the same depth)
   Standard_Boolean            myIsSelected;        //!< flag indicating selected state
   Standard_Boolean            myFromDecomposition; //!< flag indicating this owner points to a part of object (TRUE) or to entire object (FALSE)
 
 };
 
-DEFINE_STANDARD_HANDLE(SelectMgr_EntityOwner, SelectBasics_EntityOwner)
+DEFINE_STANDARD_HANDLE(SelectMgr_EntityOwner, Standard_Transient)
+
+// for porting old code
+typedef SelectMgr_EntityOwner SelectBasics_EntityOwner;
 
 #endif // _SelectMgr_EntityOwner_HeaderFile
index e98e4843f95b5097829604ac312f73bad436cb34..fbb8a344af167004dbf57ff11ae68f92b9ca78ef 100644 (file)
 #ifndef SelectMgr_IndexedDataMapOfOwnerCriterion_HeaderFile
 #define SelectMgr_IndexedDataMapOfOwnerCriterion_HeaderFile
 
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_SortCriterion.hxx>
 #include <TColStd_MapTransientHasher.hxx>
 #include <NCollection_IndexedDataMap.hxx>
 
-typedef NCollection_IndexedDataMap<Handle(SelectBasics_EntityOwner),SelectMgr_SortCriterion,TColStd_MapTransientHasher> SelectMgr_IndexedDataMapOfOwnerCriterion;
-
+typedef NCollection_IndexedDataMap<Handle(SelectMgr_EntityOwner), SelectMgr_SortCriterion, TColStd_MapTransientHasher> SelectMgr_IndexedDataMapOfOwnerCriterion;
 
 #endif
index 9fc70b718c1ec81c7b6bad139d6cfb61bd6aa03e..4980ecf7b6b73232c40cb429e6d5395e33f35ea1 100644 (file)
@@ -25,7 +25,6 @@
 #include <Prs3d_Presentation.hxx>
 #include <PrsMgr_PresentationManager.hxx>
 #include <Select3D_SensitiveEntity.hxx>
-#include <SelectBasics_EntityOwner.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_IndexedMapOfOwner.hxx>
 #include <SelectMgr_Selection.hxx>
@@ -270,12 +269,11 @@ void SelectMgr_SelectableObject::UpdateTransformations (const Handle(SelectMgr_S
   const TopLoc_Location aSelfLocation (Transformation());
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    if (Handle(Select3D_SensitiveEntity) aSensEntity = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
+    if (const Handle(Select3D_SensitiveEntity)& aSensEntity = aSelEntIter.Value()->BaseSensitive())
     {
-      const Handle(SelectBasics_EntityOwner)& aEOwner = aSensEntity->OwnerId();
-      if (Handle(SelectMgr_EntityOwner) aMgrEO = Handle(SelectMgr_EntityOwner)::DownCast (aEOwner))
+      if (const Handle(SelectMgr_EntityOwner)& aEOwner = aSensEntity->OwnerId())
       {
-        aMgrEO->SetLocation (aSelfLocation);
+        aEOwner->SetLocation (aSelfLocation);
       }
     }
   }
@@ -405,9 +403,9 @@ void SelectMgr_SelectableObject::SetZLayer (const Graphic3d_ZLayerId theLayerId)
     const Handle(SelectMgr_Selection)& aSel = aSelIter.Value();
     for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
     {
-      if (Handle(Select3D_SensitiveEntity) aEntity = Handle(Select3D_SensitiveEntity)::DownCast (aSelEntIter.Value()->BaseSensitive()))
+      if (const Handle(Select3D_SensitiveEntity)& aEntity = aSelEntIter.Value()->BaseSensitive())
       {
-        if (Handle(SelectMgr_EntityOwner) aOwner = Handle(SelectMgr_EntityOwner)::DownCast (aEntity->OwnerId()))
+        if (const Handle(SelectMgr_EntityOwner)& aOwner = aEntity->OwnerId())
         {
           aOwner->SetZLayer (theLayerId);
         }
@@ -514,7 +512,7 @@ Bnd_Box SelectMgr_SelectableObject::BndBoxOfSelected (const Handle(SelectMgr_Ind
 
     for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (aSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
     {
-      const Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (aSelEntIter.Value()->BaseSensitive()->OwnerId());
+      const Handle(SelectMgr_EntityOwner)& anOwner = aSelEntIter.Value()->BaseSensitive()->OwnerId();
       if (theOwners->Contains (anOwner))
       {
         Select3D_BndBox3d aBox = aSelEntIter.Value()->BaseSensitive()->BoundingBox();
@@ -537,7 +535,7 @@ Handle(SelectMgr_EntityOwner) SelectMgr_SelectableObject::GlobalSelOwner() const
   if (!aGlobalSel.IsNull()
    && !aGlobalSel->IsEmpty())
   {
-    return Handle(SelectMgr_EntityOwner)::DownCast (aGlobalSel->Entities().First()->BaseSensitive()->OwnerId());
+    return aGlobalSel->Entities().First()->BaseSensitive()->OwnerId();
   }
   return THE_NULL_ENTITYOWNER;
 }
index 1c757abc64780e0779ec503f063dffcd6d2f3b33..b42881df730cacab862407868f44a43a9604d0ff 100644 (file)
@@ -14,9 +14,9 @@
 // Alternatively, this file may be used under the terms of Open CASCADE
 // commercial license or contractual agreement.
 
-#include <SelectBasics_EntityOwner.hxx>
-
 #include <SelectMgr_Selection.hxx>
+
+#include <SelectMgr_EntityOwner.hxx>
 #include <Standard_NullObject.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_Selection,Standard_Transient)
@@ -57,7 +57,7 @@ void SelectMgr_Selection::Destroy()
 // Function: ADD
 // Purpose :
 //==================================================
-void SelectMgr_Selection::Add (const Handle(SelectBasics_SensitiveEntity)& theSensitive)
+void SelectMgr_Selection::Add (const Handle(Select3D_SensitiveEntity)& theSensitive)
 {
   // if input is null: in debug mode raise exception
   Standard_NullObject_Raise_if (theSensitive.IsNull(), "Null sensitive entity is added to the selection");
index 956d9877bc71b876063e67c1fe1ab6a9d5496fd7..1287306fb04d020f82e9bf35e84c755132a0d149 100644 (file)
@@ -23,7 +23,7 @@
 #include <SelectMgr_TypeOfBVHUpdate.hxx>
 #include <SelectMgr_TypeOfUpdate.hxx>
 
-class SelectBasics_SensitiveEntity;
+class Select3D_SensitiveEntity;
 
 //!  Represents the state of a given selection mode for a
 //! Selectable Object. Contains all the sensitive entities available for this mode.
@@ -75,7 +75,7 @@ public:
 
   //! Adds the sensitive primitive to the list of stored entities in this object.
   //! Raises NullObject if the primitive is a null handle.
-  Standard_EXPORT void Add (const Handle(SelectBasics_SensitiveEntity)& theSensitive);
+  Standard_EXPORT void Add (const Handle(Select3D_SensitiveEntity)& theSensitive);
 
   //! empties the selection from all the stored entities
   Standard_EXPORT void Clear();
index f172df2dd7b243cfabe7d03ff58457081723db99..bad38d0619c77a3a831edd4c0ce750f06cc98945 100644 (file)
@@ -23,7 +23,7 @@ IMPLEMENT_STANDARD_RTTIEXT(SelectMgr_SensitiveEntity,Standard_Transient)
 // purpose  : Creates new inactive for selection object with base entity
 //            theEntity
 //=======================================================================
-SelectMgr_SensitiveEntity::SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity)
+SelectMgr_SensitiveEntity::SelectMgr_SensitiveEntity (const Handle(Select3D_SensitiveEntity)& theEntity)
 : mySensitive (theEntity),
   myIsActiveForSelection (Standard_False)
 {
index ad6fed23998a83a69b4cfdb823278259715d6f2d..02e084f857ffb3c4440528253e5374c1abb28c61 100644 (file)
@@ -27,7 +27,7 @@ class SelectMgr_SensitiveEntity : public Standard_Transient
 public:
 
   //! Creates new inactive for selection object with base entity theEntity
-  Standard_EXPORT SelectMgr_SensitiveEntity (const Handle(SelectBasics_SensitiveEntity)& theEntity);
+  Standard_EXPORT SelectMgr_SensitiveEntity (const Handle(Select3D_SensitiveEntity)& theEntity);
 
   ~SelectMgr_SensitiveEntity() {}
 
@@ -35,7 +35,7 @@ public:
   Standard_EXPORT void Clear();
 
   //! Returns related instance of SelectBasics class
-  const Handle(SelectBasics_SensitiveEntity)& BaseSensitive() const { return mySensitive; }
+  const Handle(Select3D_SensitiveEntity)& BaseSensitive() const { return mySensitive; }
 
   //! Returns true if this entity belongs to the active selection
   //! mode of parent object
@@ -51,8 +51,8 @@ public:
 
 private:
 
-  Handle(SelectBasics_SensitiveEntity) mySensitive;      //!< Related SelectBasics entity
-  mutable Standard_Boolean             myIsActiveForSelection;       //!< Selection activity status
+  Handle(Select3D_SensitiveEntity) mySensitive;      //!< Related SelectBasics entity
+  mutable Standard_Boolean         myIsActiveForSelection;       //!< Selection activity status
 };
 
 DEFINE_STANDARD_HANDLE(SelectMgr_SensitiveEntity, Standard_Transient)
index f66fe87a8c2fb59d1b92d1866a88748ce00fb057..35c433b9a0033b00c7147fad904c88d9b3c31fbb 100644 (file)
@@ -107,9 +107,7 @@ Select3D_BndBox3d SelectMgr_SensitiveEntitySet::Box (const Standard_Integer theI
 Standard_Real SelectMgr_SensitiveEntitySet::Center (const Standard_Integer theIndex,
                                                     const Standard_Integer theAxis) const
 {
-  const Handle(SelectBasics_SensitiveEntity)& aBasicEntity =
-    GetSensitiveById (theIndex)->BaseSensitive();
-  Handle(Select3D_SensitiveEntity) aSensitive (Handle(Select3D_SensitiveEntity)::DownCast (aBasicEntity));
+  const Handle(Select3D_SensitiveEntity)& aSensitive = GetSensitiveById (theIndex)->BaseSensitive();
   const gp_Pnt aCenter = aSensitive->CenterOfGeometry();
   Standard_Real aCenterCoord = 0.0;
   aCenterCoord = theAxis == 0 ? aCenter.X() :
index 3fb98b347b9b0a337d77db7e0f43b43a1fc9d36e..f7df26925bd531e322a7fc334924c8e15927fe99 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <Graphic3d_ZLayerId.hxx>
 #include <Precision.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 
 //! This class provides data and criterion for sorting candidate
 //! entities in the process of interactive selection by mouse click
@@ -27,7 +27,7 @@ class SelectMgr_SortCriterion
 {
 public:
 
-  Handle(SelectBasics_SensitiveEntity) Entity; //!< detected entity
+  Handle(Select3D_SensitiveEntity) Entity; //!< detected entity
   gp_Pnt             Point;           //!< 3D point
   Standard_Real      Depth;           //!< distance from the view plane to the entity
   Standard_Real      MinDist;         //!< distance from the clicked point to the entity on the view plane
index 0099563c7f404090a59ec7d44d0c4cdccd7f451d..88be7da13c93bd97e58865d6bda323f751b0da7d 100644 (file)
@@ -21,8 +21,7 @@
 #include <gp_Pnt.hxx>
 #include <OSD_Environment.hxx>
 #include <Precision.hxx>
-#include <SelectBasics_EntityOwner.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <SelectBasics_PickResult.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_SortCriterion.hxx>
@@ -68,7 +67,7 @@ namespace {
 //=======================================================================
 void SelectMgr_ViewerSelector::updatePoint3d (SelectMgr_SortCriterion& theCriterion,
                                               const SelectBasics_PickResult& thePickResult,
-                                              const Handle(SelectBasics_SensitiveEntity)& theEntity,
+                                              const Handle(Select3D_SensitiveEntity)& theEntity,
                                               const gp_GTrsf& theInversedTrsf,
                                               const SelectMgr_SelectingVolumeManager& theMgr) const
 {
@@ -184,7 +183,7 @@ void SelectMgr_ViewerSelector::Clear()
 // function: isToScaleFrustum
 // purpose : Checks if the entity given requires to scale current selecting frustum
 //=======================================================================
-Standard_Boolean SelectMgr_ViewerSelector::isToScaleFrustum (const Handle(SelectBasics_SensitiveEntity)& theEntity)
+Standard_Boolean SelectMgr_ViewerSelector::isToScaleFrustum (const Handle(Select3D_SensitiveEntity)& theEntity)
 {
   return mySelectingVolumeMgr.GetActiveSelectionType() == SelectMgr_SelectingVolumeManager::Point
     && sensitivity (theEntity) < myTolerances.Tolerance();
@@ -195,7 +194,7 @@ Standard_Boolean SelectMgr_ViewerSelector::isToScaleFrustum (const Handle(Select
 // purpose : In case if custom tolerance is set, this method will return sum of entity
 //           sensitivity and custom tolerance.
 //=======================================================================
-Standard_Integer SelectMgr_ViewerSelector::sensitivity (const Handle(SelectBasics_SensitiveEntity)& theEntity) const
+Standard_Integer SelectMgr_ViewerSelector::sensitivity (const Handle(Select3D_SensitiveEntity)& theEntity) const
 {
   return myTolerances.IsCustomTolSet() ?
     theEntity->SensitivityFactor() + myTolerances.CustomTolerance() : theEntity->SensitivityFactor();
@@ -206,11 +205,11 @@ Standard_Integer SelectMgr_ViewerSelector::sensitivity (const Handle(SelectBasic
 // purpose : Internal function that checks if a particular sensitive
 //           entity theEntity overlaps current selecting volume precisely
 //=======================================================================
-void SelectMgr_ViewerSelector::checkOverlap (const Handle(SelectBasics_SensitiveEntity)& theEntity,
+void SelectMgr_ViewerSelector::checkOverlap (const Handle(Select3D_SensitiveEntity)& theEntity,
                                              const gp_GTrsf& theInversedTrsf,
                                              SelectMgr_SelectingVolumeManager& theMgr)
 {
-  Handle(SelectMgr_EntityOwner) anOwner (Handle(SelectMgr_EntityOwner)::DownCast (theEntity->OwnerId()));
+  const Handle(SelectMgr_EntityOwner)& anOwner = theEntity->OwnerId();
   Handle(SelectMgr_SelectableObject) aSelectable;
   Standard_Boolean toRestoresViewClipEnabled = Standard_False;
   if (!anOwner.IsNull())
@@ -316,7 +315,7 @@ void SelectMgr_ViewerSelector::checkOverlap (const Handle(SelectBasics_Sensitive
 //           needs to be scaled and transformed for the entity and performs
 //           necessary calculations
 //=======================================================================
-void SelectMgr_ViewerSelector::computeFrustum (const Handle(SelectBasics_SensitiveEntity)& theEnt,
+void SelectMgr_ViewerSelector::computeFrustum (const Handle(Select3D_SensitiveEntity)& theEnt,
                                                const SelectMgr_SelectingVolumeManager&     theMgr,
                                                const gp_GTrsf&                             theInvTrsf,
                                                SelectMgr_FrustumCache&                     theCachedMgrs,
@@ -451,7 +450,7 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable
         const Handle(SelectMgr_SensitiveEntity)& aSensitive = anEntitySet->GetSensitiveById (anIdx);
         if (aSensitive->IsActiveForSelection())
         {
-          const Handle(SelectBasics_SensitiveEntity)& anEnt = aSensitive->BaseSensitive();
+          const Handle(Select3D_SensitiveEntity)& anEnt = aSensitive->BaseSensitive();
           SelectMgr_SelectingVolumeManager aTmpMgr = aMgr;
           computeFrustum (anEnt, theMgr, aInversedTrsf, aScaledTrnsfFrustums, aTmpMgr);
           checkOverlap (anEnt, aInversedTrsf, aTmpMgr);
@@ -478,7 +477,7 @@ void SelectMgr_ViewerSelector::traverseObject (const Handle(SelectMgr_Selectable
   for (Standard_Integer aStoredIter = mystored.Extent(); aStoredIter >= aFirstStored; --aStoredIter)
   {
     const SelectMgr_SortCriterion& aCriterion = mystored.FindFromIndex (aStoredIter);
-    const Handle(SelectBasics_EntityOwner)& anOwner = aCriterion.Entity->OwnerId();
+    const Handle(SelectMgr_EntityOwner)& anOwner = aCriterion.Entity->OwnerId();
     Standard_Integer aNbOwnerEntities = 0;
     for (SelectMgr_IndexedMapOfHSensitive::Iterator aSensIter (anEntitySet->Sensitives()); aSensIter.More(); aSensIter.Next())
     {
@@ -655,13 +654,11 @@ void SelectMgr_ViewerSelector::ClearPicked()
 // Function: Picked
 // Purpose :
 //==================================================
-Handle(SelectMgr_EntityOwner) SelectMgr_ViewerSelector
-::Picked() const
+Handle(SelectMgr_EntityOwner) SelectMgr_ViewerSelector::Picked() const
 {
-  Standard_Integer RankInMap = myIndexes->Value (myCurRank);
-  const Handle(SelectBasics_EntityOwner)& toto = mystored.FindKey(RankInMap);
-  Handle(SelectMgr_EntityOwner) Ownr = Handle(SelectMgr_EntityOwner)::DownCast (toto);
-  return Ownr;
+  const Standard_Integer aRankInMap = myIndexes->Value (myCurRank);
+  const Handle(SelectMgr_EntityOwner)& anOwner = mystored.FindKey (aRankInMap);
+  return anOwner;
 }
 
 //=======================================================================
@@ -670,16 +667,14 @@ Handle(SelectMgr_EntityOwner) SelectMgr_ViewerSelector
 //=======================================================================
 Handle(SelectMgr_EntityOwner) SelectMgr_ViewerSelector::Picked (const Standard_Integer theRank) const
 {
-  Handle(SelectMgr_EntityOwner) anOwner;
   if (theRank < 1 || theRank > NbPicked())
   {
-    return anOwner;
+    return Handle(SelectMgr_EntityOwner)();
   }
 
   const Standard_Integer anOwnerIdx = myIndexes->Value (theRank);
-  const Handle(SelectBasics_EntityOwner)& aStoredOwner = mystored.FindKey (anOwnerIdx);
-  anOwner = Handle(SelectMgr_EntityOwner)::DownCast (aStoredOwner);
-  return anOwner;
+  const Handle(SelectMgr_EntityOwner)& aStoredOwner = mystored.FindKey (anOwnerIdx);
+  return aStoredOwner;
 }
 
 //=======================================================================
@@ -982,7 +977,7 @@ void SelectMgr_ViewerSelector::ResetSelectionActivationStatus()
 // purpose  : Returns sensitive entity that was detected during the
 //            previous run of selection algorithm
 //=======================================================================
-const Handle(SelectBasics_SensitiveEntity)& SelectMgr_ViewerSelector::DetectedEntity() const
+const Handle(Select3D_SensitiveEntity)& SelectMgr_ViewerSelector::DetectedEntity() const
 {
   const Standard_Integer aRankInMap = myIndexes->Value(myCurRank);
   return mystored.FindFromIndex (aRankInMap).Entity;
@@ -992,7 +987,7 @@ const Handle(SelectBasics_SensitiveEntity)& SelectMgr_ViewerSelector::DetectedEn
 // function : ActiveOwners
 // purpose  : Returns the list of active entity owners
 //=======================================================================
-void SelectMgr_ViewerSelector::ActiveOwners (NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners) const
+void SelectMgr_ViewerSelector::ActiveOwners (NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners) const
 {
   for (SelectMgr_MapOfObjectSensitivesIterator anIter (myMapOfObjectSensitives); anIter.More(); anIter.Next())
   {
index 78691625f81d3dd4388a1af7abefed079069b48d..fadb622a7e78ad184ffecda627ab099e4e14f5d8 100644 (file)
@@ -35,7 +35,7 @@
 class SelectMgr_SelectionManager;
 class SelectMgr_SensitiveEntitySet;
 class SelectMgr_EntityOwner;
-class SelectBasics_SensitiveEntity;
+class Select3D_SensitiveEntity;
 
 // resolve name collisions with X11 headers
 #ifdef Status
@@ -125,7 +125,7 @@ public:
 
   //! Returns the Entity for the object picked at specified position.
   //! @param theRank rank of detected object within range 1...NbPicked()
-  const Handle(SelectBasics_SensitiveEntity)& PickedEntity (const Standard_Integer theRank) const { return PickedData (theRank).Entity; }
+  const Handle(Select3D_SensitiveEntity)& PickedEntity (const Standard_Integer theRank) const { return PickedData (theRank).Entity; }
 
   //! Returns the 3D point (intersection of picking axis with the object nearest to eye)
   //! for the object picked at specified position.
@@ -168,7 +168,7 @@ public:
   Standard_EXPORT TCollection_AsciiString Status (const Handle(SelectMgr_SelectableObject)& theSelectableObject) const;
 
   //! Returns the list of active entity owners
-  Standard_EXPORT void ActiveOwners (NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners) const;
+  Standard_EXPORT void ActiveOwners (NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners) const;
 
   //! Adds new object to the map of selectable objects
   Standard_EXPORT void AddSelectableObject (const Handle(SelectMgr_SelectableObject)& theObject);
@@ -243,7 +243,7 @@ public:
 
   //! Returns sensitive entity that was detected during the previous run of selection algorithm
   Standard_DEPRECATED("Deprecated method DetectedEntity() should be replaced by DetectedEntity(int)")
-  Standard_EXPORT const Handle(SelectBasics_SensitiveEntity)& DetectedEntity() const;
+  Standard_EXPORT const Handle(Select3D_SensitiveEntity)& DetectedEntity() const;
 
 protected:
 
@@ -278,18 +278,18 @@ protected:
 
   //! Internal function that checks if a particular sensitive
   //! entity theEntity overlaps current selecting volume precisely
-  Standard_EXPORT void checkOverlap (const Handle(SelectBasics_SensitiveEntity)& theEntity,
+  Standard_EXPORT void checkOverlap (const Handle(Select3D_SensitiveEntity)& theEntity,
                                      const gp_GTrsf& theInversedTrsf,
                                      SelectMgr_SelectingVolumeManager& theMgr);
 
 private:
 
   //! Checks if the entity given requires to scale current selecting frustum
-  Standard_Boolean isToScaleFrustum (const Handle(SelectBasics_SensitiveEntity)& theEntity);
+  Standard_Boolean isToScaleFrustum (const Handle(Select3D_SensitiveEntity)& theEntity);
 
   //! In case if custom tolerance is set, this method will return sum of entity sensitivity and
   //! custom tolerance. Otherwise, pure entity sensitivity factor will be returned.
-  Standard_Integer sensitivity (const Handle(SelectBasics_SensitiveEntity)& theEntity) const;
+  Standard_Integer sensitivity (const Handle(Select3D_SensitiveEntity)& theEntity) const;
 
   void Activate (const Handle(SelectMgr_Selection)& theSelection);
 
@@ -301,7 +301,7 @@ private:
   //! Internal function that checks if a current selecting frustum
   //! needs to be scaled and transformed for the entity and performs
   //! necessary calculations
-  void computeFrustum (const Handle(SelectBasics_SensitiveEntity)& theEnt,
+  void computeFrustum (const Handle(Select3D_SensitiveEntity)& theEnt,
                        const SelectMgr_SelectingVolumeManager&     theMgr,
                        const gp_GTrsf&                             theInvTrsf,
                        SelectMgr_FrustumCache&                     theCachedMgrs,
@@ -327,7 +327,7 @@ private: // implementation of deprecated methods
   //! Compute 3d position for detected entity.
   void updatePoint3d (SelectMgr_SortCriterion& theCriterion,
                       const SelectBasics_PickResult& thePickResult,
-                      const Handle(SelectBasics_SensitiveEntity)& theEntity,
+                      const Handle(Select3D_SensitiveEntity)& theEntity,
                       const gp_GTrsf& theInversedTrsf,
                       const SelectMgr_SelectingVolumeManager& theMgr) const;
 
index 281723196e5d5bc5aa3647352f50665d3f154191..d601d2080cbe614ea55169e7b1a50112fdfb1c00 100644 (file)
@@ -19,7 +19,7 @@
 #include <Graphic3d_StructureManager.hxx>
 #include <Prs3d_Drawer.hxx>
 #include <PrsMgr_PresentationManager.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_SelectableObject.hxx>
 #include <Standard_Type.hxx>
 #include <StdSelect_Shape.hxx>
@@ -169,16 +169,6 @@ void StdSelect_BRepOwner::SetLocation(const TopLoc_Location& aLoc)
     myPrsSh->SetToUpdate();
 }
 
-void StdSelect_BRepOwner::ResetLocation()
-{
-  SelectMgr_EntityOwner::ResetLocation();
-  // we must not nullify the myPrsSh here, because unhilight method
-  // will be working with wrong entity in this case, the best is to
-  // set the update flag and then recompute myPrsSh on hilighting
-  if (!myPrsSh.IsNull())
-    myPrsSh->SetToUpdate();
-}
-
 //=======================================================================
 //function : UpdateHighlightTrsf
 //purpose  :
index a03c4ca3c655599af6b2f9ead1713fae0d3a1b45..3e52352418abdb6de6b29ac16b84042f04d113fd 100644 (file)
@@ -111,8 +111,6 @@ public:
   Standard_EXPORT virtual void Clear (const Handle(PrsMgr_PresentationManager)& aPM, const Standard_Integer aMode = 0) Standard_OVERRIDE;
   
   Standard_EXPORT virtual void SetLocation (const TopLoc_Location& aLoc) Standard_OVERRIDE;
-  
-  Standard_EXPORT virtual void ResetLocation() Standard_OVERRIDE;
 
   //! Implements immediate application of location transformation of parent object to dynamic highlight structure
   Standard_EXPORT virtual void UpdateHighlightTrsf (const Handle(V3d_Viewer)& theViewer,
index 880e7049cf57b1299eaf1abe979334aa5834ae51..ff96652a36372069d5589312f38a4c252abb0cea 100644 (file)
@@ -75,7 +75,7 @@ void StdSelect_BRepSelectionTool::PreBuildBVH (const Handle(SelectMgr_Selection)
 {
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    const Handle(SelectBasics_SensitiveEntity)& aSensitive = aSelEntIter.Value()->BaseSensitive();
+    const Handle(Select3D_SensitiveEntity)& aSensitive = aSelEntIter.Value()->BaseSensitive();
     if (aSensitive->NbSubElements() >= BVH_PRIMITIVE_LIMIT)
     {
       aSensitive->BVH();
@@ -190,8 +190,8 @@ void StdSelect_BRepSelectionTool::Load (const Handle(SelectMgr_Selection)& theSe
   // loading of selectables...
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (aSelEntIter.Value()->BaseSensitive()->OwnerId());
-    anOwner->Set (theSelectableObj);
+    const Handle(SelectMgr_EntityOwner)& anOwner = aSelEntIter.Value()->BaseSensitive()->OwnerId();
+    anOwner->SetSelectable (theSelectableObj);
   }
 
   PreBuildBVH (theSelection);
index b3a6e3ae4b72096a2be0e60c85931b34ea0993b3..ea3f2adc02d3526ee4c4b1280217c4f9229bdb0c 100644 (file)
 #ifndef StdSelect_IndexedDataMapOfOwnerPrs_HeaderFile
 #define StdSelect_IndexedDataMapOfOwnerPrs_HeaderFile
 
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 #include <StdSelect_Prs.hxx>
 #include <TColStd_MapTransientHasher.hxx>
 #include <NCollection_IndexedDataMap.hxx>
 
-typedef NCollection_IndexedDataMap<Handle(SelectBasics_EntityOwner),Handle(StdSelect_Prs),TColStd_MapTransientHasher> StdSelect_IndexedDataMapOfOwnerPrs;
-
+typedef NCollection_IndexedDataMap<Handle(SelectMgr_EntityOwner), Handle(StdSelect_Prs), TColStd_MapTransientHasher> StdSelect_IndexedDataMapOfOwnerPrs;
 
 #endif
index 3e6c6106d500490941f2958f46140bfc020a70de..7b900a590fb8254b091d1bdcbc861446d1073317 100644 (file)
@@ -16,7 +16,7 @@
 
 #include <StdSelect_ViewerSelector3d.hxx>
 #include <StdSelect.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <Graphic3d_AspectLine3d.hxx>
 #include <gp_Pnt.hxx>
 #include <gp_Lin.hxx>
@@ -282,7 +282,7 @@ void StdSelect_ViewerSelector3d::computeSensitivePrs (const Handle(Graphic3d_Str
   TColStd_SequenceOfInteger aSeqBnds;
   for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (theSel->Entities()); aSelEntIter.More(); aSelEntIter.Next())
   {
-    Handle(Select3D_SensitiveEntity) Ent = Handle(Select3D_SensitiveEntity)::DownCast(aSelEntIter.Value()->BaseSensitive());
+    const Handle(Select3D_SensitiveEntity)& Ent = aSelEntIter.Value()->BaseSensitive();
     const Standard_Boolean hasloc = theLoc.Form() != gp_Identity;
 
     //==============
@@ -759,14 +759,14 @@ namespace
         return;
       }
 
-      const Handle(SelectBasics_SensitiveEntity)& aPickedEntity = myMainSel->PickedEntity (thePicked);
+      const Handle(Select3D_SensitiveEntity)& aPickedEntity = myMainSel->PickedEntity (thePicked);
       Quantity_Color aColor (Quantity_NOC_BLACK);
       myMapEntityColors.Find (aPickedEntity, aColor);
       myImage->SetPixelColor (theCol, theRow, aColor);
     }
 
   protected:
-    NCollection_DataMap<Handle(SelectBasics_SensitiveEntity), Quantity_Color> myMapEntityColors;
+    NCollection_DataMap<Handle(Select3D_SensitiveEntity), Quantity_Color> myMapEntityColors;
   };
 
   //! Help class for filling pixel with normalized depth of ray.
@@ -969,8 +969,8 @@ namespace
       }
 
       Standard_Integer aSelectionMode = -1;
-      const Handle(SelectMgr_SelectableObject)&   aSelectable = myMainSel->Picked       (thePicked)->Selectable();
-      const Handle(SelectBasics_SensitiveEntity)& anEntity    = myMainSel->PickedEntity (thePicked);
+      const Handle(SelectMgr_SelectableObject)& aSelectable = myMainSel->Picked       (thePicked)->Selectable();
+      const Handle(Select3D_SensitiveEntity)&   anEntity    = myMainSel->PickedEntity (thePicked);
       for (SelectMgr_SequenceOfSelection::Iterator aSelIter (aSelectable->Selections()); aSelIter.More(); aSelIter.Next())
       {
         const Handle(SelectMgr_Selection)& aSelection = aSelIter.Value();
index af397638c5068699d2930f5b8b5efb9c5ee876ea..c7eb831649d3a99df7aeb8ca31cfe44e9103302b 100755 (executable)
@@ -1,6 +1,5 @@
 Aspect
 InterfaceGraphic
-SelectBasics
 Xw
 Image
 Media
index fa60906e4c6879a3b1ab3fdea2f51a3074a05a08..c7f1082589fc41b588011ea54f723f5e6195404f 100755 (executable)
@@ -3,6 +3,7 @@ Graphic3d
 Select3D
 Prs3d
 StdPrs
+SelectBasics
 SelectMgr
 PrsMgr
 AIS
index f63094295fe64d1dc4b2d6492377f6a0a6ed50ba..6624596850d1be86b4bb7326e6d57846ef16990a 100644 (file)
@@ -5467,10 +5467,10 @@ static Standard_Integer VState (Draw_Interpretor& theDI,
     SelectMgr_SelectingVolumeManager aMgr = aSelector->GetManager();
     for (Standard_Integer aPickIter = 1; aPickIter <= aSelector->NbPicked(); ++aPickIter)
     {
-      const SelectMgr_SortCriterion&              aPickData = aSelector->PickedData (aPickIter);
-      const Handle(SelectBasics_SensitiveEntity)& anEntity = aSelector->PickedEntity (aPickIter);
-      Handle(SelectMgr_EntityOwner) anOwner    = Handle(SelectMgr_EntityOwner)::DownCast (anEntity->OwnerId());
-      Handle(AIS_InteractiveObject) anObj      = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
+      const SelectMgr_SortCriterion&         aPickData = aSelector->PickedData (aPickIter);
+      const Handle(Select3D_SensitiveEntity)& anEntity = aSelector->PickedEntity (aPickIter);
+      const Handle(SelectMgr_EntityOwner)& anOwner = anEntity->OwnerId();
+      Handle(AIS_InteractiveObject) anObj = Handle(AIS_InteractiveObject)::DownCast (anOwner->Selectable());
 
       TCollection_AsciiString aName;
       GetMapOfAIS().Find1 (anObj, aName);
index 8c724d05a7cbbc1dbc94284cc2e8f65a4aa0faf0..51770e4f0ac7297751dfbc7d34f6a7f6d8c80e8f 100644 (file)
@@ -52,14 +52,13 @@ int VInspector_ItemContext::initRowCount() const
 #ifdef DEBUG_FREE_OWNERS
   int aRows = 0;
   // only local context is processed: TODO for global context
-  NCollection_List<Handle(SelectBasics_EntityOwner)> anActiveOwners;
+  NCollection_List<Handle(SelectMgr_EntityOwner)> anActiveOwners;
   aContext->MainSelector()->ActiveOwners(anActiveOwners);
 
   Handle(SelectMgr_EntityOwner) anOwner;
-  for (NCollection_List<Handle(SelectBasics_EntityOwner)>::Iterator anOwnersIt(anActiveOwners);
-       anOwnersIt.More(); anOwnersIt.Next())
+  for (NCollection_List<Handle(SelectMgr_EntityOwner)>::Iterator anOwnersIt(anActiveOwners); anOwnersIt.More(); anOwnersIt.Next())
   {
-    anOwner = Handle(SelectMgr_EntityOwner)::DownCast(anOwnersIt.Value());
+    anOwner = anOwnersIt.Value();
     if (anOwner.IsNull())
       continue;
     Handle(AIS_InteractiveObject) anAISObj = Handle(AIS_InteractiveObject)::DownCast(anOwner->Selectable());
@@ -67,12 +66,12 @@ int VInspector_ItemContext::initRowCount() const
       aRows++;
   }
   // owners in Global Context
-  NCollection_List<Handle(SelectBasics_EntityOwner)> anActiveOwners;
+  NCollection_List<Handle(SelectMgr_EntityOwner)> anActiveOwners;
   aContext->MainSelector()->ActiveOwners(anActiveOwners);
   if (aRows > 0)
     aNbPresentations += aRows;
-  NCollection_List<Handle(SelectBasics_EntityOwner)> anEmptySelectableOwners;
-  NCollection_List<Handle(SelectBasics_EntityOwner)> anOwners =
+  NCollection_List<Handle(SelectMgr_EntityOwner)> anEmptySelectableOwners;
+  NCollection_List<Handle(SelectMgr_EntityOwner)> anOwners =
     VInspector_Tools::ActiveOwners (aContext, anEmptySelectableOwners);
   if (anEmptySelectableOwners.Size() > 0)
     aNbPresentations += 1;
index 80f1f3094b272f5a3c73302343827e87654ad5b9..309bb45d3afe7d1773b936d36cca38997f67c96e 100644 (file)
@@ -19,7 +19,7 @@
 #include <inspector/VInspector_Tools.hxx>
 
 #include <SelectMgr_SensitiveEntity.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <Standard_Version.hxx>
 #include <StdSelect_BRepOwner.hxx>
 
@@ -40,7 +40,7 @@ QVariant VInspector_ItemEntityOwner::initValue(int theItemRole) const
     case Qt::EditRole:
     case Qt::ToolTipRole:
     {
-      Handle(SelectBasics_EntityOwner) anOwner = getEntityOwner();
+      Handle(SelectMgr_EntityOwner) anOwner = getEntityOwner();
       if (anOwner.IsNull())
         return QVariant();
 
@@ -107,7 +107,7 @@ QVariant VInspector_ItemEntityOwner::initValue(int theItemRole) const
 // =======================================================================
 void VInspector_ItemEntityOwner::Init()
 {
-  Handle(SelectBasics_EntityOwner) anOwner;
+  Handle(SelectMgr_EntityOwner) anOwner;
 
   VInspector_ItemSensitiveEntityPtr aParentItem = itemDynamicCast<VInspector_ItemSensitiveEntity>(Parent());
   if (aParentItem)
@@ -139,7 +139,7 @@ void VInspector_ItemEntityOwner::Init()
         {
           Handle(SelectMgr_SensitiveEntity) anEntity = aSelEntIter.Value();
 #endif
-          const Handle(SelectBasics_SensitiveEntity)& aBase = anEntity->BaseSensitive();
+          const Handle(Select3D_SensitiveEntity)& aBase = anEntity->BaseSensitive();
           if (!aBase.IsNull())
           {
             if (aRowId == aCurrentIndex)
@@ -179,7 +179,7 @@ void VInspector_ItemEntityOwner::initItem() const
 // function : getEntityOwner
 // purpose :
 // =======================================================================
-Handle(SelectBasics_EntityOwner) VInspector_ItemEntityOwner::getEntityOwner() const
+Handle(SelectMgr_EntityOwner) VInspector_ItemEntityOwner::getEntityOwner() const
 {
   initItem();
   return myOwner;
index 598ca26d818266339f89b91809634542ba2bc5ed..f00adc2ee3ddd431fc2dcc5f45676d95a7ce21e5 100644 (file)
@@ -46,7 +46,7 @@ public:
   Standard_EXPORT virtual void Reset() Standard_OVERRIDE;
 
   //! Returns the current entity owner
-  Handle(SelectBasics_EntityOwner) EntityOwner() const { return myOwner; }
+  Handle(SelectMgr_EntityOwner) EntityOwner() const { return myOwner; }
 
 protected:
   //! \return number of children.
@@ -79,11 +79,11 @@ private:
 private:
 
   //! Returns the current entity owner. Initializes the item if it was not initialized yet
-  Handle(SelectBasics_EntityOwner) getEntityOwner() const;
+  Handle(SelectMgr_EntityOwner) getEntityOwner() const;
 
 private:
 
-  Handle(SelectBasics_EntityOwner) myOwner; //!< the current entity owner
+  Handle(SelectMgr_EntityOwner) myOwner; //!< the current entity owner
 };
 
 #endif
index 45b22ed9eb76f24ec2f7cc15ebd2e728c1c2699f..e1747f7f3fa2c2affa3f9f8fa09d143b0e0fdbde 100644 (file)
@@ -27,7 +27,7 @@
 #include <NCollection_List.hxx>
 #include <Prs3d.hxx>
 #include <Prs3d_Drawer.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 #include <StdSelect_BRepOwner.hxx>
 #include <Standard_Version.hxx>
 
index bcfb5e9f3052ef17028ae4d1549f95b57d69d719..191232968f5fa26fb1b0bebc2e1e7b4cd519c873 100644 (file)
@@ -97,11 +97,11 @@ QVariant VInspector_ItemSelection::initValue (int theItemRole) const
 #if OCC_VERSION_HEX < 0x070201
               for (mySelection->Init(); mySelection->More(); mySelection->Next())
               {
-                const Handle(SelectBasics_EntityOwner)& anOwner = mySelection->Sensitive()->BaseSensitive()->OwnerId();
+                const Handle(SelectMgr_EntityOwner)& anOwner = mySelection->Sensitive()->BaseSensitive()->OwnerId();
 #else
               for (NCollection_Vector<Handle(SelectMgr_SensitiveEntity)>::Iterator aSelEntIter (mySelection->Entities()); aSelEntIter.More(); aSelEntIter.Next())
               {
-                const Handle(SelectBasics_EntityOwner)& anOwner = aSelEntIter.Value()->BaseSensitive()->OwnerId();
+                const Handle(SelectMgr_EntityOwner)& anOwner = aSelEntIter.Value()->BaseSensitive()->OwnerId();
 #endif
                 if (VInspector_Tools::IsOwnerSelected(aContext, anOwner))
                   aNbSelected++;
index 5c244a1cc3c776d71f97b3b6ce6cd53274e713e2..b5f9d59174524e25df09349adac69a306c94d8a0 100644 (file)
@@ -17,7 +17,7 @@
 #include <inspector/VInspector_ItemSensitiveEntity.hxx>
 
 #include <AIS_ListOfInteractive.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <SelectMgr_EntityOwner.hxx>
 #include <SelectMgr_Selection.hxx>
 #include <SelectMgr_SensitiveEntity.hxx>
@@ -51,7 +51,7 @@ Handle(SelectMgr_SensitiveEntity) VInspector_ItemSensitiveEntity::GetSensitiveEn
 QVariant VInspector_ItemSensitiveEntity::initValue (int theItemRole) const
 {
   Handle(SelectMgr_SensitiveEntity) aBase = GetSensitiveEntity();
-  Handle(SelectBasics_EntityOwner) anOwner = aBase->BaseSensitive()->OwnerId();
+  Handle(SelectMgr_EntityOwner) anOwner = aBase->BaseSensitive()->OwnerId();
 
   switch (theItemRole)
   {
@@ -183,12 +183,12 @@ void VInspector_ItemSensitiveEntity::initItem() const
 // function : getEntityOwner
 // purpose :
 // =======================================================================
-Handle(SelectBasics_EntityOwner) VInspector_ItemSensitiveEntity::getEntityOwner() const
+Handle(SelectMgr_EntityOwner) VInspector_ItemSensitiveEntity::getEntityOwner() const
 {
   initItem();
 
-  Handle(SelectBasics_EntityOwner) anOwner;
-  const Handle(SelectBasics_SensitiveEntity)& aBase = myEntity->BaseSensitive();
+  Handle(SelectMgr_EntityOwner) anOwner;
+  const Handle(Select3D_SensitiveEntity)& aBase = myEntity->BaseSensitive();
   if (aBase.IsNull())
     return anOwner;
   return aBase->OwnerId();
index ecda9976e723b0cf205d7fbb6277363a741f5927..4fbe8045cd1e5bf61238d3767d1e59e8ea9bbaee 100644 (file)
 #define VInspector_ItemSensitiveEntity_H
 
 #include <SelectMgr_SensitiveEntity.hxx>
-#include <SelectBasics_SensitiveEntity.hxx>
+#include <Select3D_SensitiveEntity.hxx>
 #include <Standard.hxx>
 #include <inspector/VInspector_ItemBase.hxx>
 
-class SelectBasics_EntityOwner;
+class SelectMgr_EntityOwner;
 class VInspector_ItemSensitiveEntity;
 
 typedef QExplicitlySharedDataPointer<VInspector_ItemSensitiveEntity> VInspector_ItemSensitiveEntityPtr;
 
 //! \class VInspector_ItemSensitiveEntity
-//! The item shows information about SelectBasics_EntityOwner.
+//! The item shows information about SelectMgr_EntityOwner.
 //! The parent is item selection, children are item entity owners
 class VInspector_ItemSensitiveEntity : public VInspector_ItemBase
 {
@@ -73,7 +73,7 @@ protected:
 
   //! Returns owner of the current sensitive entity
   //! \return owner
-  Handle(SelectBasics_EntityOwner) getEntityOwner() const;
+  Handle(SelectMgr_EntityOwner) getEntityOwner() const;
 
 private:
 
index b64359f7f2080bae7c92b1d18e6abd405f2c9761..eeb52fe9832b5f766d85af2c7b0bc37d46542d31 100644 (file)
@@ -115,10 +115,10 @@ int VInspector_Tools::SelectedOwners (const Handle(AIS_InteractiveContext)& theC
 // purpose :
 // =======================================================================
 bool VInspector_Tools::IsOwnerSelected (const Handle(AIS_InteractiveContext)& theContext,
-                                        const Handle(SelectBasics_EntityOwner)& theOwner)
+                                        const Handle(SelectMgr_EntityOwner)& theOwner)
 {
   bool anIsSelected = false;
-  Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (theOwner);
+  Handle(SelectMgr_EntityOwner) anOwner = theOwner;
   for (theContext->InitSelected(); theContext->MoreSelected() && !anIsSelected; theContext->NextSelected())
     anIsSelected = theContext->SelectedOwner() == anOwner;
   return anIsSelected;
@@ -128,10 +128,10 @@ bool VInspector_Tools::IsOwnerSelected (const Handle(AIS_InteractiveContext)& th
 // function : ContextOwners
 // purpose :
 // =======================================================================
-NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ContextOwners (
+NCollection_List<Handle(SelectMgr_EntityOwner)> VInspector_Tools::ContextOwners (
                                                const Handle(AIS_InteractiveContext)& theContext)
 {
-  NCollection_List<Handle(SelectBasics_EntityOwner)> aResultOwners;
+  NCollection_List<Handle(SelectMgr_EntityOwner)> aResultOwners;
   if (theContext.IsNull())
     return aResultOwners;
 
@@ -164,8 +164,8 @@ NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ContextOwne
 #endif
         if (anEntity.IsNull())
           continue;
-        const Handle(SelectBasics_SensitiveEntity)& aBase = anEntity->BaseSensitive();
-        Handle(SelectBasics_EntityOwner) anOwner = aBase->OwnerId();
+        const Handle(Select3D_SensitiveEntity)& aBase = anEntity->BaseSensitive();
+        Handle(SelectMgr_EntityOwner) anOwner = aBase->OwnerId();
         Standard_Transient* anOwnerPtr = anOwner.operator->();
         if (aSelectedIds.contains ((size_t)anOwnerPtr))
           continue;
@@ -181,17 +181,17 @@ NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ContextOwne
 // function : ActiveOwners
 // purpose :
 // =======================================================================
-NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ActiveOwners (
+NCollection_List<Handle(SelectMgr_EntityOwner)> VInspector_Tools::ActiveOwners (
                                 const Handle(AIS_InteractiveContext)& theContext,
-                                NCollection_List<Handle(SelectBasics_EntityOwner)>& theEmptySelectableOwners)
+                                NCollection_List<Handle(SelectMgr_EntityOwner)>& theEmptySelectableOwners)
 {
-  NCollection_List<Handle(SelectBasics_EntityOwner)> aResultOwners;
+  NCollection_List<Handle(SelectMgr_EntityOwner)> aResultOwners;
 
   // only local context is processed: TODO for global context
   Handle(AIS_InteractiveContext) aContext = theContext;
   if (aContext.IsNull())
     return aResultOwners;
-  NCollection_List<Handle(SelectBasics_EntityOwner)> anActiveOwners;
+  NCollection_List<Handle(SelectMgr_EntityOwner)> anActiveOwners;
   // OCCT BUG:1 - equal pointer owners are appears in the list
 #if OCC_VERSION_HEX > 0x060901
   aContext->MainSelector()->ActiveOwners (anActiveOwners);
@@ -199,11 +199,10 @@ NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ActiveOwner
   anActiveOwners = aContext->MainSelector()->ActiveOwners();
 #endif
   QList<size_t> aSelectedIds; // Remember of selected address in order to avoid duplicates
-  Handle(SelectMgr_EntityOwner) anOwner;
-  for (NCollection_List<Handle(SelectBasics_EntityOwner)>::Iterator anOwnersIt (anActiveOwners);
+  for (NCollection_List<Handle(SelectMgr_EntityOwner)>::Iterator anOwnersIt (anActiveOwners);
        anOwnersIt.More(); anOwnersIt.Next())
   {
-    anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value());
+    const Handle(SelectMgr_EntityOwner)& anOwner = anOwnersIt.Value();
     if (anOwner.IsNull())
       continue;
 
@@ -226,7 +225,7 @@ NCollection_List<Handle(SelectBasics_EntityOwner)> VInspector_Tools::ActiveOwner
 // purpose :
 // =======================================================================
 void VInspector_Tools::AddOrRemoveSelectedShapes (const Handle(AIS_InteractiveContext)& theContext,
-                                                  const NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners)
+                                                  const NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners)
 {
   // TODO: the next two rows are to be removed later
   theContext->UnhilightSelected(false);
@@ -234,10 +233,10 @@ void VInspector_Tools::AddOrRemoveSelectedShapes (const Handle(AIS_InteractiveCo
 
   theContext->UnhilightSelected(Standard_False);
 
-  for (NCollection_List<Handle(SelectBasics_EntityOwner)>::Iterator anOwnersIt(theOwners);
+  for (NCollection_List<Handle(SelectMgr_EntityOwner)>::Iterator anOwnersIt(theOwners);
        anOwnersIt.More(); anOwnersIt.Next())
   {
-    Handle(SelectMgr_EntityOwner) anOwner = Handle(SelectMgr_EntityOwner)::DownCast (anOwnersIt.Value());
+    Handle(SelectMgr_EntityOwner) anOwner = anOwnersIt.Value();
     theContext->AddOrRemoveSelected (anOwner, Standard_False);
   }
   theContext->UpdateCurrentViewer();
index e22ff5d539c84286ecb18d83ee78ed90cb0a7a4f..5b116b446fa054c4f3eca3f1c9461ed5f961d5e7 100644 (file)
@@ -65,27 +65,27 @@ public:
   //! \param theOwner a selectable owner
   //! \return boolean value
   Standard_EXPORT static bool IsOwnerSelected (const Handle(AIS_InteractiveContext)& theContext,
-                                               const Handle(SelectBasics_EntityOwner)& theOwner);
+                                               const Handle(SelectMgr_EntityOwner)& theOwner);
 
   //! Returns all owners present in the context
   //! \param theContext an interactive context
   //! \return container of owners
-  Standard_EXPORT static NCollection_List<Handle(SelectBasics_EntityOwner)> ContextOwners (
+  Standard_EXPORT static NCollection_List<Handle(SelectMgr_EntityOwner)> ContextOwners (
                                                  const Handle(AIS_InteractiveContext)& theContext);
 
   //! Returns active owners in main selector of context
   //! \param theContext an interactive context
   //! \param theEmptySelectableOwners container of owners with NULL presentation or not displayed presentation
   //! \return container of owners
-  Standard_EXPORT static NCollection_List<Handle(SelectBasics_EntityOwner)> ActiveOwners (
+  Standard_EXPORT static NCollection_List<Handle(SelectMgr_EntityOwner)> ActiveOwners (
                             const Handle(AIS_InteractiveContext)& theContext,
-                            NCollection_List<Handle(SelectBasics_EntityOwner)>& theEmptySelectableOwners);
+                            NCollection_List<Handle(SelectMgr_EntityOwner)>& theEmptySelectableOwners);
 
   //! Unhighlight selected, set selected the owners
   //! \param theContext an interactive context
   //! \param theOwners a container of owners
   Standard_EXPORT static void AddOrRemoveSelectedShapes (const Handle(AIS_InteractiveContext)& theContext,
-                                         const NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners);
+                                         const NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners);
 
   //! Unhighlight selected, set selected presentations
   //! \param theContext an interactive context
index d8f6c026a5b242be16d25a4dbbe6bead0e71f01b..207ad48541b62cf6642098c75e354e3a77509f66 100644 (file)
@@ -20,7 +20,7 @@
 #include <inspector/VInspector_ItemEntityOwner.hxx>
 #include <inspector/VInspector_ItemPresentableObject.hxx>
 #include <inspector/VInspector_ItemSensitiveEntity.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 
 #include <Standard_WarningsDisable.hxx>
 #include <QItemSelectionModel>
@@ -146,7 +146,7 @@ QModelIndex VInspector_ViewModel::FindIndex (const Handle(AIS_InteractiveObject)
 // purpose :
 // =======================================================================
 void VInspector_ViewModel::GetSelectedOwners (QItemSelectionModel* theSelectionModel,
-                                              NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners)
+                                              NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners)
 {
   if (!theSelectionModel)
     return;
@@ -165,7 +165,7 @@ void VInspector_ViewModel::GetSelectedOwners (QItemSelectionModel* theSelectionM
   for (QList<TreeModel_ItemBasePtr>::const_iterator anItemIt = anItems.begin(); anItemIt != anItems.end(); anItemIt++)
   {
     TreeModel_ItemBasePtr anItem = *anItemIt;
-    Handle(SelectBasics_EntityOwner) anEntityOwner;
+    Handle(SelectMgr_EntityOwner) anEntityOwner;
     if (VInspector_ItemEntityOwnerPtr anOwnerItem = itemDynamicCast<VInspector_ItemEntityOwner>(anItem))
     {
       anEntityOwner = anOwnerItem->EntityOwner();
index 2f58f57a1c0baeb163bb2d80d13f84b4795128f4..839e5500576063cdf9167d4b0baf3e2ebb845299 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <AIS_InteractiveContext.hxx>
 #include <NCollection_List.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 #include <Standard.hxx>
 #include <inspector/TreeModel_ModelBase.hxx>
 #include <inspector/VInspector_ItemBase.hxx>
@@ -77,7 +77,7 @@ public:
   //! \param theSelectionModel a selection model
   //! \param theOwners an output list of owners
   Standard_EXPORT static void GetSelectedOwners (QItemSelectionModel* theSelectionModel,
-                                                 NCollection_List<Handle(SelectBasics_EntityOwner)>& theOwners);
+                                                 NCollection_List<Handle(SelectMgr_EntityOwner)>& theOwners);
 
   //! Updates tree model
   Standard_EXPORT void UpdateTreeModel();
index b1af3fe97f9156eedecdcbc6fcb7b03ccee5081d..e102fbb709dabfb26c501a7c35dfabac9bf13ef1 100644 (file)
@@ -408,7 +408,7 @@ void VInspector_Window::onToolBarActionClicked (const int theActionId)
     }
     case VInspector_ToolActionType_SelectOwnersId:
     {
-      NCollection_List<Handle(SelectBasics_EntityOwner)> anOwnersForViewer;
+      NCollection_List<Handle(SelectMgr_EntityOwner)> anOwnersForViewer;
       if (myToolBar->GetToolButton((VInspector_ToolActionType)theActionId)->isChecked())
         VInspector_ViewModel::GetSelectedOwners(myTreeView->selectionModel(), anOwnersForViewer);
       VInspector_Tools::AddOrRemoveSelectedShapes(aViewModel->GetContext(), anOwnersForViewer);
index 7d004e59b95616fce83c23112e53242270cd3ae8..73783f39b017c91fee33b05d06ad7714c6928492 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <AIS_InteractiveContext.hxx>
 #include <NCollection_List.hxx>
-#include <SelectBasics_EntityOwner.hxx>
+#include <SelectMgr_EntityOwner.hxx>
 #include <Standard.hxx>
 
 #include <inspector/TInspectorAPI_PluginParameters.hxx>