0024623: Visualization - improve selection mechanism
authorvpa <vpa@opencascade.com>
Mon, 6 Apr 2015 09:31:00 +0000 (12:31 +0300)
committerbugmaster <bugmaster@opencascade.com>
Mon, 6 Apr 2015 14:27:38 +0000 (17:27 +0300)
commitf751596e462c483e8172d2cd339acef9298bcfc6
treea5def28806ccba9dcd5bb948103db712c86c8cc5
parent7a91ad6e819bccdeddd3943ccdf39e52a7e784e8
0024623: Visualization - improve selection mechanism

Redesign of selection mechanism:
- implemented 3-level BVH tree for selection;
- selection now calculates in 3D space;
- intersection tests were moved to SelectMgr_BaseFrustum descendants;
- removed .cdl files in Select3D and .cdl related to selection in MeshVS;
- SelectMgr_ViewerSelectors are now shared between local and global contexts;
- transformations of sensitive entities are now stored in SelectMgr_SelectableObject only. Sensitive entities are independent from transformations, it is applied to SelectMgr_SelectingVolumeManager instance only;
- connected and multiple connected interactive objects are now represented by their child objects only for SelectMgr_SelectionManager;
- if interactive object has child objects, they will be stored as separate objects in SelectMgr_SelectionManager now.
- test cases bugs/vis/bug24623_1, bug24623_2, bug24623_3, bug24623_4 to test performance and memory issues.
269 files changed:
samples/mfc/standard/01_Geometry/CMakeLists.txt
samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj
samples/mfc/standard/01_Geometry/adm/win/vc10/Geometry.vcxproj.filters
samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.cpp [deleted file]
samples/mfc/standard/01_Geometry/src/ISession2D/ISession2D_SensitiveCurve.h [deleted file]
samples/mfc/standard/01_Geometry/src/StdAfx.h
samples/mfc/standard/03_Viewer2d/src/StdAfx.h
samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp
samples/mfc/standard/05_ImportExport/src/StdAfx.h
samples/mfc/standard/06_Ocaf/src/StdAfx.h
samples/mfc/standard/08_HLR/src/StdAfx.h
samples/mfc/standard/09_Animation/src/AnimationView3D.cpp
samples/mfc/standard/09_Animation/src/StdAfx.h
samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp
samples/mfc/standard/Common/OCC_2dView.cpp
samples/mfc/standard/Common/OCC_3dView.cpp
samples/mfc/standard/Common/StdAfx.h
src/AIS/AIS_Axis.cxx
src/AIS/AIS_Chamf2dDimension.cxx
src/AIS/AIS_Chamf3dDimension.cxx
src/AIS/AIS_Circle.cxx
src/AIS/AIS_ConcentricRelation.cxx
src/AIS/AIS_ConnectedInteractive.cxx
src/AIS/AIS_Dimension.cxx
src/AIS/AIS_Dimension.hxx
src/AIS/AIS_EqualRadiusRelation.cxx
src/AIS/AIS_FixRelation.cxx
src/AIS/AIS_IdenticRelation.cxx
src/AIS/AIS_InteractiveContext.cdl
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext_1.cxx
src/AIS/AIS_InteractiveContext_2.cxx
src/AIS/AIS_InteractiveObject.cdl
src/AIS/AIS_InteractiveObject.cxx
src/AIS/AIS_Line.cxx
src/AIS/AIS_LocalContext.cdl
src/AIS/AIS_LocalContext.cxx
src/AIS/AIS_LocalContext_1.cxx
src/AIS/AIS_MaxRadiusDimension.cxx
src/AIS/AIS_MidPointRelation.cxx
src/AIS/AIS_MinRadiusDimension.cxx
src/AIS/AIS_MultipleConnectedInteractive.cxx
src/AIS/AIS_OffsetDimension.cxx
src/AIS/AIS_ParallelRelation.cxx
src/AIS/AIS_PerpendicularRelation.cxx
src/AIS/AIS_Plane.lxx
src/AIS/AIS_PlaneTrihedron.cxx
src/AIS/AIS_SymmetricRelation.cxx
src/AIS/AIS_TangentRelation.cxx
src/BVH/BVH_BinnedBuilder.hxx
src/BVH/BVH_BinnedBuilder.lxx
src/BVH/BVH_SpatialMedianBuilder.hxx
src/BVH/BVH_SpatialMedianBuilder.lxx
src/IVtk/IVtk_IShapePickerAlgo.hxx
src/IVtk/IVtk_IView.hxx
src/IVtkOCC/IVtkOCC_SelectableObject.cxx
src/IVtkOCC/IVtkOCC_SelectableObject.hxx
src/IVtkOCC/IVtkOCC_ShapePickerAlgo.cxx
src/IVtkOCC/IVtkOCC_ShapePickerAlgo.hxx
src/IVtkOCC/IVtkOCC_ViewerSelector.cxx
src/IVtkOCC/IVtkOCC_ViewerSelector.hxx
src/IVtkVTK/IVtkVTK_View.cxx
src/IVtkVTK/IVtkVTK_View.hxx
src/MeshVS/FILES
src/MeshVS/MeshVS.cdl
src/MeshVS/MeshVS_DummySensitiveEntity.cdl [deleted file]
src/MeshVS/MeshVS_DummySensitiveEntity.cxx
src/MeshVS/MeshVS_DummySensitiveEntity.hxx [new file with mode: 0644]
src/MeshVS/MeshVS_Mesh.cdl
src/MeshVS/MeshVS_SensitiveFace.cdl [deleted file]
src/MeshVS/MeshVS_SensitiveFace.cxx
src/MeshVS/MeshVS_SensitiveFace.hxx [new file with mode: 0644]
src/MeshVS/MeshVS_SensitiveMesh.cdl [deleted file]
src/MeshVS/MeshVS_SensitiveMesh.cxx
src/MeshVS/MeshVS_SensitiveMesh.hxx [new file with mode: 0644]
src/MeshVS/MeshVS_SensitivePolyhedron.cdl [deleted file]
src/MeshVS/MeshVS_SensitivePolyhedron.cxx
src/MeshVS/MeshVS_SensitivePolyhedron.hxx [new file with mode: 0644]
src/MeshVS/MeshVS_SensitiveSegment.cdl [deleted file]
src/MeshVS/MeshVS_SensitiveSegment.cxx
src/MeshVS/MeshVS_SensitiveSegment.hxx [new file with mode: 0644]
src/PrsMgr/PrsMgr_PresentableObject.cdl
src/PrsMgr/PrsMgr_PresentableObject.cxx
src/PrsMgr/PrsMgr_PresentableObject.lxx
src/QABugs/QABugs_11.cxx
src/QABugs/QABugs_9.cxx
src/QABugs/QABugs_MyText.cdl
src/QABugs/QABugs_MyText.cxx
src/Select3D/FILES
src/Select3D/Select3D.cdl
src/Select3D/Select3D_BVHPrimitiveContent.cxx [new file with mode: 0644]
src/Select3D/Select3D_BVHPrimitiveContent.hxx [new file with mode: 0644]
src/Select3D/Select3D_BndBox3d.hxx [moved from src/Select3D/Select3D_SensitiveBox.lxx with 58% similarity]
src/Select3D/Select3D_BoundarySensitivePointSet.cxx [new file with mode: 0644]
src/Select3D/Select3D_BoundarySensitivePointSet.hxx [new file with mode: 0644]
src/Select3D/Select3D_Box2d.hxx [deleted file]
src/Select3D/Select3D_EntitySequence.hxx [new file with mode: 0644]
src/Select3D/Select3D_ISensitivePointSet.hxx [new file with mode: 0644]
src/Select3D/Select3D_InteriorSensitivePointSet.cxx [new file with mode: 0644]
src/Select3D/Select3D_InteriorSensitivePointSet.hxx [new file with mode: 0644]
src/Select3D/Select3D_Pnt2d.hxx [deleted file]
src/Select3D/Select3D_PointData.hxx
src/Select3D/Select3D_Projector.cdl [deleted file]
src/Select3D/Select3D_Projector.cxx [deleted file]
src/Select3D/Select3D_Projector.lxx [deleted file]
src/Select3D/Select3D_SensitiveBox.cdl [deleted file]
src/Select3D/Select3D_SensitiveBox.cxx
src/Select3D/Select3D_SensitiveBox.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveCircle.cdl [deleted file]
src/Select3D/Select3D_SensitiveCircle.cxx
src/Select3D/Select3D_SensitiveCircle.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveCurve.cdl [deleted file]
src/Select3D/Select3D_SensitiveCurve.cxx
src/Select3D/Select3D_SensitiveCurve.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveCurve.lxx [deleted file]
src/Select3D/Select3D_SensitiveEntity.cdl [deleted file]
src/Select3D/Select3D_SensitiveEntity.cxx
src/Select3D/Select3D_SensitiveEntity.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveFace.cdl [deleted file]
src/Select3D/Select3D_SensitiveFace.cxx
src/Select3D/Select3D_SensitiveFace.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveGroup.cdl [deleted file]
src/Select3D/Select3D_SensitiveGroup.cxx
src/Select3D/Select3D_SensitiveGroup.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveGroup.lxx
src/Select3D/Select3D_SensitivePoint.cdl [deleted file]
src/Select3D/Select3D_SensitivePoint.cxx
src/Select3D/Select3D_SensitivePoint.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitivePoly.cdl [deleted file]
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitivePoly.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitivePoly.lxx
src/Select3D/Select3D_SensitiveSegment.cdl [deleted file]
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveSegment.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveSegment.lxx
src/Select3D/Select3D_SensitiveSet.cxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveSet.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveTriangle.cdl [deleted file]
src/Select3D/Select3D_SensitiveTriangle.cxx
src/Select3D/Select3D_SensitiveTriangle.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveTriangulation.cdl [deleted file]
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/Select3D/Select3D_SensitiveTriangulation.hxx [new file with mode: 0644]
src/Select3D/Select3D_SensitiveTriangulation.lxx
src/Select3D/Select3D_SensitiveWire.cdl [deleted file]
src/Select3D/Select3D_SensitiveWire.cxx
src/Select3D/Select3D_SensitiveWire.hxx [new file with mode: 0644]
src/Select3D/Select3D_TypeOfSensitivity.hxx [new file with mode: 0644]
src/SelectBasics/FILES
src/SelectBasics/SelectBasics.cdl
src/SelectBasics/SelectBasics_BasicTool.cdl [deleted file]
src/SelectBasics/SelectBasics_BasicTool.cxx [deleted file]
src/SelectBasics/SelectBasics_EntityOwner.cxx
src/SelectBasics/SelectBasics_PickArgs.hxx [deleted file]
src/SelectBasics/SelectBasics_PickResult.hxx [new file with mode: 0644]
src/SelectBasics/SelectBasics_SelectingVolumeManager.hxx [new file with mode: 0644]
src/SelectBasics/SelectBasics_SensitiveEntity.cdl
src/SelectBasics/SelectBasics_SensitiveEntity.cxx
src/SelectBasics/SelectBasics_SensitiveEntity.lxx
src/SelectBasics/SelectBasics_SortAlgo.cdl [deleted file]
src/SelectBasics/SelectBasics_SortAlgo.cxx [deleted file]
src/SelectMgr/FILES
src/SelectMgr/SelectMgr.cdl
src/SelectMgr/SelectMgr_BaseFrustum.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_BaseFrustum.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_EntityOwner.cxx
src/SelectMgr/SelectMgr_Frustum.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_Frustum.lxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_FrustumBuilder.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_FrustumBuilder.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_RectangularFrustum.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_RectangularFrustum.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SelectableObject.cdl
src/SelectMgr/SelectMgr_SelectableObject.cxx
src/SelectMgr/SelectMgr_SelectableObjectSet.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SelectableObjectSet.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_Selection.cdl [deleted file]
src/SelectMgr/SelectMgr_Selection.cxx
src/SelectMgr/SelectMgr_Selection.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_Selection.lxx
src/SelectMgr/SelectMgr_SelectionManager.cdl
src/SelectMgr/SelectMgr_SelectionManager.cxx
src/SelectMgr/SelectMgr_SensitiveEntity.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SensitiveEntity.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SensitiveEntitySet.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SensitiveEntitySet.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_SequenceOfSelection.hxx [moved from src/Select3D/Select3D_SensitiveEntity.lxx with 58% similarity]
src/SelectMgr/SelectMgr_TriangularFrustum.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_TriangularFrustum.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_VectorTypes.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_ViewerSelector.cdl [deleted file]
src/SelectMgr/SelectMgr_ViewerSelector.cxx
src/SelectMgr/SelectMgr_ViewerSelector.hxx [new file with mode: 0644]
src/SelectMgr/SelectMgr_ViewerSelector.lxx
src/StdSelect/FILES [new file with mode: 0644]
src/StdSelect/StdSelect.cdl
src/StdSelect/StdSelect.cxx
src/StdSelect/StdSelect_BRepSelectionTool.cdl
src/StdSelect/StdSelect_BRepSelectionTool.cxx
src/StdSelect/StdSelect_ViewerSelector3d.cdl [deleted file]
src/StdSelect/StdSelect_ViewerSelector3d.cxx
src/StdSelect/StdSelect_ViewerSelector3d.hxx [new file with mode: 0644]
src/StdSelect/StdSelect_ViewerSelector3d.lxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_RelationCommands.cxx
src/Voxel/Voxel_Prs.cdl
tests/bugs/modalg_2/bug22781_2
tests/bugs/modalg_2/bug22781_4
tests/bugs/vis/bug23012
tests/bugs/vis/bug23539_2
tests/bugs/vis/bug23649_3
tests/bugs/vis/bug23649_4
tests/bugs/vis/bug24389
tests/bugs/vis/bug24564
tests/bugs/vis/bug24569
tests/bugs/vis/bug24623_1 [new file with mode: 0644]
tests/bugs/vis/bug24623_2 [new file with mode: 0644]
tests/bugs/vis/bug24623_3 [new file with mode: 0644]
tests/bugs/vis/bug24623_4 [new file with mode: 0644]
tests/bugs/vis/bug25098
tests/bugs/vis/bug25532
tests/bugs/vis/bug25552
tests/bugs/vis/bug25723
tests/bugs/vis/bug25935
tests/v3d/edge_face/E2
tests/v3d/edge_face/E9
tests/v3d/edge_face/J4
tests/v3d/edge_face/K2
tests/v3d/edge_face/O6
tests/v3d/edge_face/P4
tests/v3d/edge_solid/E2
tests/v3d/edge_solid/E9
tests/v3d/edge_solid/J4
tests/v3d/edge_solid/K2
tests/v3d/edge_solid/O6
tests/v3d/edge_solid/P4
tests/v3d/vertex_edge/E7
tests/v3d/vertex_edge/F1
tests/v3d/vertex_edge/J9
tests/v3d/vertex_edge/K1
tests/v3d/vertex_edge/K3
tests/v3d/vertex_face/E7
tests/v3d/vertex_face/F1
tests/v3d/vertex_face/J9
tests/v3d/vertex_face/K1
tests/v3d/vertex_face/K3
tests/v3d/vertex_solid/E7
tests/v3d/vertex_solid/F1
tests/v3d/vertex_solid/J9
tests/v3d/vertex_solid/K3
tests/v3d/vertex_wire/E7
tests/v3d/vertex_wire/F1
tests/v3d/vertex_wire/J9
tests/v3d/vertex_wire/K3
tests/v3d/wire/E9
tests/v3d/wire/F1
tests/v3d/wire/F2
tests/v3d/wire_solid/E2
tests/v3d/wire_solid/E7
tests/v3d/wire_solid/F1
tests/v3d/wire_solid/J4
tests/v3d/wire_solid/J9
tests/v3d/wire_solid/K3