Loading...
Searching...
No Matches
CUDAParticleSystemSolver3.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_CUDA_PARTICLE_SYSTEM_SOLVER3_HPP
12#define CUBBYFLOW_CUDA_PARTICLE_SYSTEM_SOLVER3_HPP
13
14#ifdef CUBBYFLOW_USE_CUDA
15
17
18namespace CubbyFlow
19{
34{
35 public:
36 class Builder;
37
40
42 CUDAParticleSystemSolver3(float radius, float mass);
43
46
49
52
55 delete;
56
59 delete;
60
62 float Radius() const;
63
65 void SetRadius(float newRadius);
66
68 float Mass() const;
69
71 void SetMass(float newMass);
72
74 static Builder GetBuilder();
75
78 void OnAdvanceTimeStep(double timeStepInSeconds) override;
79
80 private:
81 float m_radius = 1e-3f;
82 float m_mass = 1e-3f;
83};
84
87
93{
94 public:
96 Builder& WithRadius(float radius);
97
99 Builder& WithMass(float mass);
100
102 CUDAParticleSystemSolver3 Build() const;
103
105 CUDAParticleSystemSolver3Ptr MakeShared() const;
106
107 private:
108 float m_radius = 1e-3f;
109 float m_mass = 1e-3f;
110};
111} // namespace CubbyFlow
112
113#endif
114
115#endif
Definition pybind11Utils.hpp:21
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738