layers/craters/profiles/martin_parkes_dunstan.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /// @file | ||
| 2 | /// @brief The simple-crater profile of Martin, Parkes and Dunstan (2014). | ||
| 3 | #pragma once | ||
| 4 | |||
| 5 | #include "terraingen/layers/craters/profiles/profile.h" | ||
| 6 | |||
| 7 | namespace terraingen { | ||
| 8 | |||
| 9 | /// Simple-crater profile of Martin, Parkes and Dunstan (2014): bowl, inner rim, outer rim | ||
| 10 | /// and ejecta polynomials joined continuously; degradation rounds the rim. | ||
| 11 | class MartinParkesDunstanProfile final : public CraterProfile { | ||
| 12 | public: | ||
| 13 | /// Reads the fresh and current rim heights and current depth of `state`. | ||
| 14 | /// @throws std::invalid_argument if the state's depth is not positive or its current rim height | ||
| 15 | /// is negative or exceeds the fresh rim height. | ||
| 16 | double Height(double distance, double diameter, const CraterState& state) const override; | ||
| 17 | |||
| 18 | 874078 | double ReachRadii() const override { | |
| 19 | 874078 | return 2.0; | |
| 20 | } | ||
| 21 | }; | ||
| 22 | |||
| 23 | } // namespace terraingen | ||
| 24 |