// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.
-#include <ViewerTest_EventManager.ixx>
+#include <ViewerTest_EventManager.hxx>
+
+#include <AIS_AnimationCamera.hxx>
#include <AIS_InteractiveContext.hxx>
+#include <AIS_Shape.hxx>
#include <Aspect_Grid.hxx>
-#include <NIS_View.hxx>
+#include <Draw.hxx>
+#include <ViewerTest_ContinuousRedrawer.hxx>
+#include <ViewerTest_V3dView.hxx>
+
+Standard_IMPORT Standard_Boolean Draw_Interprete (const char* theCommand);
+
+IMPLEMENT_STANDARD_RTTIEXT(ViewerTest_EventManager,Standard_Transient)
//=======================================================================
-//function : ViewerTest_EventManager
+//function : GlobalViewAnimation
//purpose :
//=======================================================================
+const Handle(AIS_AnimationCamera)& ViewerTest_EventManager::GlobalViewAnimation()
+{
+ static Handle(AIS_AnimationCamera) THE_CAMERA_ANIM = new AIS_AnimationCamera ("ViewerTest_EventManager_ViewAnimation", Handle(V3d_View)());
+ return THE_CAMERA_ANIM;
+}
+//=======================================================================
+//function : ViewerTest_EventManager
+//purpose :
+//=======================================================================
ViewerTest_EventManager::ViewerTest_EventManager (const Handle(V3d_View)& theView,
const Handle(AIS_InteractiveContext)& theCtx)
: myCtx (theCtx),
myView (theView),
- myX (-1),
- myY (-1)
-{}
+ myToPickPnt (Standard_False),
+ myIsTmpContRedraw (Standard_False)
+{
+ myViewAnimation = GlobalViewAnimation();
+
+ addActionHotKeys (Aspect_VKey_NavForward, Aspect_VKey_W, Aspect_VKey_W | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavBackward , Aspect_VKey_S, Aspect_VKey_S | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavSlideLeft, Aspect_VKey_A, Aspect_VKey_A | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavSlideRight, Aspect_VKey_D, Aspect_VKey_D | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavRollCCW, Aspect_VKey_Q, Aspect_VKey_Q | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavRollCW, Aspect_VKey_E, Aspect_VKey_E | Aspect_VKeyFlags_SHIFT);
+
+ addActionHotKeys (Aspect_VKey_NavSpeedIncrease, Aspect_VKey_Plus, Aspect_VKey_Plus | Aspect_VKeyFlags_SHIFT,
+ Aspect_VKey_Equal,
+ Aspect_VKey_NumpadAdd, Aspect_VKey_NumpadAdd | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavSpeedDecrease, Aspect_VKey_Minus, Aspect_VKey_Minus | Aspect_VKeyFlags_SHIFT,
+ Aspect_VKey_NumpadSubtract, Aspect_VKey_NumpadSubtract | Aspect_VKeyFlags_SHIFT);
+
+ addActionHotKeys (Aspect_VKey_NavLookUp, Aspect_VKey_Up);
+ addActionHotKeys (Aspect_VKey_NavLookDown, Aspect_VKey_Down);
+ addActionHotKeys (Aspect_VKey_NavLookLeft, Aspect_VKey_Left);
+ addActionHotKeys (Aspect_VKey_NavLookRight, Aspect_VKey_Right);
+ addActionHotKeys (Aspect_VKey_NavSlideLeft, Aspect_VKey_Left | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavSlideRight, Aspect_VKey_Right | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavSlideUp, Aspect_VKey_Up | Aspect_VKeyFlags_SHIFT);
+ addActionHotKeys (Aspect_VKey_NavSlideDown, Aspect_VKey_Down | Aspect_VKeyFlags_SHIFT);
+}
//=======================================================================
-//function : MoveTo
+//function : ~ViewerTest_EventManager
//purpose :
//=======================================================================
-
-void ViewerTest_EventManager::MoveTo (const Standard_Integer theXPix,
- const Standard_Integer theYPix)
+ViewerTest_EventManager::~ViewerTest_EventManager()
{
- Standard_Real aPnt3d[3] = {0.0, 0.0, 0.0};
- if (!myCtx.IsNull()
- && !myView.IsNull())
- {
- const Standard_Boolean toEchoGrid = myView->Viewer()->Grid()->IsActive()
- && myView->Viewer()->GridEcho();
- switch (myCtx->MoveTo (theXPix, theYPix, myView, !toEchoGrid))
- {
- case AIS_SOD_Nothing:
- {
- if (toEchoGrid)
- {
- myView->ConvertToGrid (theXPix, theYPix, aPnt3d[0], aPnt3d[1], aPnt3d[2]);
- myView->Viewer()->ShowGridEcho (myView, Graphic3d_Vertex (aPnt3d[0], aPnt3d[1], aPnt3d[2]));
- myView->RedrawImmediate();
- }
- break;
- }
- default:
- {
- if (toEchoGrid)
- {
- myView->Viewer()->HideGridEcho (myView);
- myView->RedrawImmediate();
- }
- break;
- }
- }
- }
-
- myX = theXPix;
- myY = theYPix;
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast(myView);
- if (!aView.IsNull())
+ if (!myViewAnimation.IsNull()
+ && myViewAnimation->View() == myView)
{
- aView->DynamicHilight (theXPix, theYPix);
+ myViewAnimation->Stop();
+ myViewAnimation->SetView (Handle(V3d_View)());
}
}
//=======================================================================
-//function : Select
+//function : UpdateMouseButtons
//purpose :
//=======================================================================
-
-void ViewerTest_EventManager::Select (const Standard_Integer theXPMin,
- const Standard_Integer theYPMin,
- const Standard_Integer theXPMax,
- const Standard_Integer theYPMax)
+bool ViewerTest_EventManager::UpdateMouseButtons (const Graphic3d_Vec2i& thePoint,
+ Aspect_VKeyMouse theButtons,
+ Aspect_VKeyFlags theModifiers,
+ bool theIsEmulated)
{
- #define IS_FULL_INCLUSION Standard_True
- if (myView.IsNull()
- || Abs (theXPMax - theXPMin) < 2
- || Abs (theYPMax - theYPMin) < 2)
- {
- return;
- }
- else if (!myCtx.IsNull())
- {
- myCtx->Select (theXPMin, theYPMin, theXPMax, theYPMax, myView, Standard_False);
- }
+ SetAllowRotation (!ViewerTest_V3dView::IsCurrentViewIn2DMode());
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast (myView);
- if (!aView.IsNull())
+ if (theButtons == Aspect_VKeyMouse_LeftButton)
{
- aView->Select (theXPMin, theYPMin, theXPMax, theYPMax, Standard_False, IS_FULL_INCLUSION, Standard_False);
+ if (myToPickPnt && (theModifiers & Aspect_VKeyFlags_CTRL) != 0)
+ {
+ Graphic3d_Vec3d anXYZ;
+ myView->Convert (thePoint.x(), thePoint.y(), anXYZ.x(), anXYZ.y(), anXYZ.z());
+ Draw::Set (myPickPntArgVec[0].ToCString(), anXYZ.x());
+ Draw::Set (myPickPntArgVec[1].ToCString(), anXYZ.y());
+ Draw::Set (myPickPntArgVec[2].ToCString(), anXYZ.z());
+ myToPickPnt = false;
+ }
}
- myView->Redraw();
+
+ return AIS_ViewController::UpdateMouseButtons (thePoint, theButtons, theModifiers, theIsEmulated);
}
-//=======================================================================
-//function : ShiftSelect
+//==============================================================================
+//function : ProcessExpose
//purpose :
-//=======================================================================
-
-void ViewerTest_EventManager::ShiftSelect (const Standard_Integer theXPMin,
- const Standard_Integer theYPMin,
- const Standard_Integer theXPMax,
- const Standard_Integer theYPMax)
+//==============================================================================
+void ViewerTest_EventManager::ProcessExpose()
{
- if (myView.IsNull()
- || Abs (theXPMax - theXPMin) < 2
- || Abs (theYPMax - theYPMin) < 2)
+ if (!myView.IsNull())
{
- return;
+ myView->Invalidate();
+ FlushViewEvents (myCtx, myView, true);
}
- else if (!myCtx.IsNull())
+}
+
+//==============================================================================
+//function : handleViewRedraw
+//purpose :
+//==============================================================================
+void ViewerTest_EventManager::handleViewRedraw (const Handle(AIS_InteractiveContext)& theCtx,
+ const Handle(V3d_View)& theView)
+{
+ AIS_ViewController::handleViewRedraw (theCtx, theView);
+
+ // On non-Windows platforms Aspect_Window::InvalidateContent() from rendering thread does not work as expected
+ // as in Tcl event loop the new message might go to sleep with new event remaining in queue.
+ // As a workaround - use dedicated background thread to ping Tcl event loop.
+ if (myToAskNextFrame)
{
- myCtx->AIS_InteractiveContext::ShiftSelect (theXPMin, theYPMin, theXPMax, theYPMax, myView, Standard_False);
+ ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance();
+ if (!myIsTmpContRedraw
+ && (!aRedrawer.IsStarted() || aRedrawer.IsPaused()))
+ {
+ myIsTmpContRedraw = true;
+ #ifndef _WIN32
+ aRedrawer.Start (theView->Window(), 60.0);
+ #endif
+ }
}
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast (myView);
- if (!aView.IsNull())
+ else if (myIsTmpContRedraw)
{
- aView->Select (theXPMin, theYPMin, theXPMax, theYPMax, Standard_True, IS_FULL_INCLUSION, Standard_False);
+ myIsTmpContRedraw = false;
+ #ifndef _WIN32
+ ViewerTest_ContinuousRedrawer& aRedrawer = ViewerTest_ContinuousRedrawer::Instance();
+ aRedrawer.Pause();
+ #endif
}
- myView->Redraw();
}
-//=======================================================================
-//function : Select
+//==============================================================================
+//function : ProcessConfigure
//purpose :
-//=======================================================================
-
-void ViewerTest_EventManager::Select()
+//==============================================================================
+void ViewerTest_EventManager::ProcessConfigure()
{
- if (myView.IsNull())
- {
- return;
- }
- else if (!myCtx.IsNull())
+ if (!myView.IsNull())
{
- myCtx->Select (Standard_False);
+ myView->MustBeResized();
+ FlushViewEvents (myCtx, myView, true);
}
+}
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast (myView);
- if (!aView.IsNull())
+// =======================================================================
+// function : navigationKeyModifierSwitch
+// purpose :
+// =======================================================================
+bool ViewerTest_EventManager::navigationKeyModifierSwitch (unsigned int theModifOld,
+ unsigned int theModifNew,
+ double theTimeStamp)
+{
+ bool hasActions = false;
+ for (unsigned int aKeyIter = 0; aKeyIter < Aspect_VKey_ModifiersLower; ++aKeyIter)
{
- aView->Select (myX, myY, Standard_False);
+ if (!myKeys.IsKeyDown (aKeyIter))
+ {
+ continue;
+ }
+
+ Aspect_VKey anActionOld = Aspect_VKey_UNKNOWN, anActionNew = Aspect_VKey_UNKNOWN;
+ myNavKeyMap.Find (aKeyIter | theModifOld, anActionOld);
+ myNavKeyMap.Find (aKeyIter | theModifNew, anActionNew);
+ if (anActionOld == anActionNew)
+ {
+ continue;
+ }
+
+ if (anActionOld != Aspect_VKey_UNKNOWN)
+ {
+ myKeys.KeyUp (anActionOld, theTimeStamp);
+ }
+ if (anActionNew != Aspect_VKey_UNKNOWN)
+ {
+ hasActions = true;
+ myKeys.KeyDown (anActionNew, theTimeStamp);
+ }
}
- myView->Redraw();
+ return hasActions;
}
//=======================================================================
-//function : ShiftSelect
+//function : KeyDown
//purpose :
//=======================================================================
-
-void ViewerTest_EventManager::ShiftSelect()
+void ViewerTest_EventManager::KeyDown (Aspect_VKey theKey,
+ double theTime,
+ double thePressure)
{
- if (myView.IsNull())
- {
- return;
- }
- else if (!myCtx.IsNull())
+ const unsigned int aModifOld = myKeys.Modifiers();
+ AIS_ViewController::KeyDown (theKey, theTime, thePressure);
+
+ const unsigned int aModifNew = myKeys.Modifiers();
+ if (aModifNew != aModifOld
+ && navigationKeyModifierSwitch (aModifOld, aModifNew, theTime))
{
- myCtx->ShiftSelect (Standard_False);
+ // modifier key just pressed
}
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast (myView);
- if (!aView.IsNull())
+ Aspect_VKey anAction = Aspect_VKey_UNKNOWN;
+ if (myNavKeyMap.Find (theKey | myKeys.Modifiers(), anAction)
+ && anAction != Aspect_VKey_UNKNOWN)
{
- aView->Select (myX, myY, Standard_False);
+ AIS_ViewController::KeyDown (anAction, theTime, thePressure);
}
- myView->Redraw();
}
//=======================================================================
-//function : Select
-//purpose : Selection with polyline
+//function : KeyUp
+//purpose :
//=======================================================================
-
-void ViewerTest_EventManager::Select (const TColgp_Array1OfPnt2d& thePolyline)
+void ViewerTest_EventManager::KeyUp (Aspect_VKey theKey,
+ double theTime)
{
- if (myView.IsNull())
- {
- return;
- }
- else if (!myCtx.IsNull())
+ const unsigned int aModifOld = myKeys.Modifiers();
+ AIS_ViewController::KeyUp (theKey, theTime);
+
+ Aspect_VKey anAction = Aspect_VKey_UNKNOWN;
+ if (myNavKeyMap.Find (theKey | myKeys.Modifiers(), anAction)
+ && anAction != Aspect_VKey_UNKNOWN)
{
- myCtx->Select (thePolyline, myView, Standard_False);
+ AIS_ViewController::KeyUp (anAction, theTime);
+ ProcessKeyPress (anAction);
}
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast(myView);
- if (!aView.IsNull())
+ const unsigned int aModifNew = myKeys.Modifiers();
+ if (aModifNew != aModifOld
+ && navigationKeyModifierSwitch (aModifOld, aModifNew, theTime))
{
- NCollection_List<gp_XY> aPolylist;
- for(Standard_Integer anIter = thePolyline.Lower(); anIter <= thePolyline.Upper(); ++anIter)
- {
- aPolylist.Append (gp_XY (thePolyline.Value (anIter).X(), thePolyline.Value (anIter).Y()));
- }
- aView->Select (aPolylist, Standard_False, Standard_False, Standard_False);
+ // modifier key released
}
- myView->Redraw();
-}
-//=======================================================================
-//function : ShiftSelect
-//purpose : Selection with polyline without erasing of current selection
-//=======================================================================
+ ProcessKeyPress (theKey | aModifNew);
+}
-void ViewerTest_EventManager::ShiftSelect (const TColgp_Array1OfPnt2d& thePolyline)
+//==============================================================================
+//function : ProcessKeyPress
+//purpose :
+//==============================================================================
+void ViewerTest_EventManager::ProcessKeyPress (Aspect_VKey theKey)
{
- if (myView.IsNull())
+ if (myCtx.IsNull()
+ || myView.IsNull())
{
return;
}
- else if (!myCtx.IsNull())
+
+ switch (theKey)
{
- myCtx->ShiftSelect (thePolyline, myView, Standard_False);
+ case Aspect_VKey_Backspace: // AXO
+ {
+ if (!ViewerTest_V3dView::IsCurrentViewIn2DMode())
+ {
+ myView->SetProj(V3d_XposYnegZpos);
+ }
+ break;
+ }
+ case Aspect_VKey_F:
+ {
+ if (myCtx->NbSelected() > 0)
+ {
+ myCtx->FitSelected (myView);
+ }
+ else
+ {
+ myView->FitAll();
+ }
+ break;
+ }
+ case Aspect_VKey_H: // HLR
+ {
+ std::cout << "HLR\n";
+ myView->SetComputedMode (!myView->ComputedMode());
+ myView->Redraw();
+ break;
+ }
+ case Aspect_VKey_P: // Type of HLR
+ {
+ myCtx->DefaultDrawer()->SetTypeOfHLR (myCtx->DefaultDrawer()->TypeOfHLR() == Prs3d_TOH_Algo
+ ? Prs3d_TOH_PolyAlgo
+ : Prs3d_TOH_Algo);
+ if (myCtx->NbSelected() == 0)
+ {
+ AIS_ListOfInteractive aListOfShapes;
+ myCtx->DisplayedObjects (aListOfShapes);
+ for (AIS_ListIteratorOfListOfInteractive anIter (aListOfShapes); anIter.More(); anIter.Next())
+ {
+ if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (anIter.Value()))
+ {
+ aShape->SetTypeOfHLR (aShape->TypeOfHLR() == Prs3d_TOH_PolyAlgo
+ ? Prs3d_TOH_Algo
+ : Prs3d_TOH_PolyAlgo);
+ myCtx->Redisplay (aShape, Standard_False);
+ }
+ }
+ }
+ else
+ {
+ for (myCtx->InitSelected(); myCtx->MoreSelected(); myCtx->NextSelected())
+ {
+ if (Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast (myCtx->SelectedInteractive()))
+ {
+ aShape->SetTypeOfHLR (aShape->TypeOfHLR() == Prs3d_TOH_PolyAlgo
+ ? Prs3d_TOH_Algo
+ : Prs3d_TOH_PolyAlgo);
+ myCtx->Redisplay (aShape, Standard_False);
+ }
+ }
+ }
+ myCtx->UpdateCurrentViewer();
+ break;
+ }
+ case Aspect_VKey_S | Aspect_VKeyFlags_CTRL:
+ case Aspect_VKey_W | Aspect_VKeyFlags_CTRL:
+ {
+ Standard_Integer aDispMode = AIS_Shaded;
+ if (theKey == (Aspect_VKey_S | Aspect_VKeyFlags_CTRL))
+ {
+ aDispMode = AIS_Shaded;
+ std::cout << "setup Shaded display mode\n";
+ }
+ else
+ {
+ aDispMode = AIS_WireFrame;
+ std::cout << "setup WireFrame display mode\n";
+ }
+
+ if (myCtx->NbSelected() == 0)
+ {
+ myCtx->SetDisplayMode (aDispMode, true);
+ }
+ else
+ {
+ for (myCtx->InitSelected(); myCtx->MoreSelected(); myCtx->NextSelected())
+ {
+ myCtx->SetDisplayMode (myCtx->SelectedInteractive(), aDispMode, false);
+ }
+ myCtx->UpdateCurrentViewer();
+ }
+ break;
+ }
+ case Aspect_VKey_U: // Unset display mode
+ {
+ std::cout << "reset display mode to defaults\n";
+ if (myCtx->NbSelected() == 0)
+ {
+ myCtx->SetDisplayMode (AIS_WireFrame, true);
+ }
+ else
+ {
+ for (myCtx->InitSelected(); myCtx->MoreSelected(); myCtx->NextSelected())
+ {
+ myCtx->UnsetDisplayMode (myCtx->SelectedInteractive(), false);
+ }
+ myCtx->UpdateCurrentViewer();
+ }
+ break;
+ }
+ case Aspect_VKey_T:
+ {
+ if (!ViewerTest_V3dView::IsCurrentViewIn2DMode())
+ {
+ myView->SetProj (V3d_TypeOfOrientation_Zup_Top);
+ }
+ break;
+ }
+ case Aspect_VKey_B:
+ {
+ if (!ViewerTest_V3dView::IsCurrentViewIn2DMode())
+ {
+ myView->SetProj (V3d_TypeOfOrientation_Zup_Bottom);
+ }
+ break;
+ }
+ case Aspect_VKey_L:
+ {
+ if (!ViewerTest_V3dView::IsCurrentViewIn2DMode())
+ {
+ myView->SetProj (V3d_TypeOfOrientation_Zup_Left);
+ }
+ break;
+ }
+ case Aspect_VKey_R:
+ {
+ if (!ViewerTest_V3dView::IsCurrentViewIn2DMode())
+ {
+ myView->SetProj (V3d_TypeOfOrientation_Zup_Right);
+ }
+ break;
+ }
+ case Aspect_VKey_Comma:
+ {
+ myCtx->HilightNextDetected (myView);
+ break;
+ }
+ case Aspect_VKey_Period:
+ {
+ myCtx->HilightPreviousDetected (myView);
+ break;
+ }
+ case Aspect_VKey_Slash:
+ case Aspect_VKey_NumpadDivide:
+ {
+ Handle(Graphic3d_Camera) aCamera = myView->Camera();
+ if (aCamera->IsStereo())
+ {
+ aCamera->SetIOD (aCamera->GetIODType(), aCamera->IOD() - 0.01);
+ myView->Redraw();
+ }
+ break;
+ }
+ case Aspect_VKey_NumpadMultiply:
+ {
+ Handle(Graphic3d_Camera) aCamera = myView->Camera();
+ if (aCamera->IsStereo())
+ {
+ aCamera->SetIOD (aCamera->GetIODType(), aCamera->IOD() + 0.01);
+ myView->Redraw();
+ }
+ break;
+ }
+ case Aspect_VKey_Delete:
+ {
+ if (!myCtx.IsNull()
+ && myCtx->NbSelected() > 0)
+ {
+ Draw_Interprete ("verase");
+ }
+ break;
+ }
+ case Aspect_VKey_Escape:
+ {
+ if (!myCtx.IsNull()
+ && ViewerTest_EventManager::ToCloseViewOnEscape())
+ {
+ Draw_Interprete (ViewerTest_EventManager::ToExitOnCloseView() ? "exit" : "vclose");
+ }
+ break;
+ }
+ case Aspect_VKey_NavSpeedDecrease:
+ case Aspect_VKey_NavSpeedIncrease:
+ {
+ // handle slide speed
+ float aNewSpeed = theKey == Aspect_VKey_NavSpeedDecrease
+ ? myWalkSpeedRelative * 0.5f
+ : myWalkSpeedRelative * 2.0f;
+ if (aNewSpeed >= 0.00001f
+ && aNewSpeed <= 10.0f)
+ {
+ if (Abs (aNewSpeed - 0.1f) < 0.001f)
+ {
+ aNewSpeed = 0.1f;
+ }
+ myWalkSpeedRelative = aNewSpeed;
+ }
+ break;
+ }
}
- const Handle(NIS_View) aView = Handle(NIS_View)::DownCast (myView);
- if (!aView.IsNull())
+ if (theKey >= Aspect_VKey_0
+ && theKey <= Aspect_VKey_7)
{
- NCollection_List<gp_XY> aPolylist;
- for (Standard_Integer anIter = thePolyline.Lower(); anIter <= thePolyline.Upper(); ++anIter)
+ const Standard_Integer aSelMode = theKey - Aspect_VKey_0;
+ bool toEnable = true;
+ if (!myCtx.IsNull())
{
- aPolylist.Append (gp_XY (thePolyline.Value (anIter).X(), thePolyline.Value (anIter).Y()));
+ AIS_ListOfInteractive aPrsList;
+ myCtx->DisplayedObjects (aPrsList);
+ for (AIS_ListOfInteractive::Iterator aPrsIter (aPrsList); aPrsIter.More() && toEnable; aPrsIter.Next())
+ {
+ TColStd_ListOfInteger aModes;
+ myCtx->ActivatedModes (aPrsIter.Value(), aModes);
+ for (TColStd_ListOfInteger::Iterator aModeIter (aModes); aModeIter.More() && toEnable; aModeIter.Next())
+ {
+ if (aModeIter.Value() == aSelMode)
+ {
+ toEnable = false;
+ }
+ }
+ }
}
- aView->Select (aPolylist, Standard_True, Standard_False, Standard_False);
+ TCollection_AsciiString aCmd = TCollection_AsciiString ("vselmode ") + aSelMode + (toEnable ? " 1" : " 0");
+ Draw_Interprete (aCmd.ToCString());
}
- myView->Redraw();
}