mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-02-23 05:19:18 -06:00
Formatting changes per code review
This commit is contained in:
@@ -32,16 +32,16 @@
|
||||
namespace openspace {
|
||||
|
||||
/**
|
||||
* Base class for keyframes
|
||||
*/
|
||||
* Base class for keyframes
|
||||
*/
|
||||
struct KeyframeBase {
|
||||
size_t id;
|
||||
double timestamp;
|
||||
};
|
||||
|
||||
/**
|
||||
* Templated class for keyframes containing data
|
||||
*/
|
||||
* Templated class for keyframes containing data
|
||||
*/
|
||||
template <typename T>
|
||||
struct Keyframe : public KeyframeBase {
|
||||
Keyframe(size_t i, double t, T d);
|
||||
@@ -54,8 +54,8 @@ struct Keyframe : public KeyframeBase {
|
||||
};
|
||||
|
||||
/**
|
||||
* Templated class for timelines
|
||||
*/
|
||||
* Templated class for timelines
|
||||
*/
|
||||
template <typename T>
|
||||
class Timeline {
|
||||
public:
|
||||
@@ -81,28 +81,28 @@ private:
|
||||
};
|
||||
|
||||
/**
|
||||
* Return true if the timestamp of a is smaller the timestamp of b.
|
||||
*/
|
||||
* Return true if the timestamp of a is smaller the timestamp of b.
|
||||
*/
|
||||
bool compareKeyframeTimes(const KeyframeBase& a, const KeyframeBase& b);
|
||||
|
||||
/**
|
||||
* Return true if a is smaller than the timestamp of b.
|
||||
*/
|
||||
* Return true if a is smaller than the timestamp of b.
|
||||
*/
|
||||
bool compareTimeWithKeyframeTime(double a, const KeyframeBase& b);
|
||||
|
||||
/**
|
||||
* Return true if the timestamp of a is smaller than b.
|
||||
*/
|
||||
* Return true if the timestamp of a is smaller than b.
|
||||
*/
|
||||
bool compareKeyframeTimeWithTime(const KeyframeBase& a, double b);
|
||||
|
||||
/**
|
||||
* Return true if the timestamp of a is smaller than or equal to b.
|
||||
* This is used only in the mode of saving render frames during session recording
|
||||
* playback. This was necessary to correct a small timing issue caused by fixing
|
||||
* the application time according to the playback framerate. In normal operation,
|
||||
* the application time at the instant the keyframes are evaluated is always a
|
||||
* little bit newer than the first keyframe in the timeline.
|
||||
*/
|
||||
* Return true if the timestamp of a is smaller than or equal to b.
|
||||
* This is used only in the mode of saving render frames during session recording
|
||||
* playback. This was necessary to correct a small timing issue caused by fixing
|
||||
* the application time according to the playback framerate. In normal operation,
|
||||
* the application time at the instant the keyframes are evaluated is always a
|
||||
* little bit newer than the first keyframe in the timeline.
|
||||
*/
|
||||
bool compareKeyframeTimeWithTime_playbackWithFrames(const KeyframeBase& a, double b);
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -1178,13 +1178,11 @@ double SessionRecording::fixedDeltaTimeDuringFrameOutput() const {
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point
|
||||
SessionRecording::currentPlaybackInterpolationTime() const
|
||||
{
|
||||
SessionRecording::currentPlaybackInterpolationTime() const {
|
||||
return _saveRenderingCurrentRecordedTime_interpolation;
|
||||
}
|
||||
|
||||
double SessionRecording::currentApplicationInterpolationTime() const
|
||||
{
|
||||
double SessionRecording::currentApplicationInterpolationTime() const {
|
||||
return _saveRenderingCurrentApplicationTime_interpolation;
|
||||
}
|
||||
|
||||
|
||||
@@ -474,8 +474,7 @@ SceneGraphNode* Scene::loadNode(const ghoul::Dictionary& nodeDictionary) {
|
||||
return rawNodePointer;
|
||||
}
|
||||
|
||||
std::chrono::steady_clock::time_point Scene::currentTimeForInterpolation()
|
||||
{
|
||||
std::chrono::steady_clock::time_point Scene::currentTimeForInterpolation() {
|
||||
if (global::sessionRecording->isSavingFramesDuringPlayback()) {
|
||||
return global::sessionRecording->currentPlaybackInterpolationTime();
|
||||
}
|
||||
|
||||
@@ -843,8 +843,7 @@ void TimeManager::interpolatePause(bool pause, double interpolationDuration) {
|
||||
addKeyframe(now + interpolationDuration, futureKeyframe);
|
||||
}
|
||||
|
||||
double TimeManager::currentApplicationTimeForInterpolation() const
|
||||
{
|
||||
double TimeManager::currentApplicationTimeForInterpolation() const {
|
||||
if (global::sessionRecording->isSavingFramesDuringPlayback()) {
|
||||
return global::sessionRecording->currentApplicationInterpolationTime();
|
||||
}
|
||||
@@ -853,8 +852,7 @@ double TimeManager::currentApplicationTimeForInterpolation() const
|
||||
}
|
||||
}
|
||||
|
||||
double TimeManager::previousApplicationTimeForInterpolation() const
|
||||
{
|
||||
double TimeManager::previousApplicationTimeForInterpolation() const {
|
||||
//If playing back with frames, this function needs to be called when a time rate
|
||||
// interpolation (either speed change or pause) begins and ends. If the application
|
||||
// time of the interpolation keyframe timestamp (when it was added to timeline) is
|
||||
|
||||
Reference in New Issue
Block a user