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
mesh::SizeField Class Reference

Distance-to-feature field sampled as a max-area function. More...

#include <sizefield.h>

Collaboration diagram for mesh::SizeField:

Public Member Functions

bool build (const QRectF &bbox, const QVector< ConstraintSegment > &segs, const QVector< QVector< QPointF > > &rings, const QVector< SteinerPoint > &pts, const SizeFieldOptions &opt)
 Build the field. Returns false (and leaves the field invalid) when there is nothing to build from — degenerate bbox, no seeds, or nonsensical options. Callers fall back to the uniform cap.
 
double targetAreaAt (double x, double y) const
 
bool isValid () const
 
double pitch () const
 
int cols () const
 
int rows () const
 
double distanceAt (double x, double y) const
 
double terrainSizeAt (double x, double y) const
 

Detailed Description

Distance-to-feature field sampled as a max-area function.

Build once per generation, then install hook.targetAreaAt = [&f](double x, double y){ return f.targetAreaAt(x,y); }. The field must outlive the triangulate() call that samples it.

Member Function Documentation

◆ build()

bool mesh::SizeField::build ( const QRectF &  bbox,
const QVector< ConstraintSegment > &  segs,
const QVector< QVector< QPointF > > &  rings,
const QVector< SteinerPoint > &  pts,
const SizeFieldOptions opt 
)

Build the field. Returns false (and leaves the field invalid) when there is nothing to build from — degenerate bbox, no seeds, or nonsensical options. Callers fall back to the uniform cap.

segs constraint segments (conduits, aux lines) — every edge seeds. rings additional ring paths to seed (valid hole rings). pts Steiner points; only tagged ones (marker != 0) seed.

◆ cols()

int mesh::SizeField::cols ( ) const
inline

◆ distanceAt()

double mesh::SizeField::distanceAt ( double  x,
double  y 
) const

Distance to the nearest seed at (x, y), bilinear over cell centres. Exposed for tests and diagnostics.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isValid()

bool mesh::SizeField::isValid ( ) const
inline
Here is the caller graph for this function:

◆ pitch()

double mesh::SizeField::pitch ( ) const
inline

◆ rows()

int mesh::SizeField::rows ( ) const
inline

◆ targetAreaAt()

double mesh::SizeField::targetAreaAt ( double  x,
double  y 
) const

Maximum permitted triangle area at (x, y) — the RefineHook contract. Never returns <= 0 on a valid field (the near-size area is the lower bound), so a graded field always constrains.

Here is the call graph for this function:

◆ terrainSizeAt()

double mesh::SizeField::terrainSizeAt ( double  x,
double  y 
) const

Terrain-density size bound at (x, y), or 0 when SizeFieldOptions::terrainDensity was off / no untagged point was given. Exposed for tests and diagnostics.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: