SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
meshquadpoints.h
Go to the documentation of this file.
1
27#ifndef OPENSWMMVIS_MESH_MESHQUADPOINTS_H
28#define OPENSWMMVIS_MESH_MESHQUADPOINTS_H
29
30#include "mesh/meshcrossfield.h"
31#include "mesh/meshquadmatch.h"
33
34#include <QPointF>
35#include <QPolygonF>
36#include <QVector>
37
38#include <functional>
39
40namespace mesh {
41
43{
44 double h = 0.0;
57 std::function<double(double, double)> hAt;
58 double hMin = 0.0;
59 double hMax = 0.0;
60 double boundaryClearance = 0.5;
61 double minSeparation = 0.7;
62 double templateSnap = 0.35;
63 int maxPoints = 5000000;
64};
65
67{
68 QVector<QPointF> generated;
69 QVector<QuadTemplate> templates;
71};
72
77QuadPointSet placeQuadPoints(const QPolygonF &ring, const QVector<QPointF> &seeds,
78 int ringCount, const CrossField &field,
79 const QuadPointOptions &opts);
80
85QuadPointSet placeQuadPoints(const QPolygonF &ring, const QVector<QPolygonF> &holes,
86 const QVector<QPointF> &seeds,
87 int ringCount, const CrossField &field,
88 const QuadPointOptions &opts);
89
91double distanceToRing(const QPolygonF &ring, const QPointF &p);
92
94double distanceToRings(const QPolygonF &ring, const QVector<QPolygonF> &holes,
95 const QPointF &p);
96
97} // namespace mesh
98
99#endif // OPENSWMMVIS_MESH_MESHQUADPOINTS_H
Definition meshcrossfield.h:33
ArrowPlacement p
Definition linesymbollayer.cpp:27
QPolygonF ring
normalizeRingCCW(r.ring).
Definition meshgenerator.cpp:156
Definition meshcommands.h:302
QuadPointSet placeQuadPoints(const QPolygonF &ring, const QVector< QPointF > &seeds, int ringCount, const CrossField &field, const QuadPointOptions &opts)
Place lattice points inside ring (CCW, open) aligned to field. seeds = ring vertices (exactly ringCou...
Definition meshquadpoints.cpp:188
double distanceToRings(const QPolygonF &ring, const QVector< QPolygonF > &holes, const QPointF &p)
Distance from p to the closest edge of ring or of any hole.
Definition meshquadpoints.cpp:179
double distanceToRing(const QPolygonF &ring, const QPointF &p)
Distance from p to the closest ring edge.
Definition meshquadpoints.cpp:168
Definition meshquadpoints.h:43
double h
Lattice spacing (map units), required > 0.
Definition meshquadpoints.h:44
double hMin
Lower clamp for hAt; <= 0 = derived by sampling.
Definition meshquadpoints.h:58
int maxPoints
Safety cap on generated points.
Definition meshquadpoints.h:63
double templateSnap
Nearest-point tolerance (·h) when recognising a square.
Definition meshquadpoints.h:62
double boundaryClearance
Reject an interior point closer than this·h to the ring.
Definition meshquadpoints.h:60
std::function< double(double, double)> hAt
Definition meshquadpoints.h:57
double hMax
Upper clamp for hAt; <= 0 = derived by sampling.
Definition meshquadpoints.h:59
double minSeparation
Reject a point closer than this·h to any existing point.
Definition meshquadpoints.h:61
Definition meshquadpoints.h:67
QVector< QuadTemplate > templates
Combined indices, CCW.
Definition meshquadpoints.h:69
QVector< QPointF > generated
Interior lattice points (excludes seeds).
Definition meshquadpoints.h:68
int boundaryLayerPoints
Definition meshquadpoints.h:70
double
Definition swmmpollutantpropertyadapter.cpp:50