1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0028668: Point Cloud Rendering - standard selection API returns invalid values

Added an argument to OpenGl_GraphicDriver::GetSharedContext() for returning only currently bound OpenGL context.
SelectMgr_SelectingVolumeManager::GetMousePosition() - added getter returning mouse coordinates.
This commit is contained in:
kgv
2019-05-30 10:02:25 +03:00
committed by bugmaster
parent edc4ba21c4
commit b30b2c1381
5 changed files with 31 additions and 9 deletions

View File

@@ -133,6 +133,9 @@ public:
//! correspondingly) onto far view frustum plane
inline const gp_Pnt& GetFarPnt() const { return myFarPickedPnt; }
//! Return mouse coordinates.
const gp_Pnt2d& GetMousePosition() const { return myMousePos; }
//! Stores plane equation coefficients (in the following form:
//! Ax + By + Cz + D = 0) to the given vector
Standard_EXPORT virtual void GetPlanes (NCollection_Vector<SelectMgr_Vec4>& thePlaneEquations) const Standard_OVERRIDE;

View File

@@ -196,6 +196,17 @@ public:
//! correspondingly) onto far view frustum plane
Standard_EXPORT virtual gp_Pnt GetFarPickedPnt() const Standard_OVERRIDE;
//! Return mouse coordinates for Point selection mode.
virtual gp_Pnt2d GetMousePosition() const Standard_OVERRIDE
{
if (myActiveSelectionType != Point)
{
return gp_Pnt2d (RealLast(), RealLast());
}
const SelectMgr_RectangularFrustum* aFr = reinterpret_cast<const SelectMgr_RectangularFrustum*> (mySelectingVolumes[myActiveSelectionType / 2].get());
return aFr->GetMousePosition();
}
//! Returns active selecting volume that was built during last
//! run of OCCT selection mechanism
Handle(SelectMgr_BaseFrustum) ActiveVolume() const