Loading...
Searching...
No Matches
Frame.hpp
Go to the documentation of this file.
1// This code is based on Jet framework.
2// Copyright (c) 2018 Doyub Kim
3// CubbyFlow is voxel-based fluid simulation engine for computer games.
4// Copyright (c) 2020 CubbyFlow Team
5// Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6// AI Part: Dongheon Cho, Minseo Kim
7// We are making my contributions/submissions to this project solely in our
8// personal capacity and are not conveying any rights to any intellectual
9// property of any third parties.
10
11#ifndef CUBBYFLOW_FRAME_HPP
12#define CUBBYFLOW_FRAME_HPP
13
14namespace CubbyFlow
15{
22struct Frame final
23{
25 Frame() = default;
26
28 Frame(int newIndex, double newTimeIntervalInSeconds);
29
31 [[nodiscard]] double TimeInSeconds() const;
32
34 void Advance();
35
38 void Advance(int delta);
39
42
45
47 int index = 0;
48
50 double timeIntervalInSeconds = 1.0 / 60.0;
51};
52} // namespace CubbyFlow
53
54#endif
Definition pybind11Utils.hpp:21
Representation of an animation frame.
Definition Frame.hpp:23
Frame(int newIndex, double newTimeIntervalInSeconds)
Constructs Frame instance with given time interval.
Frame & operator++()
Advances single frame (prefix).
void Advance()
Advances single frame.
void Advance(int delta)
double TimeInSeconds() const
Returns the elapsed time in seconds.
Frame operator++(int)
Advances single frame (postfix).
Frame()=default
Default constructor: A Frame instance with 1/60 seconds time interval.
double timeIntervalInSeconds
Time interval in seconds between two adjacent frames.
Definition Frame.hpp:50
int index
Frame index.
Definition Frame.hpp:47