version 0.6.0

Functions/Subroutines

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. More...
 
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. More...
 
pure subroutine mod_cg3_clip_polyhedron::partition_polyhedron (polyhedron, normal, origin, partition, clipped_polyhedron)
 Reconstruct the part of the polyhedron that belongs to the half-space. More...
 

Detailed Description

References:

Function/Subroutine Documentation

◆ 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]polyhedronconvex polyhedron
[in]normaloutgoing normal of the half-space
[in]originpoint of the clipping plane
[out]clipped_polyhedronclipped polyhedron (convex by construction)
[out]is_emptytrue if all the points are above the clipping plane
[out]is_cuttrue 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]polyhedronconvex polyhedron
[in]clip_polyhedronconvex clipping polyhedron
[out]clipped_polyhedronclipped polyhedron (convex by construction)
[out]is_emptytrue if all the points are outside the clipped polyhedron
[out]is_clippedtrue if polyhedron is clipped

◆ partition_polyhedron()

pure subroutine mod_cg3_clip_polyhedron::partition_polyhedron ( type(t_polyhedron), intent(in)  polyhedron,
double precision, dimension(3), intent(in)  normal,
double precision, dimension(3), intent(in)  origin,
logical, dimension(:), intent(in)  partition,
type(t_polyhedron), intent(out), allocatable  clipped_polyhedron 
)
Parameters
[in]polyhedronany convex polyhedron
[in]normaloutgoing normal of the half-space
[in]originpoint of the clipping plane
[in]partitionpartition of vertices as a boolean array
[out]clipped_polyhedronclipped polyhedron (convex by construction)