distribution/synthterrain.cpp
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "terraingen/distribution/synthterrain.h" | ||
| 2 | |||
| 3 | #include <stdexcept> | ||
| 4 | |||
| 5 | namespace terraingen { | ||
| 6 | |||
| 7 | 15 | std::shared_ptr<PowerLawSfd> SynthterrainBoulderDistribution(SynthterrainBoulders boulders) { | |
| 8 | 15 | switch (boulders) { | |
| 9 | 4 | case SynthterrainBoulders::InterCrater: | |
| 10 | 8 | return std::make_shared<PowerLawSfd>(0.0001, 1.75457); | |
| 11 | 7 | case SynthterrainBoulders::Haworth: | |
| 12 | 14 | return std::make_shared<PowerLawSfd>(0.002, 2.6607); | |
| 13 | 3 | case SynthterrainBoulders::ViperSpecification: | |
| 14 | 6 | return std::make_shared<PowerLawSfd>(0.0003, 2.482); | |
| 15 | } | ||
| 16 | 1 | throw std::invalid_argument("Unknown synthterrain boulder distribution"); | |
| 17 | } | ||
| 18 | |||
| 19 | } // namespace terraingen | ||
| 20 |