1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +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

@@ -120,35 +120,35 @@ public:
//! SAT intersection test between defined volume and given axis-aligned box
Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin,
const SelectMgr_Vec3& theBoxMax,
SelectBasics_PickResult& thePickResult);
SelectBasics_PickResult& thePickResult) const;
//! Returns true if selecting volume is overlapped by axis-aligned bounding box
//! with minimum corner at point theMinPt and maximum at point theMaxPt
Standard_EXPORT virtual Standard_Boolean Overlaps (const SelectMgr_Vec3& theBoxMin,
const SelectMgr_Vec3& theBoxMax,
Standard_Boolean* theInside = NULL);
Standard_Boolean* theInside = NULL) const;
//! Intersection test between defined volume and given point
Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt,
SelectBasics_PickResult& thePickResult);
SelectBasics_PickResult& thePickResult) const;
//! Intersection test between defined volume and given point
//! Does not perform depth calculation, so this method is defined as
//! helper function for inclusion test. Therefore, its implementation
//! makes sense only for rectangular frustum with box selection mode activated.
Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt);
Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt) const;
//! SAT intersection test between defined volume and given ordered set of points,
//! representing line segments. The test may be considered of interior part or
//! boundary line defined by segments depending on given sensitivity type
Standard_EXPORT virtual Standard_Boolean Overlaps (const TColgp_Array1OfPnt& theArrayOfPnts,
Select3D_TypeOfSensitivity theSensType,
SelectBasics_PickResult& thePickResult);
SelectBasics_PickResult& thePickResult) const;
//! Checks if line segment overlaps selecting frustum
Standard_EXPORT virtual Standard_Boolean Overlaps (const gp_Pnt& thePnt1,
const gp_Pnt& thePnt2,
SelectBasics_PickResult& thePickResult);
SelectBasics_PickResult& thePickResult) const;
//! SAT intersection test between defined volume and given triangle. The test may
//! be considered of interior part or boundary line defined by triangle vertices
@@ -157,18 +157,18 @@ public:
const gp_Pnt& thePt2,
const gp_Pnt& thePt3,
Select3D_TypeOfSensitivity theSensType,
SelectBasics_PickResult& thePickResult);
SelectBasics_PickResult& thePickResult) const;
//! Measures distance between 3d projection of user-picked
//! screen point and given point theCOG
Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG);
Standard_EXPORT virtual Standard_Real DistToGeometryCenter (const gp_Pnt& theCOG) const;
Standard_EXPORT virtual gp_Pnt DetectedPoint (const Standard_Real theDepth) const;
//! Checks if the point of sensitive in which selection was detected belongs
//! to the region defined by clipping planes
Standard_EXPORT virtual Standard_Boolean IsClipped (const Graphic3d_SequenceOfHClipPlane& thePlanes,
const Standard_Real theDepth);
const Standard_Real theDepth) const;
//! Valid for point selection only!
//! Computes depth range for global (defined for the whole view) clipping planes.