反時計回りに隣接する辺ペアに対し、対応する長方形コーナー座標を返す。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i32), | intent(in) | :: | edge_from | |||
| integer(kind=i32), | intent(in) | :: | edge_to | |||
| real(kind=dp), | intent(in) | :: | x_min | |||
| real(kind=dp), | intent(in) | :: | x_max | |||
| real(kind=dp), | intent(in) | :: | y_min | |||
| real(kind=dp), | intent(in) | :: | y_max | |||
| real(kind=dp), | intent(in) | :: | z_plane | |||
| real(kind=dp), | intent(out) | :: | corner(3) |
subroutine corner_between(edge_from, edge_to, x_min, x_max, y_min, y_max, z_plane, corner) integer(i32), intent(in) :: edge_from, edge_to real(dp), intent(in) :: x_min, x_max, y_min, y_max, z_plane real(dp), intent(out) :: corner(3) select case (edge_from) case (2_i32) if (edge_to /= 4_i32) error stop "invalid edge transition" corner = [x_max, y_max, z_plane] case (4_i32) if (edge_to /= 1_i32) error stop "invalid edge transition" corner = [x_min, y_max, z_plane] case (1_i32) if (edge_to /= 3_i32) error stop "invalid edge transition" corner = [x_min, y_min, z_plane] case (3_i32) if (edge_to /= 2_i32) error stop "invalid edge transition" corner = [x_max, y_min, z_plane] case default error stop "unknown edge id" end select end subroutine corner_between