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:
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user