mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +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:
@@ -314,8 +314,7 @@ Standard_Boolean Select3D_SensitiveGroup::overlapsElement (SelectBasics_Selectin
|
||||
theMatchDepth = RealLast();
|
||||
const Standard_Integer aSensitiveIdx = myBVHPrimIndexes.Value (theElemIdx);
|
||||
SelectBasics_PickResult aResult;
|
||||
Standard_Boolean isMatching = myEntities.Value (aSensitiveIdx)->Matches (theMgr, aResult);
|
||||
if (isMatching)
|
||||
if (myEntities.Value (aSensitiveIdx)->Matches (theMgr, aResult))
|
||||
{
|
||||
theMatchDepth = aResult.Depth();
|
||||
return Standard_True;
|
||||
@@ -324,6 +323,17 @@ Standard_Boolean Select3D_SensitiveGroup::overlapsElement (SelectBasics_Selectin
|
||||
return Standard_False;
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : elementIsInside
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Boolean Select3D_SensitiveGroup::elementIsInside (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
const Standard_Integer theElemIdx)
|
||||
{
|
||||
Standard_Real aDummy;
|
||||
return overlapsElement(theMgr, theElemIdx, aDummy);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : distanceToCOG
|
||||
// purpose : Calculates distance from the 3d projection of used-picked
|
||||
|
Reference in New Issue
Block a user