arrow_sizes Subroutine

private pure subroutine arrow_sizes(self, len, head_len, head_radius)

The arrow's length, its head's length and radius (scene units).

Arguments

Type IntentOptional Attributes Name
class(VectorHandle), intent(in) :: self
real(kind=wp), intent(out) :: len

the arrow's length (the tip's distance)

real(kind=wp), intent(out) :: head_len

its head's length

real(kind=wp), intent(out) :: head_radius

its head's radius


Calls

proc~~arrow_sizes~~CallsGraph proc~arrow_sizes arrow_sizes proc~tip VectorHandle%tip proc~arrow_sizes->proc~tip

Called by

proc~~arrow_sizes~~CalledByGraph proc~arrow_sizes arrow_sizes proc~update_arrow update_arrow proc~update_arrow->proc~arrow_sizes proc~vector_pick VectorHandle%vector_pick proc~vector_pick->proc~arrow_sizes proc~set_display_scale VectorHandle%set_display_scale proc~set_display_scale->proc~update_arrow proc~set_head_size VectorHandle%set_head_size proc~set_head_size->proc~update_arrow proc~set_vector VectorHandle%set_vector proc~set_vector->proc~update_arrow proc~vector_build_contents VectorHandle%vector_build_contents proc~vector_build_contents->proc~update_arrow proc~vector_move_handle_point VectorHandle%vector_move_handle_point proc~vector_move_handle_point->proc~set_vector

Source Code

    pure subroutine arrow_sizes(self, len, head_len, head_radius)
        class(VectorHandle), intent(in) :: self
        real(wp), intent(out) :: len                        !! the arrow's length (the tip's distance)
        real(wp), intent(out) :: head_len                   !! its head's length
        real(wp), intent(out) :: head_radius                !! its head's radius
        len = norm2(self%tip())
        head_len = 0.2_wp * len
        if (self%head_size_ > 0.0_wp) head_len = min(self%head_size_, 0.5_wp * len)
        head_radius = 0.35_wp * head_len
    end subroutine arrow_sizes