From: isz Date: Thu, 16 Apr 2015 09:39:37 +0000 (+0300) Subject: 0025959: Draw Harness - do not turn on Z-clipping implicitly by mouse ring X-Git-Tag: V6_9_0_beta2~19 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=58978f9befdea4c45f867a5194f826f71552d688;p=occt-copy.git 0025959: Draw Harness - do not turn on Z-clipping implicitly by mouse ring Clipping planes now can not be switched on by mouse ring or both right and left mouse buttons. To do this, user has to press certain button or call certain command. --- diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 607da14f1f..ed99269971 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -1656,29 +1656,24 @@ void ProcessZClipMotion() { Handle(V3d_View) a3DView = ViewerTest::CurrentView(); if ( Abs(X_Motion - X_ButtonPress) > 2 ) { - static Standard_Real CurZPos = 0.; //Quantity_Length VDX, VDY; //a3DView->Size(VDX,VDY); //Standard_Real VDZ = a3DView->ZSize(); //printf("View size (%lf,%lf,%lf)\n", VDX, VDY, VDZ); - Quantity_Length dx = a3DView->Convert(X_Motion - X_ButtonPress); + Quantity_Length aDx = a3DView->Convert(X_Motion - X_ButtonPress); // Front = Depth + width/2. - Standard_Real D = 0.5; - Standard_Real W = 0.1; + Standard_Real aDepth = 0.5; + Standard_Real aWidth = 0.1; + a3DView->ZClipping(aDepth,aWidth); - CurZPos += (dx); - - D += CurZPos; + aDepth += aDx; //printf("dx %lf Depth %lf Width %lf\n", dx, D, W); - a3DView->SetZClippingType(V3d_OFF); - a3DView->SetZClippingDepth(D); - a3DView->SetZClippingWidth(W); - a3DView->SetZClippingType(V3d_FRONT); + a3DView->SetZClippingDepth(aDepth); a3DView->Redraw();