36#ifndef OPENSWMMVIS_MESH_NATURALNBINTERPOLATOR_H
37#define OPENSWMMVIS_MESH_NATURALNBINTERPOLATOR_H
119 bool build(
const QVector<QPointF> &pts,
const QVector<double> &z, QString *err);
135 bool build(
const QVector<QPointF> &pts, QString *err);
189 bool weightsAt(
double x,
double y, QVector<QPair<int, double>> &out)
const;
226 bool computeWeights(
double qx,
double qy, std::vector<std::pair<int, double>> &out)
const;
245 int locate(
double qx,
double qy)
const;
248 bool m_valid =
false;
250 double m_ox = 0.0, m_oy = 0.0;
251 double m_scale = 1.0;
253 std::vector<double> m_px, m_py, m_pz;
254 std::vector<int> m_seedOf;
255 std::vector<int> m_tris;
256 std::vector<int> m_nbrs;
257 std::vector<double> m_ccx, m_ccy;
260 mutable int m_lastTri = 0;
268 std::vector<QPointF> ncs;
269 std::vector<QPointF> ocs;
271 mutable std::vector<int> m_triStamp;
272 mutable std::vector<int> m_vertStamp;
273 mutable std::vector<int> m_vertSlot;
274 mutable std::vector<NbSlot> m_slots;
275 mutable int m_nSlots = 0;
276 mutable int m_stamp = 0;
277 mutable std::vector<int> m_cavity, m_stack;
278 mutable std::vector<QPointF> m_ring;
Variant variant() const
Read the currently stored interpolation variant.
Definition naturalnbinterpolator.h:94
bool build(const QVector< QPointF > &pts, const QVector< double > &z, QString *err)
Replace interpolation geometry with a snap-deduplicated normalized Delaunay seed set.
Definition naturalnbinterpolator.cpp:94
double interpolate(double x, double y) const
Interpolate one scalar through the chosen normalized natural-neighbor weight scheme.
Definition naturalnbinterpolator.cpp:438
void setVariant(Variant v)
Select which natural-neighbor weight construction later queries use.
Definition naturalnbinterpolator.h:88
const std::vector< int > & keptSeedIndices() const
Borrow the original input-index mapping in internal Delaunay-vertex order.
Definition naturalnbinterpolator.h:203
bool weightsAt(double x, double y, QVector< QPair< int, double > > &out) const
Return normalized natural-neighbor weights keyed by original retained input indices.
Definition naturalnbinterpolator.cpp:461
bool isValid() const
Read whether the latest full build completed successfully.
Definition naturalnbinterpolator.h:144
NaturalNeighbourInterpolator()=default
Construct an invalid empty interpolator using the Sibson variant.
Variant
Natural-neighbour coordinate construction used by interpolate() and weightsAt(): Sibson (default) use...
Definition naturalnbinterpolator.h:66
@ Laplace
Voronoi facet length divided by the distance to the seed.
Definition naturalnbinterpolator.h:68
@ Sibson
Area-stealing (Sibson) coordinates; the default.
Definition naturalnbinterpolator.h:67
The Qt-facing MeshKit API (meshkit::core_qt, meshkit::model_qt, meshkit::io_qt): mesh value types and...