Loading...
Searching...
No Matches
mesh::PatchLimits Struct Reference

Acceptance limits for one mapped patch, checked cell by cell by assessPlannedPatch(). More...

#include <mesh/cellplanner.h>

Collaboration diagram for mesh::PatchLimits:

Public Attributes

double minimumEdge = 0
 Shortest allowed cell edge; 0 disables.
 
double minimumAngleDegrees = 0
 Smallest allowed interior angle in degrees, in [0, 180); 0 disables.
 
double maximumAspect = 0
 Largest allowed quad aspect ratio as computed by quadQuality(); 0 disables.
 
double alongSize = 0
 Limit on the mean length of the opposite edge pair best aligned with alongAngleDegrees; 0 disables the directional check.
 
double acrossSize = 0
 Limit on the mean length of the other opposite edge pair; 0 disables.
 
double alongAngleDegrees = 0
 Undirected along axis in degrees counterclockwise from +x; must be finite.
 
double terrainTolerance = 0
 Constant terrain error tolerance, used when terrainToleranceForFootprint is unset.
 
std::function< double(const QRectF &)> terrainToleranceForFootprint
 Optional tolerance for a cell's XY bounding box; replaces terrainTolerance and must return a finite positive value.
 
std::function< double(const QRectF &)> maximumSize
 Optional size cap for a cell's XY bounding box, compared with sqrt(cell area); 0 means no cap, a negative or nonfinite value fails the patch.
 
std::function< double(double, double)> elevationAt
 Terrain elevation at (x, y), sampled at the quad corners; required by terrain checks.
 
std::function< double(const QPointF *, const double *)> terrainBound
 Certified terrain error bound of the planar triangle through three XY points and heights (arrays valid only during the call); each quad is checked as triangles 0-1-2 and 0-2-3.
 
std::function< bool()> cancelled
 Optional cancellation poll; planQuadRegions() also uses it as its cancellation source.
 

Detailed Description

Acceptance limits for one mapped patch, checked cell by cell by assessPlannedPatch().

Lengths are XY lengths in the patch's planar units; terrain tolerances use the units of elevationAt and terrainBound. Comparisons carry a small relative tolerance (1e-9, or 1e-10 for terrain error). Callbacks run synchronously on the calling thread.

Member Data Documentation

◆ acrossSize

double mesh::PatchLimits::acrossSize = 0

Limit on the mean length of the other opposite edge pair; 0 disables.

◆ alongAngleDegrees

double mesh::PatchLimits::alongAngleDegrees = 0

Undirected along axis in degrees counterclockwise from +x; must be finite.

◆ alongSize

double mesh::PatchLimits::alongSize = 0

Limit on the mean length of the opposite edge pair best aligned with alongAngleDegrees; 0 disables the directional check.

Zero exactly when acrossSize is.

◆ cancelled

std::function<bool()> mesh::PatchLimits::cancelled

Optional cancellation poll; planQuadRegions() also uses it as its cancellation source.

◆ elevationAt

std::function<double(double, double)> mesh::PatchLimits::elevationAt

Terrain elevation at (x, y), sampled at the quad corners; required by terrain checks.

A nonfinite value means unknown coverage and fails the patch.

◆ maximumAspect

double mesh::PatchLimits::maximumAspect = 0

Largest allowed quad aspect ratio as computed by quadQuality(); 0 disables.

◆ maximumSize

std::function<double(const QRectF &)> mesh::PatchLimits::maximumSize

Optional size cap for a cell's XY bounding box, compared with sqrt(cell area); 0 means no cap, a negative or nonfinite value fails the patch.

◆ minimumAngleDegrees

double mesh::PatchLimits::minimumAngleDegrees = 0

Smallest allowed interior angle in degrees, in [0, 180); 0 disables.

◆ minimumEdge

double mesh::PatchLimits::minimumEdge = 0

Shortest allowed cell edge; 0 disables.

A violation is not repairable.

◆ terrainBound

std::function<double(const QPointF *, const double *)> mesh::PatchLimits::terrainBound

Certified terrain error bound of the planar triangle through three XY points and heights (arrays valid only during the call); each quad is checked as triangles 0-1-2 and 0-2-3.

Required by terrain checks; must return a finite value >= 0.

◆ terrainTolerance

double mesh::PatchLimits::terrainTolerance = 0

Constant terrain error tolerance, used when terrainToleranceForFootprint is unset.

Terrain checks run only when it is positive or that callback is set.

◆ terrainToleranceForFootprint

std::function<double(const QRectF &)> mesh::PatchLimits::terrainToleranceForFootprint

Optional tolerance for a cell's XY bounding box; replaces terrainTolerance and must return a finite positive value.


The documentation for this struct was generated from the following file: