Loading...
Searching...
No Matches
GridEmitter3.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_GRID_EMITTER3_HPP
12#define CUBBYFLOW_GRID_EMITTER3_HPP
13
14#include <functional>
15#include <memory>
16
17namespace CubbyFlow
18{
23{
24 public:
32 std::function<void(GridEmitter3*, double, double)>;
33
35 GridEmitter3() = default;
36
38 GridEmitter3(const GridEmitter3&) = default;
39
42
45
48
51
54 void Update(double currentTimeInSeconds, double timeIntervalInSeconds);
55
58
61
73
76 double timeIntervalInSeconds) = 0;
77
79 double timeIntervalInSeconds);
80
81 private:
82 OnBeginUpdateCallback m_onBeginUpdateCallback;
83 bool m_isEnabled = true;
84};
85
88} // namespace CubbyFlow
89
90#endif
Abstract base class for 3-D grid-based emitters.
Definition GridEmitter3.hpp:23
virtual void OnUpdate(double currentTimeInSeconds, double timeIntervalInSeconds)=0
void SetOnBeginUpdateCallback(const OnBeginUpdateCallback &callback)
Sets the callback function to be called when GridEmitter3::Update function is invoked.
GridEmitter3(const GridEmitter3 &)=default
Default copy constructor.
GridEmitter3(GridEmitter3 &&) noexcept=default
Default move constructor.
GridEmitter3()=default
Default constructor.
void SetIsEnabled(bool enabled)
Sets true/false to enable/disable the emitter.
void Update(double currentTimeInSeconds, double timeIntervalInSeconds)
std::function< void(GridEmitter3 *, double, double)> OnBeginUpdateCallback
Callback function type for update calls.
Definition GridEmitter3.hpp:32
void CallOnBeginUpdateCallback(double currentTimeInSeconds, double timeIntervalInSeconds)
bool GetIsEnabled() const
Returns true if the emitter is enabled.
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:21
std::shared_ptr< GridEmitter3 > GridEmitter3Ptr
Shared pointer type for the GridEmitter3.
Definition GridEmitter3.hpp:87
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738