mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0030058: Visualization, Select3D_SensitivePrimitiveArray - the selection is not fast enough
Select3D_SensitiveSet::Matches() has been improved to check if BVH node is fully included by selection volume and pass this information to overlapsElement()/elementIsInside() interfaces to avoid expensive partial overlapping checks for individual elements. Select3D_SensitivePrimitiveArray implements this new interface to improve partial overlapping performance. Select3D_SensitivePrimitiveArray::Matches() now handles rectangle selection for sub-elements when Elements map is defined. Added missing const to SelectMgr_BaseFrustum::Overlaps() methods. AIS_PointCloud has been extended with new selection mode for collecting selected nodes Draw Harness command vdrawparray has been extended with an option -shape allowing to create a triangulation from tessellated shape.
This commit is contained in:
@@ -326,9 +326,10 @@ Standard_Integer Select3D_SensitiveGroup::Size() const
|
||||
// purpose : Checks whether the entity with index theIdx overlaps the
|
||||
// current selecting volume
|
||||
// =======================================================================
|
||||
Standard_Boolean Select3D_SensitiveGroup::overlapsElement (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
Standard_Boolean Select3D_SensitiveGroup::overlapsElement (SelectBasics_PickResult& thePickResult,
|
||||
SelectBasics_SelectingVolumeManager& theMgr,
|
||||
Standard_Integer theElemIdx,
|
||||
SelectBasics_PickResult& thePickResult)
|
||||
Standard_Boolean )
|
||||
{
|
||||
const Standard_Integer aSensitiveIdx = myBVHPrimIndexes.Value (theElemIdx);
|
||||
if (myEntities.FindKey (aSensitiveIdx)->Matches (theMgr, thePickResult))
|
||||
@@ -344,10 +345,11 @@ Standard_Boolean Select3D_SensitiveGroup::overlapsElement (SelectBasics_Selectin
|
||||
// purpose :
|
||||
// =======================================================================
|
||||
Standard_Boolean Select3D_SensitiveGroup::elementIsInside (SelectBasics_SelectingVolumeManager& theMgr,
|
||||
const Standard_Integer theElemIdx)
|
||||
Standard_Integer theElemIdx,
|
||||
Standard_Boolean theIsFullInside)
|
||||
{
|
||||
SelectBasics_PickResult aDummy;
|
||||
return overlapsElement(theMgr, theElemIdx, aDummy);
|
||||
return overlapsElement (aDummy, theMgr, theElemIdx, theIsFullInside);
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
|
Reference in New Issue
Block a user