0028954: Visualization - implement interactive object for camera manipulations
authoraba <aba@opencascade.com>
Wed, 3 Jul 2019 09:37:36 +0000 (12:37 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 19 Jul 2019 09:23:01 +0000 (12:23 +0300)
commit2108d9a25b0eebf69e4e3fcaa6b02e67b3f3e349
tree04bf3846836ea3d0dcbfcf85de0eaca2b309b941
parente8dec5e17143cb9ce4e1fcae1af14e4456de102d
0028954: Visualization - implement interactive object for camera manipulations

Added new class AIS_ViewCube implementing interactive cube
displaying orientation of the main axes of the model space in the viewer.
Each side, edge, or corner of the cube corresponds to particular orientation of the camera,
and the class provides methods to move the camera to corresponding position (with animation if needed).

AIS_InteractiveContext::LastActiveView(), added new property returning the last View processed by MoveTo() event.
AIS_InteractiveContext::BoundingBoxOfSelection(), added method returning bounding box of selected objects.
SelectMgr_EntityOwner::HandleMouseClick(), added new callback for handling
mouse clicks by owner itself without automatic highlighting and clearing previous selection.
Called by AIS_InteractiveContext::Select() method.

AIS_ViewController::ViewAnimation() has been extened with camera animation propery,
which can be bound to AIS_ViewCube for smooth embedding into event loop.

Prs3d_ToolDisk has been extended with parameters specifying angle range.
Graphic3d_MaterialAspect now initializes all coefficients to 1.0
when Graphic3d_NOM_UserDefined is passed to class constructor.
AIS_AnimationCamera::update() now sets the end camera position if animation duration is 0.
Prs3d_DatumAspect, added missing setters.

New command vviewcube has been added.
22 files changed:
src/AIS/AIS_AnimationCamera.cxx
src/AIS/AIS_AnimationCamera.hxx
src/AIS/AIS_InteractiveContext.cxx
src/AIS/AIS_InteractiveContext.hxx
src/AIS/AIS_InteractiveContext_1.cxx
src/AIS/AIS_ViewController.cxx
src/AIS/AIS_ViewController.hxx
src/AIS/AIS_ViewCube.cxx [new file with mode: 0644]
src/AIS/AIS_ViewCube.hxx [new file with mode: 0644]
src/AIS/FILES
src/Graphic3d/Graphic3d_MaterialAspect.cxx
src/Prs3d/Prs3d_DatumAspect.hxx
src/Prs3d/Prs3d_ToolDisk.cxx
src/Prs3d/Prs3d_ToolDisk.hxx
src/SelectMgr/SelectMgr_EntityOwner.hxx
src/ViewerTest/ViewerTest_EventManager.cxx
src/ViewerTest/ViewerTest_EventManager.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/v3d/grids.list
tests/v3d/viewcube/default [new file with mode: 0644]
tests/v3d/viewcube/style [new file with mode: 0644]
tests/v3d/viewcube/view [new file with mode: 0644]