AGX Dynamics  2.37.2.0
InterpolationController.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 
19 
20 #ifndef AGXCONTROL_INTERPOLATION_CONTROLLER_H
21 #define AGXCONTROL_INTERPOLATION_CONTROLLER_H
22 
23 #include <agx/config.h>
24 
25 #include <agx/Referenced.h>
26 #include <agxStream/Serializable.h>
27 
28 namespace agxControl
29 {
30  AGX_DECLARE_POINTER_TYPES(InterpolationController);
31 
32 
33  class AGXPHYSICS_EXPORT InterpolationController : public agx::Referenced, public agxStream::Serializable
34  {
35  public:
36  virtual agx::Real interpolate(agx::Real startValue, agx::Real endValue, agx::Real startTime, agx::Real endTime, agx::Real time) = 0;
37 
38  AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE( agxControl::InterpolationController );
39 
40  protected:
41  virtual ~InterpolationController() {}
42  };
43 
44 
45  AGX_DECLARE_POINTER_TYPES(LinearInterpolationController);
46  class AGXPHYSICS_EXPORT LinearInterpolationController : public agxControl::InterpolationController
47  {
48  public:
49  virtual agx::Real interpolate(agx::Real startValue, agx::Real endValue, agx::Real startTime, agx::Real endTime, agx::Real time) override;
50  AGXSTREAM_DECLARE_SERIALIZABLE( agxControl::LinearInterpolationController );
51 
52  protected:
53  virtual ~LinearInterpolationController() {}
54  };
55 
56  AGX_DECLARE_POINTER_TYPES(HermiteInterpolationController);
57  class AGXPHYSICS_EXPORT HermiteInterpolationController : public agxControl::InterpolationController
58  {
59  public:
60  virtual agx::Real interpolate(agx::Real startValue, agx::Real endValue, agx::Real startTime, agx::Real endTime, agx::Real time) override;
61  agx::Real interpolate(agx::Real startValue, agx::Real endValue, agx::Real startTime, agx::Real endTime, agx::Real time, agx::Real startSlope, agx::Real endSlope);
62  AGXSTREAM_DECLARE_SERIALIZABLE( agxControl::HermiteInterpolationController );
63 
64  protected:
65  virtual ~HermiteInterpolationController() {}
66  };
67 }
68 
69 // Include guard
70 #endif
71 
73 
#define AGXPHYSICS_EXPORT
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
Base class providing referencing counted objects.
Definition: Referenced.h:119
This namespace contains general operation and action classes which can be used to control a agxSDK::S...
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
double Real
Definition: Real.h:42