mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0030737: Visualization - implementing new selection schemes in context
AIS_SelectionScheme enumeration is defined to set which selection behaviour is used in Select of context AIS_InteractiveContext is corrected to use single Select method instead of combination of Select/ShiftSelect methods with a selection scheme parameter. Upgrade: Select() -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_Replace), ShiftSelect -> SelectDetected/Rectangle/Polygon(AIS_SelectionScheme_XOR)
This commit is contained in:
@@ -246,7 +246,10 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
myAISContext()->SelectRectangle (Graphic3d_Vec2i (theX1, theY1),
|
||||
Graphic3d_Vec2i (theX2, theY2),
|
||||
myView());
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,7 +260,8 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select (Standard_True);
|
||||
myAISContext()->SelectDetected();
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,7 +283,11 @@ public:
|
||||
{
|
||||
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
|
||||
{
|
||||
myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
myAISContext()->SelectRectangle (Graphic3d_Vec2i (theX1, theY1),
|
||||
Graphic3d_Vec2i (theX2, theY2),
|
||||
myView(),
|
||||
AIS_SelectionScheme_XOR);
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +298,8 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect (Standard_True);
|
||||
myAISContext()->SelectDetected (AIS_SelectionScheme_XOR);
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -263,7 +263,10 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
myAISContext()->SelectRectangle (Graphic3d_Vec2i (theX1, theY1),
|
||||
Graphic3d_Vec2i (theX2, theY2),
|
||||
myView());
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -274,7 +277,8 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select (Standard_True);
|
||||
myAISContext()->SelectDetected();
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -296,7 +300,11 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull() && !myView().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
myAISContext()->SelectRectangle (Graphic3d_Vec2i (theX1, theY1),
|
||||
Graphic3d_Vec2i (theX2, theY2),
|
||||
myView(),
|
||||
AIS_SelectionScheme_XOR);
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,7 +315,8 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect (Standard_True);
|
||||
myAISContext()->SelectDetected (AIS_SelectionScheme_XOR);
|
||||
myAISContext()->UpdateCurrentViewer();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user