The star node for the current stars, in place of the old one.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(SkySphere), | intent(inout) | :: | self |
subroutine make_star_node(self) type(SkySphere), intent(inout) :: self real(c_float), dimension(:,:), pointer :: p integer(c_int) :: capacity type(c_ptr) :: data if (c_associated(self%star_node)) then call check_status(vkf_node_remove_child(self%star_switch, self%star_node), 'SkySphere') call vkf_node_delete(self%star_node) self%star_node = c_null_ptr end if if (self%n_stars > 0) then self%star_node = vkf_stars_create(int(self%n_stars, c_int)) if (c_associated(self%star_node)) then data = vkf_sky_stars(self%star_node, capacity) if (c_associated(data)) then call c_f_pointer(data, p, [8, int(capacity)]) p(:, 1:self%n_stars) = self%stars(:, 1:self%n_stars) call check_status(vkf_sky_stars_changed(self%star_node, int(self%n_stars, c_int)), 'SkySphere') end if call apply_attitude(self, self%star_node) if (self%shown) call check_status(vkf_compile_node(self%star_node), 'SkySphere') call check_status(vkf_node_add_child(self%star_switch, self%star_node), 'SkySphere') end if end if call make_name_node(self) ! (the names after the stars: in front of them) call apply_mode(self) end subroutine make_star_node