From 5c20836e0dcd972f8a9ef39cefeb4063fa80944d Mon Sep 17 00:00:00 2001 From: kgv Date: Sun, 25 Dec 2016 20:07:39 +0300 Subject: [PATCH] 0028281: Draw Harness - remove unused command vperf --- .../draw_test_harness/draw_test_harness.md | 20 ----- src/ViewerTest/ViewerTest.cxx | 74 ------------------- 2 files changed, 94 deletions(-) diff --git a/dox/user_guides/draw_test_harness/draw_test_harness.md b/dox/user_guides/draw_test_harness/draw_test_harness.md index 7884b813cc..fae482f325 100644 --- a/dox/user_guides/draw_test_harness/draw_test_harness.md +++ b/dox/user_guides/draw_test_harness/draw_test_harness.md @@ -1964,26 +1964,6 @@ vsensera Erases active entities. -@subsubsection occt_draw_4_3_22 vperf - -Syntax: -~~~~~ -vperf shapename 1/0 (Transformation/Loacation) 1/0 (Primitives sensibles ON/OFF) -~~~~~ - -Tests the animation of an object along a predefined trajectory. - -**Example:** -~~~~~ -vinit -box b 10 10 10 -psphere s 20 -vdisplay b s -vfit -vsetdispmode 0 -vperf b 1 1 -~~~~~ - @subsubsection occt_draw_4_3_23 vr Syntax: diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index c6725bf7e7..cdd4b33656 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -4025,75 +4025,6 @@ static int VUpdate (Draw_Interpretor& /*theDi*/, Standard_Integer theArgsNb, con return 0; } -//============================================================================== -//function : VPerf -//purpose : Test the annimation of an object along a -// predifined trajectory -//Draw arg : vperf ShapeName 1/0(Transfo/Location) 1/0(Primitives sensibles ON/OFF) -//============================================================================== - -static int VPerf(Draw_Interpretor& di, Standard_Integer , const char** argv) { - - OSD_Timer myTimer; - Standard_Real Step=4*M_PI/180; - Standard_Real Angle=0; - - Handle(AIS_InteractiveObject) aIO; - if (GetMapOfAIS().IsBound2(argv[1])) - aIO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(argv[1])); - if (aIO.IsNull()) - return 1; - - Handle(AIS_Shape) aShape = Handle(AIS_Shape)::DownCast(aIO); - - myTimer.Start(); - - if (Draw::Atoi(argv[3])==1 ) { - di<<" Primitives sensibles OFF\n"; - TheAISContext()->Deactivate(aIO); - } - else { - di<<" Primitives sensibles ON\n"; - } - // Movement par transformation - if(Draw::Atoi(argv[2]) ==1) { - di<<" Calcul par Transformation\n"; - for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) { - - Angle=Step*myAngle; - gp_Trsf myTransfo; - myTransfo.SetRotation(gp_Ax1(gp_Pnt(0,0,0),gp_Dir(0,0,1) ) ,Angle ); - TheAISContext()->SetLocation(aShape,myTransfo); - TheAISContext() ->UpdateCurrentViewer(); - - } - } - else { - di<<" Calcul par Locations\n"; - gp_Trsf myAngleTrsf; - myAngleTrsf.SetRotation(gp_Ax1(gp_Pnt(0,0,0),gp_Dir(0,0,1) ), Step ); - TopLoc_Location myDeltaAngle (myAngleTrsf); - TopLoc_Location myTrueLoc; - - for (Standard_Real myAngle=0;Angle<10*2*M_PI; myAngle++) { - - Angle=Step*myAngle; - myTrueLoc=myTrueLoc*myDeltaAngle; - TheAISContext()->SetLocation(aShape,myTrueLoc ); - TheAISContext() ->UpdateCurrentViewer(); - } - } - if (Draw::Atoi(argv[3])==1 ){ - // On reactive la selection des primitives sensibles - TheAISContext()->Activate(aIO,0); - } - a3DView() -> Redraw(); - myTimer.Stop(); - di<<" Temps ecoule \n"; - myTimer.Show(); - return 0; -} - //============================================================================== //function : VShading //purpose : Sharpen or roughten the quality of the shading @@ -5795,11 +5726,6 @@ void ViewerTest::Commands(Draw_Interpretor& theCommands) "vsensera : erase active entities", __FILE__,VClearSensi,group); - theCommands.Add("vperf", - "vperf: vperf ShapeName 1/0(Transfo/Location) 1/0(Primitives sensibles ON/OFF)" - "\n\t\t: Tests the animation of an object along a predefined trajectory.", - __FILE__,VPerf,group); - theCommands.Add("vsetshading", "vsetshading : vsetshading name Quality(default=0.0008) " "\n\t\t: Sets deflection coefficient that defines the quality of the shape representation in the shading mode.",