xmsinterp  1.0
NodalFunc.h
Go to the documentation of this file.
1 #pragma once
2 //------------------------------------------------------------------------------
7 //------------------------------------------------------------------------------
8 
9 //----- Included files ---------------------------------------------------------
10 #include <vector>
11 #include <xmscore/points/ptsfwd.h> // for Pt3d
12 #include <xmscore/misc/base_macros.h> // XM_DISALLOW_COPY_AND_ASSIGN
14 
15 //----- Forward declarations ---------------------------------------------------
16 
17 //----- Namespace declaration --------------------------------------------------
18 namespace xms
19 {
20 class GmPtSearch;
21 class InterpNatNeigh;
22 class Observer;
23 
24 //----- Constants / Enumerations -----------------------------------------------
25 
26 //----- Structs / Classes ------------------------------------------------------
30 class NodalFunc
31 {
32 public:
33  static BSHP<NodalFunc> New(int a_type,
34  bool a_2d,
35  boost::shared_ptr<GmPtSearch> a_ptSearch,
36  const std::vector<Pt3d>& a_pts,
37  const std::vector<float>& a_scalar,
38  int a_nNearest,
39  bool a_quad_oct,
40  double a_power,
41  bool a_modifiedShepardWeights,
42  boost::shared_ptr<Observer> a_p,
43  InterpNatNeigh* a_natNeigh);
44  virtual ~NodalFunc();
45 
47  virtual double ScalarFromPtIdx(int a_ptIdx, const Pt3d& a_loc) const = 0;
48  virtual void GradientFromPtIdx(int a_ptIdx, Pt3d& a_grad) const = 0;
49  virtual void ComputeNodalFuncs() = 0;
50  virtual std::string ToString() const = 0;
51  virtual int GetType() const = 0;
52  virtual int GetNearestPointsOption() const = 0;
53  virtual int GetNumNearestPoints() const = 0;
54  virtual bool GetUseModifiedShepardWeights() const = 0;
55  virtual bool GetUseQuadrantSearch() const = 0;
56 
57 private:
60 
61 protected:
62  NodalFunc();
63 };
64 //----- Function prototypes ----------------------------------------------------
65 
66 } // namespace xms
NodalFunc()
Constructor.
Definition: NodalFunc.cpp:208
static BSHP< NodalFunc > New(int a_type, bool a_2d, boost::shared_ptr< GmPtSearch > a_ptSearch, const std::vector< Pt3d > &a_pts, const std::vector< float > &a_scalar, int a_nNearest, bool a_quad_oct, double a_power, bool a_modifiedShepardWeights, boost::shared_ptr< Observer > a_p, InterpNatNeigh *a_natNeigh)
Creates a NodalFunc class.
Definition: NodalFunc.cpp:188
#define XM_DISALLOW_COPY_AND_ASSIGN(TypeName)
virtual ~NodalFunc()
Destructor.
Definition: NodalFunc.cpp:214
Class to compute gradient plane and quadratic nodal functions for interpolation.
Definition: NodalFunc.h:30
Class that performs natural neighbor interpolation.