set_sphere_attitude Subroutine

private subroutine set_sphere_attitude(self, q)

Attitude of the body in its frame (quaternion [x, y, z, w]), e.g. to orient its texture.

Type Bound

Sphere

Arguments

Type IntentOptional Attributes Name
class(Sphere), intent(inout) :: self
real(kind=wp), intent(in) :: q(4)

quaternion [x, y, z, w] (normalized here)


Calls

proc~~set_sphere_attitude~~CallsGraph proc~set_sphere_attitude Sphere%set_sphere_attitude proc~quat_normalize quat_normalize proc~set_sphere_attitude->proc~quat_normalize proc~update_sphere_transform update_sphere_transform proc~set_sphere_attitude->proc~update_sphere_transform interface~vkf_transform_set_matrix vkf_transform_set_matrix proc~update_sphere_transform->interface~vkf_transform_set_matrix proc~frame_matrix frame_matrix proc~update_sphere_transform->proc~frame_matrix proc~name ReferenceFrame%name proc~update_sphere_transform->proc~name proc~radii Sphere%radii proc~update_sphere_transform->proc~radii proc~quat_to_matrix quat_to_matrix proc~frame_matrix->proc~quat_to_matrix

Source Code

    subroutine set_sphere_attitude(self, q)
        class(Sphere), intent(inout) :: self
        real(wp), intent(in) :: q(4)                        !! quaternion [x, y, z, w] (normalized here)
        self%sphere_attitude_ = quat_normalize(q)
        call update_sphere_transform(self)
    end subroutine set_sphere_attitude