0.6.0
Loading...
Searching...
No Matches
mod_cg3_flood_polyhedron Module Reference

Data Types

type  t_chained_polygon
 Structure to track the state of the current algorithm. It stores the status of the cap polygon. More...
 
type  t_chained_polygon_item
 Single item of the structure that track the state of the current algorithm. This structure contains a polygon stored as a list of point and edges. It also embbed information about neighbor edge, neighbor face, and if the current point is a point of the polyhedron. More...
 

Functions/Subroutines

pure subroutine, public cg3_flood_polyhedron (polyhedron, normal, volume, polyhedron_full, polyhedron_empty, polygon)
 Flood algorithm based on Diot & Francois 2016 publication.
 
pure subroutine, public cg3_flood_polyhedron_centroid (polyhedron, normal, volume, centroid_full, polygon)
 
pure subroutine cg3_chained_polygon_add_point (polygon, point, point_id, edge, face)
 Add a point to the chained polygon.
 
pure subroutine cg3_reset_chained_polygon (polygon)
 Reset a chained polygon.
 
pure subroutine cg3_move_alloc_chained_polygon (polygon1, polygon2)
 move_alloc of a chained_polygon. Avoid unnecessary copies.
 
pure subroutine cg3_create_edge_set (polyhedron, point_to_edge, item, inv_n_group, group_max)
 Create and order the set of edges passing through a point.
 
pure recursive subroutine cg3_quicksort_n_distance (n_distance, n_point, p, r)
 Quick sort algorithm for the distance along the n-axis.
 
pure subroutine cg3_partition (n_distance, n_point, p, r, partition)
 Partition function for the quick sort algorithm.
 
pure integer function cg3_polyhedron_find_common_edge (polyhedron, point_to_edge, p1, p2)
 Find an edge common to two points. Return 0 if no edge is found.
 
pure integer function cg3_polyhedron_find_common_face_3_points (polyhedron, point_to_edge, p1, p2, p3)
 Find a face common to three points. Return 0 if no face is found.
 
pure integer function cg3_polyhedron_find_common_face_2_edges (polyhedron, e1, e2)
 Find a face common to two edges. Return 0 if no face is found.
 
pure integer function cg3_polyhedron_find_common_face_edge_point (polyhedron, point_to_edge, e, p)
 Find a face common to an edge and a point. Return 0 if no face is found.
 
pure integer function cg3_polyhedron_find_common_face_2_points_up (polyhedron, point_to_edge, p1, p2, inv_n_group, max_group)
 Find a face common to two points such that the face goes up. Return 0 if no face is found. Note that this algorithm requires inv_n_group to avoid real number comparison.
 

Function/Subroutine Documentation

◆ cg3_chained_polygon_add_point()

pure subroutine mod_cg3_flood_polyhedron::cg3_chained_polygon_add_point ( class(t_chained_polygon), intent(inout) polygon,
double precision, dimension(3), intent(in) point,
integer, intent(in) point_id,
integer, intent(in) edge,
integer, intent(in) face )
private

Add a point to the chained polygon.

◆ cg3_create_edge_set()

pure subroutine mod_cg3_flood_polyhedron::cg3_create_edge_set ( type(t_polyhedron), intent(in) polyhedron,
type(t_incidence_matrix), dimension(:), intent(inout) point_to_edge,
type(t_chained_polygon_item), intent(inout) item,
integer, dimension(:), intent(in) inv_n_group,
integer, intent(in) group_max )
private

Create and order the set of edges passing through a point.

Seen from the inside of the polyhedron, edges are ordered counterclockwise around the point. Place the first edge that goes up in first position

From Diot & François 2016

◆ cg3_flood_polyhedron_centroid()

pure subroutine, public mod_cg3_flood_polyhedron::cg3_flood_polyhedron_centroid ( type(t_polyhedron), intent(in) polyhedron,
double precision, dimension(3), intent(in) normal,
double precision, intent(in) volume,
double precision, dimension(3), intent(out) centroid_full,
type(t_chained_polygon), intent(out), optional polygon )

◆ cg3_move_alloc_chained_polygon()

pure subroutine mod_cg3_flood_polyhedron::cg3_move_alloc_chained_polygon ( type(t_chained_polygon), intent(inout) polygon1,
type(t_chained_polygon), intent(inout) polygon2 )
private

move_alloc of a chained_polygon. Avoid unnecessary copies.

◆ cg3_partition()

pure subroutine mod_cg3_flood_polyhedron::cg3_partition ( double precision, dimension(:), intent(inout) n_distance,
integer, dimension(:), intent(inout) n_point,
integer, intent(in) p,
integer, intent(in) r,
integer, intent(out) partition )
private

Partition function for the quick sort algorithm.

◆ cg3_polyhedron_find_common_edge()

pure integer function mod_cg3_flood_polyhedron::cg3_polyhedron_find_common_edge ( type(t_polyhedron), intent(in) polyhedron,
type(t_incidence_matrix), dimension(:), intent(in) point_to_edge,
integer, intent(in) p1,
integer, intent(in) p2 )
private

Find an edge common to two points. Return 0 if no edge is found.

◆ cg3_polyhedron_find_common_face_2_edges()

pure integer function mod_cg3_flood_polyhedron::cg3_polyhedron_find_common_face_2_edges ( type(t_polyhedron), intent(in) polyhedron,
integer, intent(in) e1,
integer, intent(in) e2 )
private

Find a face common to two edges. Return 0 if no face is found.

◆ cg3_polyhedron_find_common_face_2_points_up()

pure integer function mod_cg3_flood_polyhedron::cg3_polyhedron_find_common_face_2_points_up ( type(t_polyhedron), intent(in) polyhedron,
type(t_incidence_matrix), dimension(:), intent(in) point_to_edge,
integer, intent(in) p1,
integer, intent(in) p2,
integer, dimension(:), intent(in) inv_n_group,
integer, intent(in) max_group )
private

Find a face common to two points such that the face goes up. Return 0 if no face is found. Note that this algorithm requires inv_n_group to avoid real number comparison.

◆ cg3_polyhedron_find_common_face_3_points()

pure integer function mod_cg3_flood_polyhedron::cg3_polyhedron_find_common_face_3_points ( type(t_polyhedron), intent(in) polyhedron,
type(t_incidence_matrix), dimension(:), intent(in) point_to_edge,
integer, intent(in) p1,
integer, intent(in) p2,
integer, intent(in) p3 )
private

Find a face common to three points. Return 0 if no face is found.

◆ cg3_polyhedron_find_common_face_edge_point()

pure integer function mod_cg3_flood_polyhedron::cg3_polyhedron_find_common_face_edge_point ( type(t_polyhedron), intent(in) polyhedron,
type(t_incidence_matrix), dimension(:), intent(in) point_to_edge,
integer, intent(in) e,
integer, intent(in) p )
private

Find a face common to an edge and a point. Return 0 if no face is found.

◆ cg3_quicksort_n_distance()

pure recursive subroutine mod_cg3_flood_polyhedron::cg3_quicksort_n_distance ( double precision, dimension(:), intent(inout) n_distance,
integer, dimension(:), intent(inout) n_point,
integer, intent(in) p,
integer, intent(in) r )
private

Quick sort algorithm for the distance along the n-axis.

◆ cg3_reset_chained_polygon()

pure subroutine mod_cg3_flood_polyhedron::cg3_reset_chained_polygon ( type(t_chained_polygon), intent(inout) polygon)
private

Reset a chained polygon.