]> OCCT Git - occt.git/commit
0032886: Visualization, V3d_View - introduce interface for creating a subview CR0-WEEK-15 IR-2022-04-15
authorkgv <kgv@opencascade.com>
Mon, 11 Apr 2022 17:00:39 +0000 (20:00 +0300)
committersmoskvin <smoskvin@opencascade.com>
Fri, 15 Apr 2022 15:23:16 +0000 (18:23 +0300)
commit879768fbf2e2c09089d7cd64a8f93b3c9c47d09c
tree6f434e4b50c1eb2aa347c6bd0bc61febc11eeb86
parent179fb3466168cea55c96450a4328ac21d2a656ab
0032886: Visualization, V3d_View - introduce interface for creating a subview

V3d_View/Graphic3d_CView pair has been extended to define subview within the other V3d_View instance.
The initialization is done in form of V3d_View::SetWindow() taking parent V3d_View instance on input.

Subview definition includes dimensions defined as a fraction of a parent view and offset from a corner.
This scheme allows splitting window into several subviews automatically occupying entire viewport,
like splitting window into two vertial subviews (100%x50% + 100%x50%),
three horizontal subviews (33%x100% + 30%x100% + 30%x100%),
1 + 2 stacked subviews (50%x100% + 50%x50% + 50%x50%),
as well as thumbnail-alike subviews displayed on top of another larger view.

OpenGl_View::Redraw() blits content of subviews into the window within immediate redraw step.

AIS_ViewController::FlushViewEvents() has been extended
to re-calculate mouse input into local subview coordinates.
AIS_ViewController::handleViewRedraw() first redraws subviews and then parent views.
Introduced new callback AIS_ViewController::OnSubviewChanged()
to switch input focus to another subview on mouse click,
implemented by ViewerTest_EventManager (has to be done at application level).

vinit command has been extended with parameters -subview and -parent to create a subview.
In addition, view dimension arguments now can be defined as a fraction of screen size instead of pixels.
34 files changed:
src/AIS/AIS_ViewController.cxx
src/AIS/AIS_ViewController.hxx
src/Aspect/Aspect_Window.hxx
src/D3DHost/D3DHost_View.cxx
src/D3DHost/D3DHost_View.hxx
src/DPrsStd/DPrsStd_AISViewerCommands.cxx
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_CView.hxx
src/OpenGl/OpenGl_GraphicDriver.cxx
src/OpenGl/OpenGl_GraphicDriver.hxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_Window.cxx
src/OpenGl/OpenGl_Window.hxx
src/OpenGl/OpenGl_Window_1.mm
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/V3d/V3d_Viewer.cxx
src/V3d/V3d_Viewer.hxx
src/ViewerTest/ViewerTest.cxx
src/ViewerTest/ViewerTest.hxx
src/ViewerTest/ViewerTest_AutoUpdater.cxx
src/ViewerTest/ViewerTest_EventManager.cxx
src/ViewerTest/ViewerTest_EventManager.hxx
src/ViewerTest/ViewerTest_OpenGlCommands.cxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
src/XDEDRAW/XDEDRAW.cxx
tests/opengl/data/general/multiview1 [new file with mode: 0644]
tests/opengl/data/general/multiview1ssaa [new file with mode: 0644]
tests/opengl/data/general/multiview2 [new file with mode: 0644]
tests/opengl/data/general/multiview3 [new file with mode: 0644]
tests/opengl/data/general/multiview4 [new file with mode: 0644]
tests/opengl/data/general/multiview5 [new file with mode: 0644]
tests/opengl/data/general/multiview6 [new file with mode: 0644]