The arrow: a unit shaft and head under their transforms, in a switch.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(VectorHandle), | intent(inout) | :: | self | |||
| type(c_ptr), | intent(in) | :: | viewer |
a window's viewer (null: headless) |
||
| type(c_ptr), | intent(in) | :: | group |
the frame's contents group |
subroutine vector_build_contents(self, viewer, group) class(VectorHandle), intent(inout) :: self type(c_ptr), intent(in) :: viewer !! a window's viewer (null: headless) type(c_ptr), intent(in) :: group !! the frame's contents group self%shaft_mesh = unit_part(1.0_c_double, 0.0_c_double, 1.0_c_double, 1.0_c_double) ! (a closed cylinder) self%head_mesh = unit_part(0.0_c_double, 1.0_c_double, 0.0_c_double, 1.0_c_double) ! (a cone on a disk) if (.not. (c_associated(self%shaft_mesh) .and. c_associated(self%head_mesh))) then write(*, '(a)') 'vkframes: VectorHandle '//self%name()//': could not build its arrow' return end if self%switch = vkf_switch_create() self%shaft = vkf_transform_create() self%head = vkf_transform_create() call check_status(vkf_node_add_child(self%shaft, self%shaft_mesh)) call check_status(vkf_node_add_child(self%head, self%head_mesh)) call check_status(vkf_node_add_child(self%switch, self%shaft)) call check_status(vkf_node_add_child(self%switch, self%head)) call check_status(vkf_node_add_child(group, self%switch)) call self%show_state() call update_arrow(self) if (c_associated(viewer)) n_shown = n_shown + 1 end subroutine vector_build_contents