ZhuBridsonPointsToImplicit2.h
Go to the documentation of this file.
1 /*************************************************************************
2 > File Name: ZhuBridsonPointsToImplicit2.h
3 > Project Name: CubbyFlow
4 > Author: Chan-Ho Chris Ohk
5 > Purpose: 2-D points-to-implicit converter based on Zhu and Bridson's method.
6 > Created Time: 2017/11/18
7 > Copyright (c) 2018, Chan-Ho Chris Ohk
8 *************************************************************************/
9 #ifndef CUBBYFLOW_ZHU_BRIDSON_POINTS_TO_IMPLICIT2_H
10 #define CUBBYFLOW_ZHU_BRIDSON_POINTS_TO_IMPLICIT2_H
11 
13 
14 namespace CubbyFlow
15 {
23  {
24  public:
26  ZhuBridsonPointsToImplicit2(double kernelRadius = 1.0, double cutOffThreshold = 0.25, bool isOutputSDF = true);
27 
29  void Convert(const ConstArrayAccessor1<Vector2D>& points, ScalarGrid2* output) const override;
30 
31  private:
32  double m_kernelRadius = 1.0;
33  double m_cutOffThreshold = 0.25;
34  bool m_isOutputSDF = true;
35  };
36 
38  using ZhuBridsonPointsToImplicit2Ptr = std::shared_ptr<ZhuBridsonPointsToImplicit2>;
39 }
40 
41 #endif
void Convert(const ConstArrayAccessor1< Vector2D > &points, ScalarGrid2 *output) const override
Converts the given points to implicit surface scalar field.
Abstract base class for 2-D points-to-implicit converters.
Definition: PointsToImplicit2.h:19
1-D read-only array accessor class.
Definition: ArrayAccessor1.h:185
Definition: pybind11Utils.h:24
std::shared_ptr< ZhuBridsonPointsToImplicit2 > ZhuBridsonPointsToImplicit2Ptr
Shared pointer type for ZhuBridsonPointsToImplicit2 class.
Definition: ZhuBridsonPointsToImplicit2.h:38
ZhuBridsonPointsToImplicit2(double kernelRadius=1.0, double cutOffThreshold=0.25, bool isOutputSDF=true)
Constructs the converter with given kernel radius and cut-off threshold.
Abstract base class for 2-D scalar grid structure.
Definition: ScalarGrid2.h:21
2-D points-to-implicit converter based on Zhu and Bridson&#39;s method.
Definition: ZhuBridsonPointsToImplicit2.h:22