Clip a polyhedron with a half-space or a convex polyhedron
More...
|
pure subroutine, public | mod_cg3_clip_polyhedron::cg3_polyhedron_clipping (polyhedron, clip_polyhedron, clipped_polyhedron, is_empty, is_clipped) |
| Clip a convex polyhedron with a convex polyhedron.
|
|
pure subroutine, public | mod_cg3_clip_polyhedron::cg3_plane_polyhedron_clipping (polyhedron, normal, origin, clipped_polyhedron, is_empty, is_cut) |
| Clip a convex polyhedron with a plane (half-space) using Sugihara's algorithm.
|
|
References:
- Sugihara, K. (1994). A robust and consistent algorithm for intersecting convex polyhedra. In: Computer Graphics Forum. Blackwell Science Ltd. p. 45-54. doi:10.1111/1467-8659.1330045
◆ cg3_plane_polyhedron_clipping()
pure subroutine, public mod_cg3_clip_polyhedron::cg3_plane_polyhedron_clipping |
( |
type(t_polyhedron), intent(in) | polyhedron, |
|
|
double precision, dimension(3), intent(in) | normal, |
|
|
double precision, dimension(3), intent(in) | origin, |
|
|
type(t_polyhedron), intent(out), allocatable | clipped_polyhedron, |
|
|
logical, intent(out) | is_empty, |
|
|
logical, intent(out) | is_cut ) |
- Parameters
-
[in] | polyhedron | convex polyhedron |
[in] | normal | outgoing normal of the half-space |
[in] | origin | point of the clipping plane |
[out] | clipped_polyhedron | clipped polyhedron (convex by construction) |
[out] | is_empty | true if all the points are above the clipping plane |
[out] | is_cut | true if the plane cut the polyhedron |
◆ cg3_polyhedron_clipping()
pure subroutine, public mod_cg3_clip_polyhedron::cg3_polyhedron_clipping |
( |
type(t_polyhedron), intent(in) | polyhedron, |
|
|
type(t_polyhedron), intent(in) | clip_polyhedron, |
|
|
type(t_polyhedron), intent(out), allocatable | clipped_polyhedron, |
|
|
logical, intent(out) | is_empty, |
|
|
logical, intent(out) | is_clipped ) |
- Parameters
-
[in] | polyhedron | convex polyhedron |
[in] | clip_polyhedron | convex clipping polyhedron |
[out] | clipped_polyhedron | clipped polyhedron (convex by construction) |
[out] | is_empty | true if all the points are outside the clipped polyhedron |
[out] | is_clipped | true if polyhedron is clipped |