1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0024996: Visualization - newly displayed objects are clipped until first

camera movement

AutoZFit operation now may be applied on Visual3d_View level.
Visual3d_View tracks Graphic3d_Structure updates and call AutoZFit within
Visual3d_View::Redraw if necessary.
In order to get AutoZFit functionality on Visual3d_View level ZfitAll
method moved from V3d_View into Graphic3d_Camera. AutoZFit method and
AutoZFitMode flag now part of Visual3d_View.

Test case for issue CR24996
This commit is contained in:
duv
2014-07-17 13:46:53 +04:00
committed by bugmaster
parent 9dba391d4c
commit 6bc6a6fc07
11 changed files with 480 additions and 339 deletions

View File

@@ -2480,7 +2480,7 @@ static int VZFit (Draw_Interpretor& /*theDi*/, Standard_Integer theArgsNb, const
if (theArgsNb == 1)
{
aCurrentView->ZFitAll();
aCurrentView->View()->ZFitAll();
aCurrentView->Redraw();
return 0;
}
@@ -2492,7 +2492,7 @@ static int VZFit (Draw_Interpretor& /*theDi*/, Standard_Integer theArgsNb, const
aScale = Draw::Atoi (theArgVec[1]);
}
aCurrentView->ZFitAll (aScale);
aCurrentView->View()->ZFitAll (aScale);
aCurrentView->Redraw();
return 0;
@@ -2851,7 +2851,7 @@ static int VTestZBuffTrihedron(Draw_Interpretor& di, Standard_Integer argc, cons
return 1;
}
V3dView->ZFitAll();
V3dView->View()->ZFitAll();
return 0;
}
@@ -5671,7 +5671,7 @@ static int VAutoZFit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const
return 1;
}
Standard_Real aScale = aCurrentView->AutoZFitScaleFactor();
Standard_Real aScale = aCurrentView->View()->AutoZFitScaleFactor();
if (theArgsNb > 3)
{
@@ -5682,7 +5682,7 @@ static int VAutoZFit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const
if (theArgsNb < 2)
{
theDi << "Auto z-fit mode: " << "\n"
<< "On: " << (aCurrentView->AutoZFitMode() ? "enabled" : "disabled") << "\n"
<< "On: " << (aCurrentView->View()->AutoZFitMode() ? "enabled" : "disabled") << "\n"
<< "Scale: " << aScale << "\n";
return 0;
}
@@ -5694,8 +5694,8 @@ static int VAutoZFit (Draw_Interpretor& theDi, Standard_Integer theArgsNb, const
aScale = Draw::Atoi (theArgVec[2]);
}
aCurrentView->SetAutoZFitMode (isOn, aScale);
aCurrentView->AutoZFit();
aCurrentView->View()->SetAutoZFitMode (isOn, aScale);
aCurrentView->View()->AutoZFit();
aCurrentView->Redraw();
return 0;
@@ -5810,7 +5810,7 @@ static int VChangeCamera (Draw_Interpretor& theDi, Standard_Integer theArgsNb, c
return 1;
}
ViewerTest::CurrentView()->AutoZFit();
ViewerTest::CurrentView()->View()->AutoZFit();
ViewerTest::CurrentView()->Redraw();
return 0;