apply_attitude Subroutine

private subroutine apply_attitude(self, n)

The attitude matrix (column-major 4x4) into a sky node's style.

Arguments

Type IntentOptional Attributes Name
type(SkySphere), intent(in) :: self
type(c_ptr), intent(in) :: n

a sky node, texture or stars (null: nothing done)


Calls

proc~~apply_attitude~~CallsGraph proc~apply_attitude apply_attitude interface~vkf_sky_style vkf_sky_style 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~check_status check_status proc~apply_attitude->proc~check_status proc~quat_to_matrix quat_to_matrix proc~apply_attitude->proc~quat_to_matrix

Called by

proc~~apply_attitude~~CalledByGraph proc~apply_attitude apply_attitude proc~make_line_node make_line_node proc~make_line_node->proc~apply_attitude proc~make_star_node make_star_node proc~make_star_node->proc~apply_attitude proc~make_texture_node make_texture_node proc~make_texture_node->proc~apply_attitude proc~set_attitude~2 SkySphere%set_attitude proc~set_attitude~2->proc~apply_attitude proc~node~2 SkySphere%node proc~node~2->proc~make_line_node proc~node~2->proc~make_star_node proc~node~2->proc~make_texture_node proc~set_constellations SkySphere%set_constellations proc~set_constellations->proc~make_line_node proc~set_star_data SkySphere%set_star_data proc~set_star_data->proc~make_star_node proc~set_texture_map~2 SkySphere%set_texture_map proc~set_texture_map~2->proc~make_texture_node proc~set_sky WindowProxy%set_sky proc~set_sky->proc~node~2

Source Code

    subroutine apply_attitude(self, n)
        type(SkySphere), intent(in) :: self
        type(c_ptr), intent(in) :: n                        !! a sky node, texture or stars (null: nothing done)
        real(c_float), dimension(:,:), pointer :: m
        type(c_ptr) :: style
        if (.not. c_associated(n)) return
        style = vkf_sky_style(n)
        if (.not. c_associated(style)) return
        call c_f_pointer(style, m, [4, 4])
        m = 0.0_c_float
        m(1:3, 1:3) = real(quat_to_matrix(self%attitude_), c_float)
        m(4, 4) = 1.0_c_float
        call check_status(vkf_sky_style_changed(n), 'SkySphere')
    end subroutine apply_attitude