mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +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:
@@ -1009,33 +1009,36 @@ typedef struct _Material
|
||||
Graphic3d_TypeOfMaterial type;
|
||||
} Material;
|
||||
|
||||
static Material theMaterials[] =
|
||||
namespace
|
||||
{
|
||||
{"Brass", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Bronze", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Copper", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Gold", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Pewter", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Plastered", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Plastified", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Silver", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Steel", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Stone", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Shiny_plastified", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Satined", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Metalized", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Ionized", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Chrome", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Aluminium", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Obsidian", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Neon", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Jade", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Charcoal", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Water", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Glass", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Diamond", Graphic3d_MATERIAL_PHYSIC}
|
||||
static const Material theMaterials[] =
|
||||
{
|
||||
{"Brass", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Bronze", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Copper", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Gold", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Pewter", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Plastered", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Plastified", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Silver", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Steel", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Stone", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Shiny_plastified", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Satined", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Metalized", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Ionized", Graphic3d_MATERIAL_ASPECT},
|
||||
{"Chrome", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Aluminium", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Obsidian", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Neon", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Jade", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Charcoal", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Water", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Glass", Graphic3d_MATERIAL_PHYSIC},
|
||||
{"Diamond", Graphic3d_MATERIAL_PHYSIC}
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// =======================================================================
|
||||
// function : NumberOfMaterials
|
||||
|
Reference in New Issue
Block a user