sphere_pick Subroutine

private subroutine sphere_pick(self, cam, to_root, hits, n)

Picked on the ellipsoid (exact), with the geodetic latitude and longitude of the point hit (in the body's axes: sphere_attitude); else the frame's origin.

Type Bound

Sphere

Arguments

Type IntentOptional Attributes Name
class(Sphere), intent(in), target :: self
type(PickCamera), intent(in) :: cam

the camera and cursor of the pick

real(kind=wp), intent(in) :: to_root(4,4)

the frame's transform to the root frame

type(PickHit), intent(inout), allocatable :: hits(:)

hits so far, in hits(1:n); added to

integer, intent(inout) :: n

number of hits


Calls

proc~~sphere_pick~~CallsGraph proc~sphere_pick Sphere%sphere_pick proc~contents_shown ReferenceFrame%contents_shown proc~sphere_pick->proc~contents_shown proc~pick ReferenceFrame%pick proc~sphere_pick->proc~pick proc~pick_ellipsoid pick_ellipsoid proc~sphere_pick->proc~pick_ellipsoid proc~quat_to_matrix quat_to_matrix proc~sphere_pick->proc~quat_to_matrix proc~radii Sphere%radii proc~sphere_pick->proc~radii proc~add_pick_hit add_pick_hit proc~pick->proc~add_pick_hit proc~point_pick point_pick proc~pick->proc~point_pick proc~wants wants proc~pick->proc~wants proc~pick_ellipsoid->proc~add_pick_hit proc~ray ray proc~pick_ellipsoid->proc~ray proc~ray_ellipsoid ray_ellipsoid proc~pick_ellipsoid->proc~ray_ellipsoid proc~pick_ellipsoid->proc~wants proc~project project proc~point_pick->proc~project

Source Code

    subroutine sphere_pick(self, cam, to_root, hits, n)
        class(Sphere), intent(in), target :: self
        type(PickCamera), intent(in) :: cam                 !! the camera and cursor of the pick
        real(wp), intent(in) :: to_root(4,4)                !! the frame's transform to the root frame
        type(PickHit), allocatable, intent(inout) :: hits(:)  !! hits so far, in hits(1:n); added to
        integer, intent(inout) :: n                         !! number of hits
        if (self%contents_shown()) then
            if (pick_ellipsoid(self, cam, to_root, self%sphere_position_, quat_to_matrix(self%sphere_attitude_), &
                          self%radii(), .true., hits, n)) return
        end if
        call self%ReferenceFrame%pick(cam, to_root, hits, n)
    end subroutine sphere_pick