Skip to content

Commit

Permalink
curve: Make Keyframe's 'value' member public.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Apr 27, 2024
1 parent 1092ba5 commit 74fe1f3
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions libopenage/curve/keyframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,37 @@ class Keyframe {
timestamp{time},
value{value} {}

/**
* Get the time of this keyframe.
*
* @return Keyframe time.
*/
const time::time_t &time() const {
return this->timestamp;
}

/**
* Get the value of this keyframe.
*
* @return Keyframe value.
*/
const T &val() const {
return this->value;
}

public:
/**
* Value of the keyframe.
*
* Can be modified by the curve if necessary.
*/
T value = T{};

private:
/**
* Time of the keyframe.
*/
time::time_t timestamp = time::TIME_MIN;

T value = T{};
};

} // namespace openage::curve

0 comments on commit 74fe1f3

Please sign in to comment.