SPHPointsToImplicit2.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_SPH_POINTS_TO_IMPLICIT2_HPP
12 #define CUBBYFLOW_SPH_POINTS_TO_IMPLICIT2_HPP
13 
15 
16 namespace CubbyFlow
17 {
27 {
28  public:
30  SPHPointsToImplicit2(double kernelRadius = 1.0, double cutOffDensity = 0.5,
31  bool isOutputSDF = true);
32 
34  void Convert(const ConstArrayView1<Vector2D>& points,
35  ScalarGrid2* output) const override;
36 
37  private:
38  double m_kernelRadius = 1.0;
39  double m_cutOffDensity = 0.5;
40  bool m_isOutputSDF = true;
41 };
42 
44 using SPHPointsToImplicit2Ptr = std::shared_ptr<SPHPointsToImplicit2>;
45 } // namespace CubbyFlow
46 
47 #endif
2-D points-to-implicit converter based on standard SPH kernel.
Definition: SPHPointsToImplicit2.hpp:26
Abstract base class for N-D scalar grid structure.
Definition: ScalarGrid.hpp:24
Abstract base class for 2-D points-to-implicit converters.
Definition: PointsToImplicit2.hpp:20
Definition: pybind11Utils.hpp:20
SPHPointsToImplicit2(double kernelRadius=1.0, double cutOffDensity=0.5, bool isOutputSDF=true)
Constructs the converter with given kernel radius and cut-off density.
std::shared_ptr< SPHPointsToImplicit2 > SPHPointsToImplicit2Ptr
Shared pointer type for SPHPointsToImplicit2 class.
Definition: SPHPointsToImplicit2.hpp:44
Generic N-dimensional array class interface.
Definition: Array.hpp:32
void Convert(const ConstArrayView1< Vector2D > &points, ScalarGrid2 *output) const override
Converts the given points to implicit surface scalar field.