new_terrain_body Function

private function new_terrain_body(name, profile, units_per_meter, color) result(b)

A body named name in Rocky's tiling profile profile (default '': the Earth; 'moon': the Moon), drawn at units_per_meter scene units per meter (default 1e-3), in color color where it has no imagery ([r, g, b] or [r, g, b, a]; default the frame's).

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: name

the frame's name

character(len=*), intent(in), optional :: profile

Rocky's tiling profile (default '')

real(kind=wp), intent(in), optional :: units_per_meter

scene units per meter (default 1e-3)

real(kind=wp), intent(in), optional :: color(:)

[r, g, b] or [r, g, b, a] (0 to 1)

Return Value type(TerrainBody)


Called by

proc~~new_terrain_body~~CalledByGraph proc~new_terrain_body new_terrain_body interface~terrainbody TerrainBody interface~terrainbody->proc~new_terrain_body

Source Code

    function new_terrain_body(name, profile, units_per_meter, color) result(b)
        character(len=*), intent(in) :: name                       !! the frame's name
        character(len=*), intent(in), optional :: profile          !! Rocky's tiling profile (default '')
        real(wp), intent(in), optional :: units_per_meter          !! scene units per meter (default 1e-3)
        real(wp), intent(in), optional :: color(:)                 !! [r, g, b] or [r, g, b, a] (0 to 1)
        type(TerrainBody) :: b
        b%ReferenceFrame = ReferenceFrame(name, color)
        b%profile_ = ''
        if (present(profile)) b%profile_ = profile
        if (present(units_per_meter)) b%units_per_meter_ = units_per_meter
        allocate(b%layers(4))
    end function new_terrain_body