1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0028281: Draw Harness - remove unused command vperf

This commit is contained in:
kgv 2016-12-25 20:07:39 +03:00 committed by apn
parent 09f30297f4
commit 5c20836e0d
2 changed files with 0 additions and 94 deletions

View File

@ -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:

View File

@ -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.",