| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/// @file |
| 2 |
|
|
/// @brief The JSON fields of the material map and its photometry. |
| 3 |
|
|
#pragma once |
| 4 |
|
|
|
| 5 |
|
|
#include "terraingen/config/config.h" |
| 6 |
|
|
#include "terraingen/config/fields/boulders.h" |
| 7 |
|
|
#include "terraingen/config/fields/common.h" |
| 8 |
|
|
|
| 9 |
|
|
namespace terraingen::config { |
| 10 |
|
|
|
| 11 |
|
60 |
template <typename IO> void Fields(IO& io, HapkeParameters& hapke) { |
| 12 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::HapkeParameters&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::HapkeParameters&):
✓ Branch 5 taken 3 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::HapkeParameters&):
✓ Branch 5 taken 48 times.
|
60 |
io("albedo", hapke.albedo, "Single-scattering albedo w, from 0 to 1.", "", UnitInterval()); |
| 13 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::HapkeParameters&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::HapkeParameters&):
✓ Branch 4 taken 3 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::HapkeParameters&):
✓ Branch 4 taken 48 times.
|
60 |
io("b", hapke.b, "Asymmetry b of the two-term Henyey-Greenstein phase function, from 0 to 1.", |
| 14 |
|
60 |
"", UnitInterval()); |
| 15 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::HapkeParameters&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::HapkeParameters&):
✓ Branch 4 taken 3 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::HapkeParameters&):
✓ Branch 4 taken 48 times.
|
60 |
io("c", hapke.c, |
| 16 |
|
|
"Backscatter fraction c of the two-term Henyey-Greenstein phase function, from 0 to 1.", "", |
| 17 |
|
60 |
UnitInterval()); |
| 18 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::HapkeParameters&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::HapkeParameters&):
✓ Branch 4 taken 3 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::HapkeParameters&):
✓ Branch 4 taken 48 times.
|
60 |
io("roughness", hapke.roughness, "Macroscopic roughness theta-bar, in degrees below 90.", "deg", |
| 19 |
|
60 |
FromBelow(0.0, 90.0)); |
| 20 |
|
60 |
} |
| 21 |
|
|
|
| 22 |
|
47 |
template <typename IO> void Fields(IO& io, PhotometrySpec& photometry) { |
| 23 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PhotometrySpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PhotometrySpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PhotometrySpec&):
✓ Branch 4 taken 29 times.
|
47 |
io("reference", photometry.reference, |
| 24 |
|
|
"Published Hapke parameters to start from; each class given below replaces its own."); |
| 25 |
|
47 |
MaterialPhotometry& classes = photometry.classes; |
| 26 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 29 times.
|
47 |
io("soil", classes[static_cast<std::size_t>(MaterialClass::Soil)], |
| 27 |
|
|
"Hapke parameters of soil; unset keeps the reference's."); |
| 28 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 29 times.
|
47 |
io("sand", classes[static_cast<std::size_t>(MaterialClass::Sand)], |
| 29 |
|
|
"Hapke parameters of sand; unset keeps the reference's."); |
| 30 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 29 times.
|
47 |
io("dust", classes[static_cast<std::size_t>(MaterialClass::Dust)], |
| 31 |
|
|
"Hapke parameters of dust; unset keeps the reference's."); |
| 32 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 29 times.
|
47 |
io("bedrock", classes[static_cast<std::size_t>(MaterialClass::Bedrock)], |
| 33 |
|
|
"Hapke parameters of bedrock; unset keeps the reference's."); |
| 34 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::PhotometrySpec&):
✓ Branch 5 taken 29 times.
|
47 |
io("rock", classes[static_cast<std::size_t>(MaterialClass::Rock)], |
| 35 |
|
|
"Hapke parameters of rocks and boulders; unset keeps the reference's."); |
| 36 |
|
47 |
} |
| 37 |
|
|
|
| 38 |
|
38 |
template <typename IO> void Fields(IO& io, MaterialsSpec& materials) { |
| 39 |
|
38 |
MaterialOptions& options = materials.options; |
| 40 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 20 times.
|
38 |
io("exposure", options.exposure, |
| 41 |
|
|
"Thresholds marking bare ground as bedrock, read on the ground beneath the first layer that " |
| 42 |
|
|
"lays a material; unset for no bedrock."); |
| 43 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 20 times.
|
38 |
io("dust_cover", options.dustCover, |
| 44 |
|
|
"About the share of the surface under bright dust patches, from 0 up to 1.", "", |
| 45 |
|
38 |
FromBelow(0.0, 1.0)); |
| 46 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 20 times.
|
38 |
io("dust_patch", options.dustPatch, "Typical width of a dust patch, in metres.", "m", |
| 47 |
|
38 |
Above(0.0)); |
| 48 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 20 times.
|
38 |
io("seed", options.seed, "Seed of the dust patches."); |
| 49 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MaterialsSpec&):
✓ Branch 4 taken 20 times.
|
38 |
io("photometry", materials.photometry, |
| 50 |
|
|
"Hapke parameters of each material class, which photometry outputs mix."); |
| 51 |
|
38 |
} |
| 52 |
|
|
|
| 53 |
|
|
} // namespace terraingen::config |
| 54 |
|
|
|