The star names node for the current names and settings, in place of the old one: a label per named star drawn up to the names' magnitude, under the stars' switch (shown with them), turned by the sky's attitude.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SkySphere), | intent(inout) | :: | self |
subroutine make_name_node(self) type(SkySphere), intent(inout) :: self type(c_ptr) :: label integer :: i if (c_associated(self%name_node)) then call check_status(vkf_node_remove_child(self%star_switch, self%name_node), 'SkySphere') call vkf_node_delete(self%name_node) self%name_node = c_null_ptr end if self%n_labels = 0 if (.not. self%names_shown .or. self%n_names == 0) return if (.not. allocated(self%names_font)) self%names_font = '' self%name_node = vkf_transform_create() if (.not. c_associated(self%name_node)) return do i = 1, self%n_names if (self%names(i)%mag > self%names_max_mag) cycle ! (two spaces: beside the star, not over it) label = label_create(' '//self%names(i)%text, real(self%stars(1:3, self%names(i)%star), wp), & self%names_rgba, self%names_size, 0.0_wp, NAME_ALIGNMENT, self%names_font) if (.not. c_associated(label)) exit ! (no font: said) call check_status(vkf_label_set_at_infinity(label, 1_c_int), 'SkySphere') call check_status(vkf_node_add_child(self%name_node, label), 'SkySphere') call vkf_node_delete(label) ! (held by the node) self%n_labels = self%n_labels + 1 end do call apply_name_attitude(self) if (self%shown) call check_status(vkf_compile_node(self%name_node), 'SkySphere') call check_status(vkf_node_add_child(self%star_switch, self%name_node), 'SkySphere') call apply_mode(self) end subroutine make_name_node