node Function

private function node(self, viewer) result(n)

The sky's node, made on first use, for a window (set_sky). For a window's viewer (null: headless), nodes made later (a new texture or catalog) are compiled for the windows running.

Type Bound

SkySphere

Arguments

Type IntentOptional Attributes Name
class(SkySphere), intent(inout) :: self
type(c_ptr), intent(in) :: viewer

a window's viewer (null: headless)

Return Value type(c_ptr)


Calls

proc~~node~2~~CallsGraph proc~node~2 SkySphere%node interface~vkf_node_add_child vkf_node_add_child proc~node~2->interface~vkf_node_add_child interface~vkf_switch_create vkf_switch_create proc~node~2->interface~vkf_switch_create interface~vkf_transform_create vkf_transform_create proc~node~2->interface~vkf_transform_create proc~check_status check_status proc~node~2->proc~check_status proc~make_line_node make_line_node proc~node~2->proc~make_line_node proc~make_star_node make_star_node proc~node~2->proc~make_star_node proc~make_texture_node make_texture_node proc~node~2->proc~make_texture_node proc~make_line_node->interface~vkf_node_add_child proc~make_line_node->proc~check_status interface~vkf_compile_node vkf_compile_node proc~make_line_node->interface~vkf_compile_node interface~vkf_node_delete vkf_node_delete proc~make_line_node->interface~vkf_node_delete interface~vkf_node_remove_child vkf_node_remove_child proc~make_line_node->interface~vkf_node_remove_child interface~vkf_sky_lines_create vkf_sky_lines_create proc~make_line_node->interface~vkf_sky_lines_create interface~vkf_sky_stars vkf_sky_stars proc~make_line_node->interface~vkf_sky_stars interface~vkf_sky_stars_changed vkf_sky_stars_changed proc~make_line_node->interface~vkf_sky_stars_changed interface~vkf_sky_style vkf_sky_style proc~make_line_node->interface~vkf_sky_style proc~apply_attitude apply_attitude proc~make_line_node->proc~apply_attitude proc~apply_mode apply_mode proc~make_line_node->proc~apply_mode proc~make_star_node->interface~vkf_node_add_child proc~make_star_node->proc~check_status proc~make_star_node->interface~vkf_compile_node proc~make_star_node->interface~vkf_node_delete proc~make_star_node->interface~vkf_node_remove_child proc~make_star_node->interface~vkf_sky_stars proc~make_star_node->interface~vkf_sky_stars_changed interface~vkf_stars_create vkf_stars_create proc~make_star_node->interface~vkf_stars_create proc~make_star_node->proc~apply_attitude proc~make_star_node->proc~apply_mode proc~make_name_node make_name_node proc~make_star_node->proc~make_name_node proc~make_texture_node->interface~vkf_node_add_child proc~make_texture_node->proc~check_status proc~make_texture_node->interface~vkf_compile_node proc~make_texture_node->interface~vkf_node_delete proc~make_texture_node->interface~vkf_node_remove_child interface~vkf_sky_texture_create vkf_sky_texture_create proc~make_texture_node->interface~vkf_sky_texture_create proc~make_texture_node->proc~apply_attitude proc~make_texture_node->proc~apply_mode proc~apply_attitude->proc~check_status proc~apply_attitude->interface~vkf_sky_style interface~vkf_sky_style_changed vkf_sky_style_changed proc~apply_attitude->interface~vkf_sky_style_changed proc~quat_to_matrix quat_to_matrix proc~apply_attitude->proc~quat_to_matrix proc~apply_mode->proc~check_status interface~vkf_switch_set vkf_switch_set proc~apply_mode->interface~vkf_switch_set proc~make_name_node->interface~vkf_node_add_child proc~make_name_node->interface~vkf_transform_create proc~make_name_node->proc~check_status proc~make_name_node->interface~vkf_compile_node proc~make_name_node->interface~vkf_node_delete proc~make_name_node->interface~vkf_node_remove_child proc~make_name_node->proc~apply_mode interface~vkf_label_set_at_infinity vkf_label_set_at_infinity proc~make_name_node->interface~vkf_label_set_at_infinity proc~apply_name_attitude apply_name_attitude proc~make_name_node->proc~apply_name_attitude proc~label_create label_create proc~make_name_node->proc~label_create proc~apply_name_attitude->proc~check_status proc~apply_name_attitude->proc~quat_to_matrix interface~vkf_transform_set_matrix vkf_transform_set_matrix proc~apply_name_attitude->interface~vkf_transform_set_matrix interface~vkf_label_create vkf_label_create proc~label_create->interface~vkf_label_create proc~get_font get_font proc~label_create->proc~get_font proc~vsg_alignment vsg_alignment proc~label_create->proc~vsg_alignment interface~vkf_font_read vkf_font_read proc~get_font->interface~vkf_font_read proc~find_font find_font proc~get_font->proc~find_font proc~find_in_dirs find_in_dirs proc~find_font->proc~find_in_dirs

Called by

proc~~node~2~~CalledByGraph proc~node~2 SkySphere%node proc~set_sky WindowProxy%set_sky proc~set_sky->proc~node~2

Source Code

    function node(self, viewer) result(n)
        class(SkySphere), intent(inout) :: self
        type(c_ptr), intent(in) :: viewer                   !! a window's viewer (null: headless)
        type(c_ptr) :: n
        if (.not. c_associated(self%root)) then
            self%root = vkf_transform_create()
            self%texture_switch = vkf_switch_create()
            self%star_switch = vkf_switch_create()
            self%line_switch = vkf_switch_create()
            call check_status(vkf_node_add_child(self%root, self%texture_switch), 'SkySphere')   ! the texture first,
            call check_status(vkf_node_add_child(self%root, self%line_switch), 'SkySphere')      ! the constellations,
            call check_status(vkf_node_add_child(self%root, self%star_switch), 'SkySphere')      ! the stars over them
            call make_texture_node(self)
            call make_line_node(self)
            call make_star_node(self)
            self%shown = c_associated(viewer)          ! (the first nodes are compiled with the scene)
        end if
        n = self%root
    end function node