PickHit Derived Type

type, public :: PickHit

What a pick found (pick): the frame it belongs to and, for trajectories, the artist (select type to use it) and the trajectory.


Inherits

type~~pickhit~~InheritsGraph type~pickhit PickHit type~referenceframe ReferenceFrame type~pickhit->type~referenceframe frame type~trajectory Trajectory type~pickhit->type~trajectory trajectory type~referenceframe->type~referenceframe follow_frame_ c_ptr c_ptr type~referenceframe->c_ptr light_node, light_switch, node_, contents_node, axis_node, axis_label_node, axis_arrow, axis_text, name_label_node, name_text type~framepointer FramePointer type~referenceframe->type~framepointer children, parents type~trajectoryfollower TrajectoryFollower type~referenceframe->type~trajectoryfollower follower_ type~framepointer->type~referenceframe p type~datasource DataSource type~trajectoryfollower->type~datasource sources_ type~trajectorypointer TrajectoryPointer type~trajectoryfollower->type~trajectorypointer trajs type~trajectorypointer->type~trajectory p

Components

Type Visibility Attributes Name Initial
class(*), public, pointer :: artist => null()

the trajectory artist (curves, segments, markers)

real(kind=wp), public :: distance = 0.0_wp

its depth from the eye (nearest first)

class(ReferenceFrame), public, pointer :: frame => null()

the frame hit (what it draws, or its origin)

integer, public :: index = 0

For curves, the trajectory point the hit is after (on the segment from it to the next); segments: the segment (from point 1 + (index - 1) * stride); markers: the point (start, end) or the intermediate marker's number

integer, public :: kind = 0

PICK_*

real(kind=wp), public :: latitude = 0.0_wp

(bodies: geodetic, radians (Sphere, TerrainBody))

real(kind=wp), public :: local(3) = 0.0_wp

the point hit, in the frame's coordinates

real(kind=wp), public :: longitude = 0.0_wp

(bodies: geodetic, radians (Sphere, TerrainBody))

integer, public :: marker = 0

(markers: MARKER_START, MARKER_END or MARKER_INTERMEDIATE)

real(kind=wp), public :: pixels = 0.0_wp

its distance from the cursor (framebuffer pixels; 0 on a body)

real(kind=wp), public :: position(3) = 0.0_wp

the point hit, in the root frame

real(kind=wp), public :: time = 0.0_wp

(trajectories: the time there (interpolated on curves))

type(Trajectory), public, pointer :: trajectory => null()

(trajectories: the artist's trajectory)


Source Code

    type, public :: PickHit
        integer :: kind = 0                                 !! PICK_*
        class(ReferenceFrame), pointer :: frame => null()   !! the frame hit (what it draws, or its origin)
        class(*), pointer :: artist => null()               !! the trajectory artist (curves, segments, markers)
        type(Trajectory), pointer :: trajectory => null()   !! (trajectories: the artist's trajectory)
        !> For curves, the trajectory point the hit is after (on the segment from it
        !> to the next); segments: the segment (from point 1 + (index - 1) *
        !> stride); markers: the point (start, end) or the intermediate
        !> marker's number
        integer :: index = 0
        integer :: marker = 0                               !! (markers: MARKER_START, MARKER_END or MARKER_INTERMEDIATE)
        real(wp) :: time = 0.0_wp                           !! (trajectories: the time there (interpolated on curves))
        real(wp) :: position(3) = 0.0_wp                    !! the point hit, in the root frame
        real(wp) :: local(3) = 0.0_wp                       !! the point hit, in the frame's coordinates
        real(wp) :: distance = 0.0_wp                       !! its depth from the eye (nearest first)
        real(wp) :: pixels = 0.0_wp                         !! its distance from the cursor (framebuffer pixels; 0 on a body)
        real(wp) :: latitude = 0.0_wp, longitude = 0.0_wp   !! (bodies: geodetic, radians (Sphere, TerrainBody))
    end type PickHit