mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0032365: Visualization - refactoring of viewer selector
Add SelectMgr_BaseIntersector class as base intersector that can have any geometry not only frustum. Remove cached static array of selecting volumes from selecting volume manager. Keep only one the latest active selection volume. Change initialization interface of active volume frustum inside of selecting volume manager: Init*SelectingVolume(), set required parameters, BuildSelectingVolume(). Mark existing BuildSelectingVolume() methods as deprecated. Use SelectMgr_SelectionType instead of SelectBasics_SelectingVolumeManager::SelectionType (the last one is marked as deprecated). Add interface GetViewRayDirection() to selecting volume manager to get view ray direction (instead of computation it as vector from near to far point). Add interface IsScalableActiveVolume() to selecting volume manager to check possibility of scaling of current active selecting volume.
This commit is contained in:
@@ -2983,10 +2983,11 @@ AIS_StatusOfPick AIS_InteractiveContext::SelectDetected (const AIS_SelectionSche
|
||||
if (theSelScheme == AIS_SelectionScheme_Replace && !myLastPicked.IsNull())
|
||||
{
|
||||
Graphic3d_Vec2i aMousePos (-1, -1);
|
||||
if (myMainSel->GetManager().GetActiveSelectionType() == SelectBasics_SelectingVolumeManager::Point)
|
||||
gp_Pnt2d aMouseRealPos = myMainSel->GetManager().GetMousePosition();
|
||||
if (!Precision::IsInfinite (aMouseRealPos.X()) &&
|
||||
!Precision::IsInfinite (aMouseRealPos.Y()))
|
||||
{
|
||||
aMousePos.SetValues ((Standard_Integer )myMainSel->GetManager().GetMousePosition().X(),
|
||||
(Standard_Integer )myMainSel->GetManager().GetMousePosition().Y());
|
||||
aMousePos.SetValues ((Standard_Integer )aMouseRealPos.X(), (Standard_Integer )aMouseRealPos.Y());
|
||||
}
|
||||
if (myLastPicked->HandleMouseClick (aMousePos, Aspect_VKeyMouse_LeftButton, Aspect_VKeyFlags_NONE, false))
|
||||
{
|
||||
|
Reference in New Issue
Block a user