1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-19 13:40:49 +03:00

0027969: Visualization - add interfaces to access selecting volumes from SelectMgr_SelectingVolumeManager

- getter for selection frustum computed during last run of selection mechanism was added to SelectMgr_SelectingVolumeManager;
- getters for frustum planes were added to SelectMgr_BaseFrustum and its successors;
- an API for applications to get frustum planes was added to SelectBasics_SelectingVolumeManager.
This commit is contained in:
vpa
2016-10-19 19:11:23 +03:00
committed by apn
parent dd115e1227
commit 871dcdc201
9 changed files with 101 additions and 0 deletions

View File

@@ -196,6 +196,29 @@ public:
//! correspondingly) onto far view frustum plane
Standard_EXPORT virtual gp_Pnt GetFarPickedPnt() const Standard_OVERRIDE;
//! Returns active selecting volume that was built during last
//! run of OCCT selection mechanism
Handle(SelectMgr_BaseFrustum) ActiveVolume() const
{
if (myActiveSelectionType == Unknown)
return Handle(SelectMgr_BaseFrustum)();
return mySelectingVolumes[myActiveSelectionType / 2];
}
//! Stores plane equation coefficients (in the following form:
//! Ax + By + Cz + D = 0) to the given vector
virtual void GetPlanes (NCollection_Vector<SelectMgr_Vec4>& thePlaneEquations) const Standard_OVERRIDE
{
if (myActiveSelectionType == Unknown)
{
thePlaneEquations.Clear();
return;
}
return mySelectingVolumes[myActiveSelectionType / 2]->GetPlanes (thePlaneEquations);
}
private:
enum { Frustum, FrustumSet, VolumeTypesNb }; //!< Defines the amount of available selecting volumes