1 // Created by: Anastasia BORISOVA
2 // Copyright (c) 2016 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
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.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
15 #ifndef _AIS_AnimationObject_HeaderFile
16 #define _AIS_AnimationObject_HeaderFile
18 #include <AIS_Animation.hxx>
19 #include <AIS_InteractiveContext.hxx>
20 #include <gp_TrsfNLerp.hxx>
22 //! Animation defining object transformation.
23 class AIS_AnimationObject : public AIS_Animation
25 DEFINE_STANDARD_RTTIEXT(AIS_AnimationObject, AIS_Animation)
28 //! Constructor with initialization.
29 //! Note that start/end transformations specify exactly local transformation of the object,
30 //! not the transformation to be applied to existing local transformation.
31 //! @param theAnimationName animation identifier
32 //! @param theContext interactive context where object have been displayed
33 //! @param theObject object to apply local transformation
34 //! @param theTrsfStart local transformation at the start of animation (e.g. theObject->LocalTransformation())
35 //! @param theTrsfEnd local transformation at the end of animation
36 Standard_EXPORT AIS_AnimationObject (const TCollection_AsciiString& theAnimationName,
37 const Handle(AIS_InteractiveContext)& theContext,
38 const Handle(AIS_InteractiveObject)& theObject,
39 const gp_Trsf& theTrsfStart,
40 const gp_Trsf& theTrsfEnd);
44 //! Update the progress.
45 Standard_EXPORT virtual void update (const AIS_AnimationProgress& theProgress) Standard_OVERRIDE;
47 //! Invalidate the viewer for proper update.
48 Standard_EXPORT void invalidateViewer();
52 Handle(AIS_InteractiveContext) myContext; //!< context where object is displayed
53 Handle(AIS_InteractiveObject) myObject; //!< presentation object to set location
54 gp_TrsfNLerp myTrsfLerp; //!< interpolation tool
58 DEFINE_STANDARD_HANDLE(AIS_AnimationObject, AIS_Animation)
60 #endif // _AIS_AnimationObject_HeaderFile