body_radius Function

private pure function body_radius(self)

The body's equatorial radius in scene units (from its profile: the Moon's for 'moon', else the Earth's).

Type Bound

TerrainBody

Arguments

Type IntentOptional Attributes Name
class(TerrainBody), intent(in) :: self

Return Value real(kind=wp)


Called by

proc~~body_radius~2~~CalledByGraph proc~body_radius~2 TerrainBody%body_radius proc~terrain_bound TerrainBody%terrain_bound proc~terrain_bound->proc~body_radius~2 proc~terrain_pick TerrainBody%terrain_pick proc~terrain_pick->proc~body_radius~2

Source Code

    pure real(wp) function body_radius(self)
        class(TerrainBody), intent(in) :: self
        if (self%profile_ == 'moon') then
            body_radius = moon_radius * self%units_per_meter_
        else
            body_radius = earth_radius * self%units_per_meter_
        end if
    end function body_radius