SETemporalInterpolator.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/properties/SEProperty.h"
6
7class CDM_DECL SETemporalInterpolator : public SEProperty
8{
9 friend class PBProperty;//friend the serialization class
10public:
11
12 void Invalidate() override;
13 bool IsValid() const override;
14
15 double GetCurrent() const { return m_Current; }
16
17 void Set(double d);
18
19 void SetTarget(double target, double period_s);// initial will be set to current
20
21 void SetTransition(double initial, double target, double period_s);
22
23 bool Transition(double dt_s);
24
25protected:
26 bool m_Complete = false;
27 bool m_PositiveTransition = true;
28 double m_Period_s;
29 double m_Current = 1; // The Current Value
30 double m_Target = 1; // The Target Value
31 double m_Initial = 1; // The Initial Value
32};
Definition: PBProperties.h:87
Definition: SEProperty.h:8
virtual void Invalidate()=0
virtual bool IsValid() const =0
Definition: SETemporalInterpolator.h:8
double GetCurrent() const
Definition: SETemporalInterpolator.h:15
double m_Period_s
Definition: SETemporalInterpolator.h:28

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.