1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +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:
kgv
2018-08-17 15:00:11 +03:00
committed by bugmaster
parent 477000eb31
commit 4a056d205b
34 changed files with 548 additions and 258 deletions

View File

@@ -27,3 +27,13 @@ SelectBasics_EntityOwner::SelectBasics_EntityOwner (const Standard_Integer thePr
{
//
}
//========================================
// Function : SelectBasics_EntityOwner
// Purpose :
//========================================
SelectBasics_EntityOwner::SelectBasics_EntityOwner()
: mypriority (0)
{
//
}

View File

@@ -62,7 +62,9 @@ public:
protected:
Standard_EXPORT SelectBasics_EntityOwner (const Standard_Integer thePriority = 0);
Standard_EXPORT SelectBasics_EntityOwner (const Standard_Integer thePriority);
Standard_EXPORT SelectBasics_EntityOwner();
protected:

View File

@@ -46,40 +46,40 @@ public:
//! Returns true if selecting volume is overlapped by box theBox
virtual Standard_Boolean Overlaps (const NCollection_Vec3<Standard_Real>& theBoxMin,
const NCollection_Vec3<Standard_Real>& theBoxMax,
SelectBasics_PickResult& thePickResult) = 0;
SelectBasics_PickResult& thePickResult) const = 0;
//! Returns true if selecting volume is overlapped by axis-aligned bounding box with minimum
//! corner at point theMinPt and maximum at point theMaxPt
virtual Standard_Boolean Overlaps (const NCollection_Vec3<Standard_Real>& theBoxMin,
const NCollection_Vec3<Standard_Real>& theBoxMax,
Standard_Boolean* theInside = NULL) = 0;
Standard_Boolean* theInside = NULL) const = 0;
//! Returns true if selecting volume is overlapped by point thePnt
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt,
SelectBasics_PickResult& thePickResult) = 0;
SelectBasics_PickResult& thePickResult) const = 0;
//! Returns true if selecting volume is overlapped by point thePnt.
//! Does not perform depth calculation, so this method is defined as
//! helper function for inclusion test.
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) = 0;
virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const = 0;
//! Returns true if selecting volume is overlapped by planar convex polygon, which points
//! are stored in theArrayOfPts, taking into account sensitivity type theSensType
virtual Standard_Boolean Overlaps (const Handle(TColgp_HArray1OfPnt)& theArrayOfPts,
Standard_Integer theSensType,
SelectBasics_PickResult& thePickResult) = 0;
SelectBasics_PickResult& thePickResult) const = 0;
//! Returns true if selecting volume is overlapped by planar convex polygon, which points
//! are stored in theArrayOfPts, taking into account sensitivity type theSensType
virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPts,
Standard_Integer theSensType,
SelectBasics_PickResult& thePickResult) = 0;
SelectBasics_PickResult& thePickResult) const = 0;
//! Returns true if selecting volume is overlapped by line segment with start point at thePt1
//! and end point at thePt2
virtual Standard_Boolean Overlaps (const gp_Pnt& thePt1,
const gp_Pnt& thePt2,
SelectBasics_PickResult& thePickResult) = 0;
SelectBasics_PickResult& thePickResult) const = 0;
//! Returns true if selecting volume is overlapped by triangle with vertices thePt1,
//! thePt2 and thePt3, taking into account sensitivity type theSensType
@@ -87,11 +87,11 @@ public:
const gp_Pnt& thePt2,
const gp_Pnt& thePt3,
Standard_Integer theSensType,
SelectBasics_PickResult& thePickResult) = 0;
SelectBasics_PickResult& thePickResult) const = 0;
//! Calculates distance from 3d projection of user-defined selection point
//! to the given point theCOG
virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) = 0;
virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) const = 0;
virtual gp_Pnt DetectedPoint (const Standard_Real theDepth) const = 0;