Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-13 09:15:31

0001 // Created by: Anastasia BORISOVA
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _AIS_AnimationCamera_HeaderFile
0016 #define _AIS_AnimationCamera_HeaderFile
0017 
0018 #include <AIS_Animation.hxx>
0019 
0020 class Graphic3d_Camera;
0021 class V3d_View;
0022 
0023 //! Camera animation.
0024 class AIS_AnimationCamera : public AIS_Animation
0025 {
0026   DEFINE_STANDARD_RTTIEXT(AIS_AnimationCamera, AIS_Animation)
0027 public:
0028   //! Main constructor.
0029   Standard_EXPORT AIS_AnimationCamera(const TCollection_AsciiString& theAnimationName,
0030                                       const occ::handle<V3d_View>&   theView);
0031 
0032   //! Return the target view.
0033   const occ::handle<V3d_View>& View() const { return myView; }
0034 
0035   //! Set target view.
0036   void SetView(const occ::handle<V3d_View>& theView) { myView = theView; }
0037 
0038   //! Return camera start position.
0039   const occ::handle<Graphic3d_Camera>& CameraStart() const { return myCamStart; }
0040 
0041   //! Define camera start position.
0042   void SetCameraStart(const occ::handle<Graphic3d_Camera>& theCameraStart)
0043   {
0044     myCamStart = theCameraStart;
0045   }
0046 
0047   //! Return camera end position.
0048   const occ::handle<Graphic3d_Camera>& CameraEnd() const { return myCamEnd; }
0049 
0050   //! Define camera end position.
0051   void SetCameraEnd(const occ::handle<Graphic3d_Camera>& theCameraEnd) { myCamEnd = theCameraEnd; }
0052 
0053 protected:
0054   //! Update the progress.
0055   Standard_EXPORT void update(const AIS_AnimationProgress& theProgress) override;
0056 
0057 protected:
0058   occ::handle<V3d_View>         myView;     //!< view to setup camera
0059   occ::handle<Graphic3d_Camera> myCamStart; //!< starting camera position
0060   occ::handle<Graphic3d_Camera> myCamEnd;   //!< end camera position
0061 };
0062 
0063 #endif // _AIS_AnimationCamera_HeaderFile