Maps a reference terrain tolerance and a footprint target size to the tolerance used there. More...
#include <meshkit/terrainpolicy.hpp>
Public Member Functions | |
| bool | valid () const |
| Check the mode and the finite, nonnegative and ordered numeric fields. | |
| double | tolerance (double referenceTolerance, double h) const |
| Resolve the terrain tolerance for one footprint. | |
Public Attributes | |
| TerrainToleranceMode | mode = TerrainToleranceMode::Constant |
| Tolerance mode; Constant (the default) ignores the other fields except for validation. | |
| double | referenceSize = 10 |
| Target size, in XY units, at which the scaled tolerance equals the reference tolerance; must be positive and finite in both modes. | |
| double | minimumTolerance = 0 |
| Lower clamp, in Z units, for TargetSize mode; finite and >= 0 (0 = no floor). | |
| double | maximumTolerance = 0 |
| Upper clamp, in Z units, for TargetSize mode; finite and >= 0, and >= minimumTolerance unless 0. | |
Maps a reference terrain tolerance and a footprint target size to the tolerance used there.
Sizes are in XY units and tolerances in Z units. In TargetSize mode the tolerance is referenceTolerance * h / referenceSize, clamped to [minimumTolerance, cap], where cap is maximumTolerance, or the reference tolerance when maximumTolerance is 0.
|
inline |
Resolve the terrain tolerance for one footprint.
| [in] | referenceTolerance | Positive finite base tolerance in Z units. |
| [in] | h | Smallest prescribed target size over the footprint, in XY units; finite and >= 0, where 0 means unbounded. |
|
inline |
Check the mode and the finite, nonnegative and ordered numeric fields.
| double meshkit::TerrainTolerancePolicy::maximumTolerance = 0 |
Upper clamp, in Z units, for TargetSize mode; finite and >= 0, and >= minimumTolerance unless 0.
| double meshkit::TerrainTolerancePolicy::minimumTolerance = 0 |
Lower clamp, in Z units, for TargetSize mode; finite and >= 0 (0 = no floor).
| TerrainToleranceMode meshkit::TerrainTolerancePolicy::mode = TerrainToleranceMode::Constant |
Tolerance mode; Constant (the default) ignores the other fields except for validation.
| double meshkit::TerrainTolerancePolicy::referenceSize = 10 |
Target size, in XY units, at which the scaled tolerance equals the reference tolerance; must be positive and finite in both modes.