0031440: Visualization - Impossible to make common behaviour for multi-selection...
authormzernova <mzernova@opencascade.com>
Tue, 14 Apr 2020 21:54:32 +0000 (00:54 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 23 Apr 2020 07:44:30 +0000 (10:44 +0300)
commita24a782174bd9ef8482051a46838fa587c2a54d7
tree4ba229fa1538ebe60acc38fa9792cebf7775b031
parent5a2f31c887f4c91232485ea8aa0b312f32b30a5c
0031440: Visualization - Impossible to make common behaviour for multi-selection in viewer

A special mode for the selecting by polygon is added to select only completely overlapping objects.

In order to track the sensitives that were included completely by defined polygon, the boundary points of the polygonal frustrum are stored in the variable myBoundaryPoints.

If an sensitive intersects with at least one of the frustrums from myFrustums, then checking whether this object intersects with borders using the isIntersectBoundary method; if not, then the sensitive were included completely by defined polygon.

Because the polygon can be concave, then to check the sensitive were included completely by defined polygon, it is not enough to check of all its points, it is necessary that the edges of the sensitive do not intersect polygonal frustrum. To do this, for polygonal selection, a call to the Overlaps method for a point was replaced by a call to a segment where necessary.

bugs/vis/bug31440: test case added
14 files changed:
src/AIS/AIS_ViewController.cxx
src/MeshVS/MeshVS_SensitiveQuad.cxx
src/Select3D/Select3D_SensitiveCircle.cxx
src/Select3D/Select3D_SensitivePoly.cxx
src/Select3D/Select3D_SensitiveSegment.cxx
src/Select3D/Select3D_SensitiveTriangle.cxx
src/Select3D/Select3D_SensitiveTriangulation.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.cxx
src/SelectMgr/SelectMgr_SelectingVolumeManager.hxx
src/SelectMgr/SelectMgr_TriangularFrustumSet.cxx
src/SelectMgr/SelectMgr_TriangularFrustumSet.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/bugs/vis/bug27008
tests/bugs/vis/bug31440 [new file with mode: 0644]