The model's bounding sphere in the frame (through the model transform).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(Model), | intent(in) | :: | self | |||
| real(kind=wp), | intent(out) | :: | center(3) |
the bounding sphere, frame coordinates (scene units) |
||
| real(kind=wp), | intent(out) | :: | radius |
the bounding sphere, frame coordinates (scene units) |
subroutine model_frame_bound(self, center, radius) class(Model), intent(in) :: self real(wp), intent(out) :: center(3), radius !! the bounding sphere, frame coordinates (scene units) real(wp) :: m(4,4) m = frame_matrix(self%model_position_, self%model_attitude_, self%scale_, self%pivot_) center = matmul(m(1:3, 1:3), self%bound_center) + m(1:3, 4) radius = self%bound_radius * maxval(abs(self%scale_)) end subroutine model_frame_bound