From 58978f9befdea4c45f867a5194f826f71552d688 Mon Sep 17 00:00:00 2001 From: isz Date: Thu, 16 Apr 2015 12:39:37 +0300 Subject: [PATCH] 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. --- src/ViewerTest/ViewerTest_ViewerCommands.cxx | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) 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(); -- 2.39.5