Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-18 09:19:26

0001 // Copyright (c) 2023 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _AIS_AnimationAxisRotation_HeaderFile
0015 #define _AIS_AnimationAxisRotation_HeaderFile
0016 
0017 #include <AIS_BaseAnimationObject.hxx>
0018 #include <gp_TrsfNLerp.hxx>
0019 
0020 //! Animation defining object transformation.
0021 class AIS_AnimationAxisRotation : public AIS_BaseAnimationObject
0022 {
0023   DEFINE_STANDARD_RTTIEXT(AIS_AnimationAxisRotation, AIS_BaseAnimationObject)
0024 public:
0025   //! Constructor with initialization.
0026   //! @param[in] theAnimationName animation identifier
0027   //! @param[in] theContext       interactive context where object have been displayed
0028   //! @param[in] theObject        object to apply rotation
0029   //! @param[in] theAxis          rotation axis
0030   //! @param[in] theAngleStart    rotation angle at the start of animation
0031   //! @param[in] theAngleEnd      rotation angle at the end   of animation
0032   Standard_EXPORT AIS_AnimationAxisRotation(const TCollection_AsciiString& theAnimationName,
0033                                             const occ::handle<AIS_InteractiveContext>& theContext,
0034                                             const occ::handle<AIS_InteractiveObject>&  theObject,
0035                                             const gp_Ax1&                              theAxis,
0036                                             const double theAngleStart,
0037                                             const double theAngleEnd);
0038 
0039 protected:
0040   //! Update the progress.
0041   Standard_EXPORT void update(const AIS_AnimationProgress& theProgress) override;
0042 
0043 private:
0044   gp_Ax1 myRotAxis;    //!< rotation axis
0045   double myAngleStart; //!< start angle for rotation
0046   double myAngleEnd;   //!< end angle for rotation
0047 };
0048 
0049 #endif // _AIS_AnimationAxisRotation_HeaderFile