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

0026886: Visualization, TKV3d - eliminate global variables

- AIS_InteractiveContext - create new dummy class field to have an empty TopoDS_Shape object.
- AIS_Point, PrsMgr_PresentableObject - rename static variables to local function variables.
- AIS_Shape, SelectMgr_SelectableObject - remove unused static variables.
- Graphic3d_MaterialAspect, V3d_Viewer - make global static variables as constant.
- V3d_View - move global variable zRotation to class field.
- Move a variable theCurrentSelection as a field of AIS_InteractiveContext and AIS_LocalContext classes. Multiple selection is not used now, so each Context have an own selection.
- Move myStructGenId from Graphic3d_StructureManager to Graphic3d_GraphicDriver for identifying the structures in the driver.
- Move default variable (no shading light) from static value to the class field of OpenGL_View.
Porting note:
- Static methods of AIS_Selection is not used now. Methods of
  AIS_InteractiveContext::InitSelected(),::MoreSelected(),::NextSelected()
  should be used instead of static methods of AIS_Selection.
This commit is contained in:
mpa
2016-04-08 09:47:47 +03:00
committed by bugmaster
parent 83da37b115
commit 016e595986
39 changed files with 313 additions and 778 deletions

View File

@@ -70,8 +70,6 @@
IMPLEMENT_STANDARD_RTTIEXT(AIS_Shape,AIS_InteractiveObject)
static Standard_Boolean myFirstCompute;
static Standard_Boolean IsInList(const TColStd_ListOfInteger& LL, const Standard_Integer aMode)
{
TColStd_ListIteratorOfListOfInteger It(LL);
@@ -92,7 +90,6 @@ AIS_InteractiveObject(PrsMgr_TOP_ProjectorDependant),
myInitAng(0.)
{
Set (shap);
myFirstCompute = Standard_True;
SetHilightMode(0);
myDrawer->SetShadingAspectGlobal(Standard_False);
}
@@ -398,8 +395,7 @@ void AIS_Shape::ComputeSelection(const Handle(SelectMgr_Selection)& aSelection,
return;
}
static TopAbs_ShapeEnum TypOfSel;
TypOfSel = AIS_Shape::SelectionType(aMode);
TopAbs_ShapeEnum TypOfSel = AIS_Shape::SelectionType(aMode);
TopoDS_Shape shape = myshape;
// POP protection against crash in low layers