set_radius Subroutine

private subroutine set_radius(self, radius)

The sphere's radius (scene units, > 0; default 1); can change at any time.

Type Bound

Sphere

Arguments

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

scene units (<= 0: ignored)


Calls

proc~~set_radius~~CallsGraph proc~set_radius Sphere%set_radius proc~update_sphere_transform update_sphere_transform proc~set_radius->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_radius(self, radius)
        class(Sphere), intent(inout) :: self
        real(wp), intent(in) :: radius                      !! scene units (<= 0: ignored)
        if (radius <= 0.0_wp) return
        self%radius_ = radius
        call update_sphere_transform(self)
    end subroutine set_radius