0024776: Visualization - inherit OpenGl_View from Graphic3d_CView
authorapl <apl@opencascade.com>
Tue, 22 Sep 2015 08:49:33 +0000 (11:49 +0300)
committerkgv <kgv@opencascade.com>
Tue, 22 Sep 2015 08:49:33 +0000 (11:49 +0300)
commitc357e42610e01960a257dcbd4890ab5c6a2bf144
treecef2556a7bee47993e97c5ea1b7386c7369d397b
parent97d87ffa94b3b37671eb3484fe0c1f33a0a26a8f
0024776: Visualization - inherit OpenGl_View from Graphic3d_CView

Expose interface of OpenGl_View (OpenGL graphics rendering methods) to client code
and collecting all high-level API methods of application views in V3d_View class.

1) Exposing interface of OpenGl_View:

The OpenGl_View inherits from new class Graphic3d_CView.
Graphic3d_CView is an interface class that declares abstract methods for managing displayed structures,
display properties and a base layer code that implements computation
and management of HLR (or more broadly speaking view-depended) structures.

In new implementation it takes place of eliminated Visual3d_View.
As before the instance of Graphic3d_CView is still completely managed by V3d_View classes.
It can be accessed through V3d_View interface but normally this should not be required as all its methods are completely wrapped.

In more details, a concrete specialization of Graphic3d_CView is created and returned by graphical driver on request.
Right after creation the views is directly used for setting rendering properties and adding graphical structures to be displayed.

The rendering of graphics is possible after mapping a window and activating the view.
The direct setting of properties makes obsolete usage of intermediate structures with display parameter
like Visual3d_ContextView and etc (the whole package of Visual3d become redundant).

2) Collecting all high-level API methods of application views in V3d package:

The patch includes elimination of Visual3d layer.
All of its methods that could be previously used by application are now exposed and should be accessed on the level of V3d entities.
- Introduced new class Graphic3d_CView.
  This is a base class for render views.
  Made possible to specialize concrete instances of the class by graphical driver.
- Moved all methods managing rendering views into interface of Graphic3d_CView.
  The corresponding methods were removed from interface of graphical driver.

3) Eliminated Visual3d package:

- Logic of managing display of structures was put from Visual3d_ViewManager into Graphic3d_StructureManager.
- Removed Visual3d_View class. Logic of managing computed structures was put into base layer of Graphi3d_CView.
- Removed all intermediate structures for storing view parameters e.g. Visual3d_ContextView.
  All settings are kept by instances of Graphic3d_CView
- Removed Visual3d_Light intermediate class.
  All light properties are still stored in Graphic3d_CLight structure.
  The structure is directly access by instance of V3d_Light classes.
- Moved all needed enumerations into Graphic3d package.

4) Update package D3DHost to new changes.

5) Update code of OCCT samples to new changes.
169 files changed:
adm/UDLIST
samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp
samples/mfc/standard/03_Viewer2d/src/StdAfx.h
samples/mfc/standard/Common/OCC_3dView.cpp
samples/mfc/standard/Common/OCC_BaseDoc.cpp
samples/mfc/standard/Common/StdAfx.h
samples/qt/Common/src/View.cxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext_1.cxx
src/AIS/AIS_InteractiveContext_2.cxx
src/AIS/AIS_LocalContext.cxx
src/AIS/AIS_LocalContext_1.cxx
src/Aspect/Aspect_GraphicCallbackProc.hxx
src/D3DHost/D3DHost_GraphicDriver.cxx
src/D3DHost/D3DHost_GraphicDriver.hxx
src/D3DHost/D3DHost_View.cxx [new file with mode: 0644]
src/D3DHost/D3DHost_View.hxx [new file with mode: 0644]
src/D3DHost/D3DHost_Workspace.cxx [deleted file]
src/D3DHost/D3DHost_Workspace.hxx [deleted file]
src/D3DHost/FILES
src/Graphic3d/FILES
src/Graphic3d/Graphic3d_CAspectFillArea.hxx
src/Graphic3d/Graphic3d_CAspectLine.hxx
src/Graphic3d/Graphic3d_CAspectMarker.hxx
src/Graphic3d/Graphic3d_CAspectText.hxx
src/Graphic3d/Graphic3d_CLight.hxx
src/Graphic3d/Graphic3d_CStructure.hxx
src/Graphic3d/Graphic3d_CView.cxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_Camera.cxx
src/Graphic3d/Graphic3d_GraduatedTrihedron.hxx
src/Graphic3d/Graphic3d_GraphicDriver.cxx
src/Graphic3d/Graphic3d_GraphicDriver.hxx
src/Graphic3d/Graphic3d_Group.cxx
src/Graphic3d/Graphic3d_MaterialAspect.hxx
src/Graphic3d/Graphic3d_Structure.cxx
src/Graphic3d/Graphic3d_StructureManager.cxx
src/Graphic3d/Graphic3d_StructureManager.hxx
src/Graphic3d/Graphic3d_TextureEnv.hxx
src/Graphic3d/Graphic3d_TypeOfAnswer.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfBackfacingModel.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfLightSource.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfShadingModel.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfSurfaceDetail.hxx [new file with mode: 0644]
src/Graphic3d/Graphic3d_TypeOfVisualization.hxx [new file with mode: 0644]
src/InterfaceGraphic/FILES
src/InterfaceGraphic/InterfaceGraphic_Aspect.hxx [deleted file]
src/InterfaceGraphic/InterfaceGraphic_Visual3d.hxx [deleted file]
src/OpenGl/FILES
src/OpenGl/OpenGl_CView.hxx [deleted file]
src/OpenGl/OpenGl_Context.cxx
src/OpenGl/OpenGl_Context.hxx
src/OpenGl/OpenGl_GraduatedTrihedron.cxx
src/OpenGl/OpenGl_GraduatedTrihedron.hxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_GraphicDriver.hxx
src/OpenGl/OpenGl_GraphicDriver_4.cxx [deleted file]
src/OpenGl/OpenGl_GraphicDriver_7.cxx [deleted file]
src/OpenGl/OpenGl_GraphicDriver_713.cxx [deleted file]
src/OpenGl/OpenGl_GraphicDriver_Export.cxx [deleted file]
src/OpenGl/OpenGl_Group.cxx
src/OpenGl/OpenGl_Layer.cxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_LayerList.hxx
src/OpenGl/OpenGl_Light.hxx
src/OpenGl/OpenGl_MapOfZLayerSettings.hxx [new file with mode: 0644]
src/OpenGl/OpenGl_ShaderManager.cxx
src/OpenGl/OpenGl_ShaderManager.hxx
src/OpenGl/OpenGl_ShaderStates.hxx
src/OpenGl/OpenGl_Text.cxx
src/OpenGl/OpenGl_Trihedron.cxx
src/OpenGl/OpenGl_Trihedron.hxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_View_2.cxx [deleted file]
src/OpenGl/OpenGl_View_Print.cxx [new file with mode: 0644]
src/OpenGl/OpenGl_View_Raytrace.cxx
src/OpenGl/OpenGl_View_Redraw.cxx [new file with mode: 0644]
src/OpenGl/OpenGl_Window.cxx
src/OpenGl/OpenGl_Window.hxx
src/OpenGl/OpenGl_Window_1.mm
src/OpenGl/OpenGl_Workspace.cxx
src/OpenGl/OpenGl_Workspace.hxx
src/OpenGl/OpenGl_Workspace_2.cxx [deleted file]
src/OpenGl/OpenGl_Workspace_5.cxx [deleted file]
src/OpenGl/OpenGl_telem_util.cxx
src/PrsMgr/PrsMgr_Presentation.cxx
src/PrsMgr/PrsMgr_PresentationManager.cxx
src/PrsMgr/PrsMgr_PresentationManager.hxx
src/PrsMgr/PrsMgr_PresentationManager.lxx
src/QABugs/QABugs_8.cxx
src/StdSelect/StdSelect_ViewerSelector3d.cxx
src/TKV3d/CMakeLists.txt
src/TKV3d/PACKAGES
src/V3d/V3d.cxx
src/V3d/V3d.hxx
src/V3d/V3d_AmbientLight.cxx
src/V3d/V3d_AmbientLight.hxx
src/V3d/V3d_CircularGrid.cxx
src/V3d/V3d_DirectionalLight.cxx
src/V3d/V3d_DirectionalLight.hxx
src/V3d/V3d_Light.cxx
src/V3d/V3d_Light.hxx
src/V3d/V3d_Plane.cxx
src/V3d/V3d_PositionLight.cxx
src/V3d/V3d_PositionLight.hxx
src/V3d/V3d_PositionalLight.cxx
src/V3d/V3d_PositionalLight.hxx
src/V3d/V3d_RectangularGrid.cxx
src/V3d/V3d_SpotLight.cxx
src/V3d/V3d_SpotLight.hxx
src/V3d/V3d_TypeOfShadingModel.hxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/V3d/V3d_View_1.cxx
src/V3d/V3d_View_2.cxx
src/V3d/V3d_View_3.cxx
src/V3d/V3d_View_4.cxx
src/V3d/V3d_View_5.cxx
src/V3d/V3d_View_Print.cxx
src/V3d/V3d_Viewer.cxx
src/V3d/V3d_Viewer.hxx
src/V3d/V3d_Viewer_1.cxx
src/V3d/V3d_Viewer_2.cxx
src/V3d/V3d_Viewer_3.cxx
src/V3d/V3d_Viewer_4.cxx
src/ViewerTest/ViewerTest_ObjectCommands.cxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/Visual3d/FILES [deleted file]
src/Visual3d/Visual3d_ClipDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_ContextPick.cxx [deleted file]
src/Visual3d/Visual3d_ContextPick.hxx [deleted file]
src/Visual3d/Visual3d_ContextPickDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_ContextView.cxx [deleted file]
src/Visual3d/Visual3d_ContextView.hxx [deleted file]
src/Visual3d/Visual3d_DepthCueingDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_HSequenceOfLight.hxx [deleted file]
src/Visual3d/Visual3d_HSequenceOfView.hxx [deleted file]
src/Visual3d/Visual3d_LayerDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_Light.cxx [deleted file]
src/Visual3d/Visual3d_Light.hxx [deleted file]
src/Visual3d/Visual3d_LightDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_MapOfZLayerSettings.hxx [deleted file]
src/Visual3d/Visual3d_NListOfLayerItem.hxx [deleted file]
src/Visual3d/Visual3d_PickError.hxx [deleted file]
src/Visual3d/Visual3d_SequenceOfLight.hxx [deleted file]
src/Visual3d/Visual3d_SequenceOfView.hxx [deleted file]
src/Visual3d/Visual3d_TransformError.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfAnswer.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfBackfacingModel.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfLightSource.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfModel.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfOrder.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfProjection.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfSurfaceDetail.hxx [deleted file]
src/Visual3d/Visual3d_TypeOfVisualization.hxx [deleted file]
src/Visual3d/Visual3d_View.cxx [deleted file]
src/Visual3d/Visual3d_View.hxx [deleted file]
src/Visual3d/Visual3d_ViewDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_ViewManager.cxx [deleted file]
src/Visual3d/Visual3d_ViewManager.hxx [deleted file]
src/Visual3d/Visual3d_ViewManagerDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_ViewManagerPtr.hxx [deleted file]
src/Visual3d/Visual3d_ViewMappingDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_ViewOrientationDefinitionError.hxx [deleted file]
src/Visual3d/Visual3d_ViewPtr.hxx [deleted file]
src/Visual3d/Visual3d_ZClippingDefinitionError.hxx [deleted file]
tests/bugs/vis/bug25671