mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
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.
This commit is contained in:
@@ -47,11 +47,17 @@ public:
|
||||
return Draw_ToExitOnCloseView;
|
||||
}
|
||||
|
||||
//! Use global camera animation object shared across all Views in ViewerTest.
|
||||
Standard_EXPORT static const Handle(AIS_AnimationCamera)& GlobalViewAnimation();
|
||||
|
||||
public:
|
||||
|
||||
//! Main constructor.
|
||||
Standard_EXPORT ViewerTest_EventManager(const Handle(V3d_View)& aView, const Handle(AIS_InteractiveContext)& aCtx);
|
||||
|
||||
|
||||
//! Destructor.
|
||||
Standard_EXPORT virtual ~ViewerTest_EventManager();
|
||||
|
||||
//! Return interactive context.
|
||||
const Handle(AIS_InteractiveContext)& Context() const { return myCtx; }
|
||||
|
||||
|
Reference in New Issue
Block a user