reposition_axes Subroutine

private subroutine reposition_axes(self)

Place the axes for what the frame draws, when it is first shown (unless move_*_axis was called): at its bound's surface, half the bound's radius long (as OpenFrames' Sphere and Model do); at the origin, 1 long, for a frame that draws nothing.

Type Bound

ReferenceFrame

Arguments

Type IntentOptional Attributes Name
class(ReferenceFrame), intent(inout) :: self

Calls

proc~~reposition_axes~~CallsGraph proc~reposition_axes ReferenceFrame%reposition_axes proc~bound ReferenceFrame%bound proc~reposition_axes->proc~bound

Called by

proc~~reposition_axes~~CalledByGraph proc~reposition_axes ReferenceFrame%reposition_axes proc~build_decorations build_decorations proc~build_decorations->proc~reposition_axes proc~realize ReferenceFrame%realize proc~realize->proc~build_decorations proc~realize->proc~realize proc~add_child ReferenceFrame%add_child proc~add_child->proc~realize proc~frame WindowProxy%frame proc~frame->proc~realize proc~resize WindowProxy%resize proc~resize->proc~frame proc~run WindowProxy%run proc~run->proc~frame

Source Code

    subroutine reposition_axes(self)
        class(ReferenceFrame), intent(inout) :: self
        real(wp) :: c(3), r, e(3)
        integer :: k
        call self%bound(c, r)
        if (r <= 0.0_wp) return
        do k = 1, 3
            e = 0.0_wp
            e(k) = 1.0_wp
            self%axis_base(:, k) = c + r * e
            self%axis_len(k) = 0.5_wp * r
        end do
    end subroutine reposition_axes