1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-04 13:13:25 +03:00

0026147: Visualization - restore the ability to pick only fully included objects in rectangular selection

2 modes of rectangular selection are available: inclusion-only and overlap-allowing;
The modes can be switched using method AllowOverlapDetection from StdSelect_ViewerSelector3d;
BVH for sensitive entities now builds if there is more than max number of leafs in collection;
Added option -allowoverlap to command vselect;
Interactive rectangular selection in Draw is now available in 2 modes:
- if the user starts selection from upper corners, only fully included objects will be selected;
- if the user starts selection from lower corners, both partially and fully overlapped objects will be selected.
This commit is contained in:
vpa
2015-05-07 18:53:21 +03:00
committed by abv
parent 35c4a17c46
commit 2157d6ac63
44 changed files with 728 additions and 547 deletions

View File

@@ -668,3 +668,15 @@ void StdSelect_ViewerSelector3d::ResetSelectionActivationStatus()
{
resetSelectionActivationStatus();
}
//=======================================================================
//function : AllowOverlapDetection
//purpose : Sets the detection type: if theIsToAllow is false,
// only fully included sensitives will be detected, otherwise
// the algorithm will mark both included and overlapped entities
// as matched
//=======================================================================
void StdSelect_ViewerSelector3d::AllowOverlapDetection (const Standard_Boolean theIsToAllow)
{
mySelectingVolumeMgr.AllowOverlapDetection (theIsToAllow);
}

View File

@@ -87,6 +87,11 @@ public:
Standard_EXPORT virtual Standard_Boolean HasDepthClipping (const Handle(SelectMgr_EntityOwner)& theOwner) const Standard_OVERRIDE;
//! Is used for rectangular selection only
//! If theIsToAllow is false, only fully included sensitives will be detected, otherwise the algorithm will
//! mark both included and overlapped entities as matched
Standard_EXPORT void AllowOverlapDetection (const Standard_Boolean theIsToAllow);
DEFINE_STANDARD_RTTI(StdSelect_ViewerSelector3d)
protected: