LevelSetUtils.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_LEVEL_SET_UTILS_HPP
12 #define CUBBYFLOW_LEVEL_SET_UTILS_HPP
13 
14 namespace CubbyFlow
15 {
25 template <typename T>
26 bool IsInsideSDF(T phi);
27 
43 template <typename T>
44 T SmearedHeavisideSDF(T phi);
45 
60 template <typename T>
61 T SmearedDeltaSDF(T phi);
62 
82 template <typename T>
83 T FractionInsideSDF(T phi0, T phi1);
84 
102 template <typename T>
103 T FractionInside(T phiBottomLeft, T phiBottomRight, T phiTopLeft,
104  T phiTopRight);
105 } // namespace CubbyFlow
106 
108 
109 #endif
T FractionInside(T phiBottomLeft, T phiBottomRight, T phiTopLeft, T phiTopRight)
Returns the fraction occupied by the implicit surface.
Definition: LevelSetUtils-Impl.hpp:97
bool IsInsideSDF(T phi)
Returns true if phi is inside the implicit surface (< 0).
Definition: LevelSetUtils-Impl.hpp:29
T FractionInsideSDF(T phi0, T phi1)
Returns the fraction occupied by the implicit surface.
Definition: LevelSetUtils-Impl.hpp:63
T SmearedHeavisideSDF(T phi)
Returns smeared Heaviside function.
Definition: LevelSetUtils-Impl.hpp:35
Definition: pybind11Utils.hpp:20
T SmearedDeltaSDF(T phi)
Returns smeared delta function.
Definition: LevelSetUtils-Impl.hpp:52