- getters for rectangular frustum center points were added to SelectBasics_SelectingVolumeManager
aMgr->BuildSelectingVolume (aPxPnt1);
}
const gp_Pnt* aVerts = aMgr->GetVertices();
- gp_Pnt aNearPnt = aMgr->GetNearPnt();
- gp_Pnt aFarPnt = aMgr->GetFarPnt();
+ gp_Pnt aNearPnt = aMgr->GetNearPickedPnt();
+ gp_Pnt aFarPnt = aMgr->GetFarPickedPnt();
BRepBuilderAPI_MakePolygon aWireBldrs[4];
aWireBldrs[0].Add (gp_Pnt (aVerts[0].X(), aVerts[0].Y(), aVerts[0].Z()));
virtual Standard_Boolean IsOverlapAllowed() const = 0;
+ //! Valid only for point and rectangular selection.
+ //! Returns projection of 2d mouse picked point or projection
+ //! of center of 2d rectangle (for point and rectangular selection
+ //! correspondingly) onto near view frustum plane
+ virtual gp_Pnt GetNearPickedPnt() const = 0;
+
+ //! Valid only for point and rectangular selection.
+ //! Returns projection of 2d mouse picked point or projection
+ //! of center of 2d rectangle (for point and rectangular selection
+ //! correspondingly) onto far view frustum plane
+ virtual gp_Pnt GetFarPickedPnt() const = 0;
+
protected:
SelectionType myActiveSelectionType; //!< Active selection type: point, box or polyline
};
//! A set of helper functions that return rectangular selecting frustum data
inline const gp_Pnt* GetVertices() const { return myVertices; }
- inline gp_Pnt GetNearPnt() const { return myNearPickedPnt; }
-
- inline gp_Pnt GetFarPnt() const { return myFarPickedPnt; }
+ //! Returns projection of 2d mouse picked point or projection
+ //! of center of 2d rectangle (for point and rectangular selection
+ //! correspondingly) onto near view frustum plane
+ inline const gp_Pnt& GetNearPnt() const { return myNearPickedPnt; }
+
+ //! Returns projection of 2d mouse picked point or projection
+ //! of center of 2d rectangle (for point and rectangular selection
+ //! correspondingly) onto far view frustum plane
+ inline const gp_Pnt& GetFarPnt() const { return myFarPickedPnt; }
protected:
Standard_EXPORT void segmentSegmentDistance (const gp_Pnt& theSegPnt1,
}
//=======================================================================
-// function : GetNearPnt
+// function : GetNearPickedPnt
// purpose :
//=======================================================================
-gp_Pnt SelectMgr_SelectingVolumeManager::GetNearPnt() const
+gp_Pnt SelectMgr_SelectingVolumeManager::GetNearPickedPnt() const
{
if (myActiveSelectionType == Polyline)
return gp_Pnt();
}
//=======================================================================
-// function : GetFarPnt
+// function : GetFarPickedPnt
// purpose :
//=======================================================================
-gp_Pnt SelectMgr_SelectingVolumeManager::GetFarPnt() const
+gp_Pnt SelectMgr_SelectingVolumeManager::GetFarPickedPnt() const
{
if (myActiveSelectionType == Polyline)
return gp_Pnt();
//! A set of helper functions that return rectangular selecting frustum data
Standard_EXPORT const gp_Pnt* GetVertices() const;
- Standard_EXPORT gp_Pnt GetNearPnt() const;
-
- Standard_EXPORT gp_Pnt GetFarPnt() const;
+ //! Valid only for point and rectangular selection.
+ //! Returns projection of 2d mouse picked point or projection
+ //! of center of 2d rectangle (for point and rectangular selection
+ //! correspondingly) onto near view frustum plane
+ Standard_EXPORT virtual gp_Pnt GetNearPickedPnt() const Standard_OVERRIDE;
+
+ //! Valid only for point and rectangular selection.
+ //! Returns projection of 2d mouse picked point or projection
+ //! of center of 2d rectangle (for point and rectangular selection
+ //! correspondingly) onto far view frustum plane
+ Standard_EXPORT virtual gp_Pnt GetFarPickedPnt() const Standard_OVERRIDE;
private:
enum { Frustum, FrustumSet, VolumeTypesNb }; //!< Defines the amount of available selecting volumes