1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0027611: Visualization - provide an interface to access selection frustum center points from SelectBasics level

- getters for rectangular frustum center points were added to SelectBasics_SelectingVolumeManager
This commit is contained in:
vpa
2016-06-16 14:38:19 +03:00
committed by bugmaster
parent d7b1999736
commit 21a8e27535
5 changed files with 36 additions and 10 deletions

View File

@@ -114,9 +114,15 @@ public:
//! 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; }
//! 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; }
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 far view frustum plane
inline const gp_Pnt& GetFarPnt() const { return myFarPickedPnt; }
protected:
Standard_EXPORT void segmentSegmentDistance (const gp_Pnt& theSegPnt1,

View File

@@ -430,10 +430,10 @@ const gp_Pnt* SelectMgr_SelectingVolumeManager::GetVertices() const
}
//=======================================================================
// function : GetNearPnt
// function : GetNearPickedPnt
// purpose :
//=======================================================================
gp_Pnt SelectMgr_SelectingVolumeManager::GetNearPnt() const
gp_Pnt SelectMgr_SelectingVolumeManager::GetNearPickedPnt() const
{
if (myActiveSelectionType == Polyline)
return gp_Pnt();
@@ -444,10 +444,10 @@ gp_Pnt SelectMgr_SelectingVolumeManager::GetNearPnt() const
}
//=======================================================================
// function : GetFarPnt
// function : GetFarPickedPnt
// purpose :
//=======================================================================
gp_Pnt SelectMgr_SelectingVolumeManager::GetFarPnt() const
gp_Pnt SelectMgr_SelectingVolumeManager::GetFarPickedPnt() const
{
if (myActiveSelectionType == Polyline)
return gp_Pnt();

View File

@@ -171,9 +171,17 @@ public:
//! A set of helper functions that return rectangular selecting frustum data
Standard_EXPORT const gp_Pnt* GetVertices() const;
Standard_EXPORT gp_Pnt GetNearPnt() 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;
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 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