| Line |
Branch |
Exec |
Source |
| 1 |
|
|
/// @file |
| 2 |
|
|
/// @brief The JSON fields of the outputs. |
| 3 |
|
|
#pragma once |
| 4 |
|
|
|
| 5 |
|
|
#include "terraingen/config/config.h" |
| 6 |
|
|
#include "terraingen/config/fields/common.h" |
| 7 |
|
|
|
| 8 |
|
|
#include <string> |
| 9 |
|
|
#include <string_view> |
| 10 |
|
|
|
| 11 |
|
|
namespace terraingen::config { |
| 12 |
|
|
|
| 13 |
|
335 |
template <typename IO> void Fields(IO& io, GridRegionSpec& region) { |
| 14 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GridRegionSpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GridRegionSpec&):
✓ Branch 5 taken 222 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GridRegionSpec&):
✓ Branch 5 taken 102 times.
|
335 |
io("width", region.width, "Columns of the grid.", "", Between(2.0, 65536.0)); |
| 15 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GridRegionSpec&):
✓ Branch 5 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GridRegionSpec&):
✓ Branch 5 taken 221 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GridRegionSpec&):
✓ Branch 5 taken 102 times.
|
333 |
io("height", region.height, "Rows of the grid.", "", Between(2.0, 65536.0)); |
| 16 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 220 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 102 times.
|
332 |
io("pixel_size", region.pixelSize, |
| 17 |
|
|
"Cell size in metres; on a body, metres along a meridian, the same in degrees of " |
| 18 |
|
|
"longitude.", |
| 19 |
|
333 |
"m", Above(0.0)); |
| 20 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 220 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 102 times.
|
331 |
io("centre_x", region.centreX, |
| 21 |
|
|
"Centre of the grid along x in surface coordinates; the longitude in degrees on a body."); |
| 22 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 220 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GridRegionSpec&):
✓ Branch 4 taken 102 times.
|
331 |
io("centre_y", region.centreY, |
| 23 |
|
|
"Centre of the grid along y in surface coordinates; the latitude in degrees on a body."); |
| 24 |
|
331 |
} |
| 25 |
|
|
|
| 26 |
|
|
/// The description of an output's region: `what` it covers. |
| 27 |
|
499 |
inline std::string RegionHelp(std::string_view what) { |
| 28 |
3/3
✓ Branch 1 taken 499 times.
✓ Branch 4 taken 499 times.
✓ Branch 7 taken 499 times.
|
998 |
return "Grid of square cells " + std::string(what) + "; unset for the base's grid"; |
| 29 |
|
|
} |
| 30 |
|
|
|
| 31 |
|
|
/// The fields of heightmap and albedo outputs. |
| 32 |
|
282 |
template <typename IO> void GeoTiffOutputFields(IO& io, GeoTiffOutput& output) { |
| 33 |
6/6
void terraingen::config::GeoTiffOutputFields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GeoTiffOutput&):
✓ Branch 3 taken 36 times.
✓ Branch 8 taken 36 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GeoTiffOutput&):
✓ Branch 3 taken 152 times.
✓ Branch 8 taken 152 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GeoTiffOutput&):
✓ Branch 3 taken 94 times.
✓ Branch 8 taken 94 times.
|
282 |
io("path", output.path, OutputPathHelp("GeoTIFF file to write")); |
| 34 |
9/9
void terraingen::config::GeoTiffOutputFields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GeoTiffOutput&):
✓ Branch 3 taken 36 times.
✓ Branch 6 taken 36 times.
✓ Branch 11 taken 36 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GeoTiffOutput&):
✓ Branch 3 taken 152 times.
✓ Branch 6 taken 152 times.
✓ Branch 11 taken 148 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GeoTiffOutput&):
✓ Branch 3 taken 94 times.
✓ Branch 6 taken 94 times.
✓ Branch 11 taken 94 times.
|
290 |
io("region", output.region, RegionHelp("the file covers") + "."); |
| 35 |
3/3
void terraingen::config::GeoTiffOutputFields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GeoTiffOutput&):
✓ Branch 4 taken 36 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GeoTiffOutput&):
✓ Branch 4 taken 147 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GeoTiffOutput&):
✓ Branch 4 taken 94 times.
|
278 |
io("compression", output.compression, |
| 36 |
|
|
"Compression of the file; compressed files use the floating-point predictor."); |
| 37 |
3/3
void terraingen::config::GeoTiffOutputFields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::GeoTiffOutput&):
✓ Branch 4 taken 36 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::GeoTiffOutput&):
✓ Branch 4 taken 147 times.
void terraingen::config::GeoTiffOutputFields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::GeoTiffOutput&):
✓ Branch 4 taken 94 times.
|
277 |
io("tile_size", output.tileSize, |
| 38 |
|
|
"Width and height of the file's tiles in pixels; a positive multiple of 16.", "px", |
| 39 |
|
277 |
AtLeast(16.0)); |
| 40 |
|
277 |
} |
| 41 |
|
|
|
| 42 |
|
|
/// The fields of where features are listed: a region and a sample spacing. |
| 43 |
|
182 |
template <typename IO, typename Output> void FeatureExtentFields(IO& io, Output& output) { |
| 44 |
18/18
void terraingen::config::FeatureExtentFields<terraingen::config::(anonymous namespace)::SchemaWriter, terraingen::BoulderModelsOutput>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::BoulderModelsOutput&):
✓ Branch 2 taken 9 times.
✓ Branch 5 taken 9 times.
✓ Branch 10 taken 9 times.
void terraingen::config::FeatureExtentFields<terraingen::config::(anonymous namespace)::SchemaWriter, terraingen::ListOutput>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ListOutput&):
✓ Branch 2 taken 18 times.
✓ Branch 5 taken 18 times.
✓ Branch 10 taken 18 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Reader, terraingen::BoulderModelsOutput>(terraingen::config::Reader&, terraingen::BoulderModelsOutput&):
✓ Branch 2 taken 9 times.
✓ Branch 5 taken 9 times.
✓ Branch 10 taken 9 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Reader, terraingen::ListOutput>(terraingen::config::Reader&, terraingen::ListOutput&):
✓ Branch 2 taken 79 times.
✓ Branch 5 taken 79 times.
✓ Branch 10 taken 79 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Writer, terraingen::BoulderModelsOutput>(terraingen::config::Writer&, terraingen::BoulderModelsOutput&):
✓ Branch 2 taken 20 times.
✓ Branch 5 taken 20 times.
✓ Branch 10 taken 20 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Writer, terraingen::ListOutput>(terraingen::config::Writer&, terraingen::ListOutput&):
✓ Branch 2 taken 47 times.
✓ Branch 5 taken 47 times.
✓ Branch 10 taken 47 times.
|
364 |
io("region", output.region, |
| 45 |
|
182 |
RegionHelp("the features are listed over") + |
| 46 |
|
|
", or without a base the whole body on a body."); |
| 47 |
6/6
void terraingen::config::FeatureExtentFields<terraingen::config::(anonymous namespace)::SchemaWriter, terraingen::BoulderModelsOutput>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::FeatureExtentFields<terraingen::config::(anonymous namespace)::SchemaWriter, terraingen::ListOutput>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ListOutput&):
✓ Branch 4 taken 18 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Reader, terraingen::BoulderModelsOutput>(terraingen::config::Reader&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Reader, terraingen::ListOutput>(terraingen::config::Reader&, terraingen::ListOutput&):
✓ Branch 4 taken 79 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Writer, terraingen::BoulderModelsOutput>(terraingen::config::Writer&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 20 times.
void terraingen::config::FeatureExtentFields<terraingen::config::Writer, terraingen::ListOutput>(terraingen::config::Writer&, terraingen::ListOutput&):
✓ Branch 4 taken 47 times.
|
182 |
io("spacing", output.spacing, |
| 48 |
|
|
"Sample spacing in metres the features are listed at, as a heightmap of that pixel size " |
| 49 |
|
|
"applies them; unset for the region's pixel size. A whole-body list needs it.", |
| 50 |
|
182 |
"m", Above(0.0)); |
| 51 |
|
182 |
} |
| 52 |
|
|
|
| 53 |
|
|
/// The fields of crater and boulder list outputs. |
| 54 |
|
145 |
template <typename IO> void ListOutputFields(IO& io, ListOutput& output) { |
| 55 |
6/6
void terraingen::config::ListOutputFields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ListOutput&):
✓ Branch 3 taken 18 times.
✓ Branch 8 taken 18 times.
void terraingen::config::ListOutputFields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::ListOutput&):
✓ Branch 3 taken 80 times.
✓ Branch 8 taken 80 times.
void terraingen::config::ListOutputFields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::ListOutput&):
✓ Branch 3 taken 47 times.
✓ Branch 8 taken 47 times.
|
145 |
io("path", output.path, OutputPathHelp("File to write")); |
| 56 |
3/3
void terraingen::config::ListOutputFields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::ListOutput&):
✓ Branch 4 taken 18 times.
void terraingen::config::ListOutputFields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::ListOutput&):
✓ Branch 4 taken 79 times.
void terraingen::config::ListOutputFields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::ListOutput&):
✓ Branch 4 taken 47 times.
|
145 |
io("format", output.format, |
| 57 |
|
|
"Format of the file; when not given, .json paths are written as JSON and others as CSV."); |
| 58 |
|
144 |
FeatureExtentFields(io, output); |
| 59 |
|
144 |
} |
| 60 |
|
|
|
| 61 |
|
|
template <> struct SpecName<HeightmapOutput> { |
| 62 |
|
|
static constexpr std::string_view kName = "heightmap"; |
| 63 |
|
|
static constexpr std::string_view kDescription = |
| 64 |
|
|
"Writes the generated heights as a float32 GeoTIFF, with a raster base's projection."; |
| 65 |
|
|
}; |
| 66 |
|
162 |
template <typename IO> void Fields(IO& io, HeightmapOutput& output) { |
| 67 |
|
162 |
GeoTiffOutputFields(io, output); |
| 68 |
|
157 |
} |
| 69 |
|
|
|
| 70 |
|
|
template <> struct SpecName<CraterListOutput> { |
| 71 |
|
|
static constexpr std::string_view kName = "crater_list"; |
| 72 |
|
|
static constexpr std::string_view kDescription = |
| 73 |
|
|
"Writes the generated and manual craters as CSV or JSON."; |
| 74 |
|
|
}; |
| 75 |
|
94 |
template <typename IO> void Fields(IO& io, CraterListOutput& output) { |
| 76 |
|
94 |
ListOutputFields(io, output); |
| 77 |
|
93 |
} |
| 78 |
|
|
|
| 79 |
|
|
template <> struct SpecName<BoulderListOutput> { |
| 80 |
|
|
static constexpr std::string_view kName = "boulder_list"; |
| 81 |
|
|
static constexpr std::string_view kDescription = |
| 82 |
|
|
"Writes every boulder the layers placed, models and relief alike, as CSV or JSON."; |
| 83 |
|
|
}; |
| 84 |
|
51 |
template <typename IO> void Fields(IO& io, BoulderListOutput& output) { |
| 85 |
|
51 |
ListOutputFields(io, output); |
| 86 |
|
51 |
} |
| 87 |
|
|
|
| 88 |
|
|
template <> struct SpecName<BoulderModelsOutput> { |
| 89 |
|
|
static constexpr std::string_view kName = "boulder_models"; |
| 90 |
|
|
static constexpr std::string_view kDescription = |
| 91 |
|
|
"Writes the boulders placed as 3D models on the ground: as a glTF scene (.glb, or .gltf " |
| 92 |
|
|
"with a .bin) drawing each shape once per boulder, as OBJ (.obj with an .mtl) with one " |
| 93 |
|
|
"object per boulder, or as one merged STL mesh (.stl)."; |
| 94 |
|
|
}; |
| 95 |
|
38 |
template <typename IO> void Fields(IO& io, BoulderModelsOutput& output) { |
| 96 |
6/6
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::BoulderModelsOutput&):
✓ Branch 3 taken 9 times.
✓ Branch 8 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::BoulderModelsOutput&):
✓ Branch 3 taken 9 times.
✓ Branch 8 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::BoulderModelsOutput&):
✓ Branch 3 taken 20 times.
✓ Branch 8 taken 20 times.
|
38 |
io("path", output.path, OutputPathHelp("File to write, ending in .glb, .gltf, .obj or .stl")); |
| 97 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 20 times.
|
38 |
io("crease_angle", output.creaseAngle, |
| 98 |
|
|
"Angle in degrees, from 0 to 180: vertices are split where faces meet at more than it, " |
| 99 |
|
|
"giving sharp edges.", |
| 100 |
|
38 |
"deg", Between(0.0, 180.0)); |
| 101 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::BoulderModelsOutput&):
✓ Branch 4 taken 20 times.
|
38 |
io("instanced", output.instanced, |
| 102 |
|
|
"Writes each shared shape once and draws it per boulder (glTF instances, OBJ objects); " |
| 103 |
|
|
"false writes every boulder as its own placed mesh, for tools without instancing."); |
| 104 |
|
38 |
FeatureExtentFields(io, output); |
| 105 |
|
38 |
} |
| 106 |
|
|
|
| 107 |
|
|
template <> struct SpecName<AlbedoOutput> { |
| 108 |
|
|
static constexpr std::string_view kName = "albedo"; |
| 109 |
|
|
static constexpr std::string_view kDescription = |
| 110 |
|
|
"Writes the albedo as a float32 GeoTIFF of one band or three (red, green, blue)."; |
| 111 |
|
|
}; |
| 112 |
|
45 |
template <typename IO> void Fields(IO& io, AlbedoOutput& output) { |
| 113 |
|
45 |
GeoTiffOutputFields(io, output); |
| 114 |
|
45 |
} |
| 115 |
|
|
|
| 116 |
|
|
template <> struct SpecName<MaterialsOutput> { |
| 117 |
|
|
static constexpr std::string_view kName = "materials"; |
| 118 |
|
|
static constexpr std::string_view kDescription = |
| 119 |
|
|
"Writes the material map as a float32 GeoTIFF of five bands: the share of soil, sand, " |
| 120 |
|
|
"dust, bedrock and rock at each cell."; |
| 121 |
|
|
}; |
| 122 |
|
38 |
template <typename IO> void Fields(IO& io, MaterialsOutput& output) { |
| 123 |
|
38 |
GeoTiffOutputFields(io, output); |
| 124 |
|
38 |
} |
| 125 |
|
|
|
| 126 |
|
|
template <> struct SpecName<PhotometryOutput> { |
| 127 |
|
|
static constexpr std::string_view kName = "photometry"; |
| 128 |
|
|
static constexpr std::string_view kDescription = |
| 129 |
|
|
"Writes the Hapke parameters the materials mix to as a float32 GeoTIFF of four bands: " |
| 130 |
|
|
"single-scattering albedo, b, c and roughness in degrees."; |
| 131 |
|
|
}; |
| 132 |
|
37 |
template <typename IO> void Fields(IO& io, PhotometryOutput& output) { |
| 133 |
|
37 |
GeoTiffOutputFields(io, output); |
| 134 |
|
37 |
} |
| 135 |
|
|
|
| 136 |
|
|
template <> struct SpecName<MeshOutput> { |
| 137 |
|
|
static constexpr std::string_view kName = "mesh"; |
| 138 |
|
|
static constexpr std::string_view kDescription = |
| 139 |
|
|
"Writes the whole body, from six cube faces: a mesh as glTF (.glb or .gltf), OBJ (.obj) or " |
| 140 |
|
|
"STL (.stl), or a Gaskell ICQ shape model in kilometres (.icq), whose Q is " |
| 141 |
|
|
"cells_per_face."; |
| 142 |
|
|
}; |
| 143 |
|
40 |
template <typename IO> void Fields(IO& io, MeshOutput& output) { |
| 144 |
6/6
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MeshOutput&):
✓ Branch 2 taken 9 times.
✓ Branch 7 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MeshOutput&):
✓ Branch 2 taken 10 times.
✓ Branch 7 taken 10 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MeshOutput&):
✓ Branch 2 taken 21 times.
✓ Branch 7 taken 21 times.
|
80 |
io("path", output.path, |
| 145 |
|
40 |
OutputPathHelp("File to write, ending in .glb, .gltf, .obj, .stl or .icq")); |
| 146 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MeshOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MeshOutput&):
✓ Branch 4 taken 10 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MeshOutput&):
✓ Branch 4 taken 21 times.
|
40 |
io("cells_per_face", output.cellsPerFace, |
| 147 |
|
|
"Quads along each edge of the six cube faces, 1 to 4096; more give a finer mesh, with two " |
| 148 |
|
|
"triangles per quad.", |
| 149 |
|
40 |
"", Between(1.0, 4096.0)); |
| 150 |
3/3
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::MeshOutput&):
✓ Branch 4 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::MeshOutput&):
✓ Branch 4 taken 10 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::MeshOutput&):
✓ Branch 4 taken 21 times.
|
40 |
io("spacing", output.spacing, |
| 151 |
|
|
"Sample spacing in metres the heights are evaluated at, which sets the finest features " |
| 152 |
|
|
"kept; unset uses a quad's side at a face's centre.", |
| 153 |
|
40 |
"m", Above(0.0)); |
| 154 |
|
40 |
} |
| 155 |
|
|
|
| 156 |
|
|
template <> struct SpecName<TerrainMeshOutput> { |
| 157 |
|
|
static constexpr std::string_view kName = "terrain_mesh"; |
| 158 |
|
|
static constexpr std::string_view kDescription = |
| 159 |
|
|
"Writes the generated heights as a triangle mesh, a vertex per cell with data, as glTF " |
| 160 |
|
|
"(.glb or .gltf), OBJ (.obj) or STL (.stl), in the frame boulder models are written in."; |
| 161 |
|
|
}; |
| 162 |
|
35 |
template <typename IO> void Fields(IO& io, TerrainMeshOutput& output) { |
| 163 |
6/6
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::TerrainMeshOutput&):
✓ Branch 3 taken 9 times.
✓ Branch 8 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::TerrainMeshOutput&):
✓ Branch 3 taken 6 times.
✓ Branch 8 taken 6 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::TerrainMeshOutput&):
✓ Branch 3 taken 20 times.
✓ Branch 8 taken 20 times.
|
35 |
io("path", output.path, OutputPathHelp("File to write, ending in .glb, .gltf, .obj or .stl")); |
| 164 |
9/9
void terraingen::config::Fields<terraingen::config::(anonymous namespace)::SchemaWriter>(terraingen::config::(anonymous namespace)::SchemaWriter&, terraingen::TerrainMeshOutput&):
✓ Branch 3 taken 9 times.
✓ Branch 6 taken 9 times.
✓ Branch 11 taken 9 times.
void terraingen::config::Fields<terraingen::config::Reader>(terraingen::config::Reader&, terraingen::TerrainMeshOutput&):
✓ Branch 3 taken 6 times.
✓ Branch 6 taken 6 times.
✓ Branch 11 taken 6 times.
void terraingen::config::Fields<terraingen::config::Writer>(terraingen::config::Writer&, terraingen::TerrainMeshOutput&):
✓ Branch 3 taken 20 times.
✓ Branch 6 taken 20 times.
✓ Branch 11 taken 20 times.
|
35 |
io("region", output.region, RegionHelp("the mesh covers") + "."); |
| 165 |
|
35 |
} |
| 166 |
|
|
|
| 167 |
|
|
} // namespace terraingen::config |
| 168 |
|
|
|