0029367: Visualization - simplify interface of V3d_View and V3d_Viewer
[occt.git] / src / AIS / AIS_AnimationCamera.hxx
1 // Created by: Anastasia BORISOVA
2 // Copyright (c) 2016 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14
15 #ifndef _AIS_AnimationCamera_HeaderFile
16 #define _AIS_AnimationCamera_HeaderFile
17
18 #include <AIS_Animation.hxx>
19
20 class Graphic3d_Camera;
21 class V3d_View;
22
23 //! Camera animation.
24 class AIS_AnimationCamera : public AIS_Animation
25 {
26   DEFINE_STANDARD_RTTIEXT(AIS_AnimationCamera, AIS_Animation)
27 public:
28
29   //! Main constructor.
30   Standard_EXPORT AIS_AnimationCamera (const TCollection_AsciiString& theAnimationName,
31                                        const Handle(V3d_View)& theView);
32
33   //! Return the target view.
34   const Handle(V3d_View)& View() const { return myView; }
35
36   //! Set target view.
37   void SetView (const Handle(V3d_View)& theView) { myView = theView; }
38
39   //! Return camera start position.
40   const Handle(Graphic3d_Camera)& CameraStart() const { return myCamStart; }
41
42   //! Define camera start position.
43   void SetCameraStart (const Handle(Graphic3d_Camera)& theCameraStart) { myCamStart = theCameraStart; }
44
45   //! Return camera end position.
46   const Handle(Graphic3d_Camera)& CameraEnd() const { return myCamEnd; }
47
48   //! Define camera end position.
49   void SetCameraEnd (const Handle(Graphic3d_Camera)& theCameraEnd) { myCamEnd = theCameraEnd; }
50
51 protected:
52
53   //! Update the progress.
54   Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE;
55
56 protected:
57
58   Handle(V3d_View)         myView;        //!< view to setup camera
59   Handle(Graphic3d_Camera) myCamStart;    //!< starting camera position
60   Handle(Graphic3d_Camera) myCamEnd;      //!< end camera position
61
62 };
63
64 DEFINE_STANDARD_HANDLE(AIS_AnimationCamera, AIS_Animation)
65
66 #endif // _AIS_AnimationCamera_HeaderFile