A body's own radius: a Sphere's equatorial one, a TerrainBody's; else 0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ReferenceFrame), | intent(in) | :: | frame |
the body or the light |
real(wp) function frame_radius(frame) result(r) class(ReferenceFrame), intent(in) :: frame !! the body or the light real(wp) :: radii(3) r = 0.0_wp select type (frame) class is (Sphere) radii = frame%radii() r = max(radii(1), radii(2)) class is (TerrainBody) r = frame%body_radius() end select end function frame_radius