Axis k's arrow and label, in their switches (in place of the old ones; compiled first if the window already runs).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(ReferenceFrame), | intent(inout) | :: | self | |||
| integer, | intent(in) | :: | k |
the axis: 1 (x), 2 (y) or 3 (z) |
subroutine make_axis(self, k) class(ReferenceFrame), intent(inout) :: self integer, intent(in) :: k !! the axis: 1 (x), 2 (y) or 3 (z) real(wp) :: e(3), len, head, rb, rh, tip(3) e = 0.0_wp e(k) = 1.0_wp len = self%axis_len(k) head = self%axis_head_ratio(k) if (head <= 0.0_wp .or. head >= 1.0_wp) head = 0.3_wp rb = self%axis_body_radius(k) if (rb <= 0.0_wp) rb = 0.05_wp * len rh = self%axis_head_radius(k) if (rh <= 0.0_wp) rh = 0.1_wp * len call replace_child(self, self%axis_node(k), self%axis_arrow(k), & arrow_create(self%axis_base(:, k), e, (1.0_wp - head) * len, head * len, rb, rh, & real(self%color_, c_float))) ! the label at the tip, 0.4 of the axis length tall, at most label_size pixels tip = self%axis_base(:, k) + len * e call replace_child(self, self%axis_label_node(k), self%axis_text(k), & label_create(self%axis_label(2**(k-1)), tip, self%color_, -0.4_wp * len, & real(self%label_size_, wp), self%label_alignment_, self%label_font())) call update_switches(self) ! (a node added to a switch is shown) end subroutine make_axis