version 0.6.0

Data Types

type  mod_shape_polygon::t_shape_polygon
 Polygon shape. More...
 

Functions/Subroutines

subroutine mod_shape_polygon::initialize_shape_polygon (shape)
 Initialize the polygon shape. More...
 
subroutine mod_shape_polygon::copy_shape_polygon (shape, copy)
 Copy the polygon. More...
 
pure subroutine mod_shape_polygon::shape_polygon_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the polygon. More...
 

Detailed Description

Function/Subroutine Documentation

◆ copy_shape_polygon()

subroutine mod_shape_polygon::copy_shape_polygon ( class(t_shape_polygon), intent(in)  shape,
class(t_shape), allocatable  copy 
)
Parameters
[in]shapepolygon shape
[out]copycopied polygon shape

◆ initialize_shape_polygon()

subroutine mod_shape_polygon::initialize_shape_polygon ( class(t_shape_polygon), intent(inout)  shape)
Parameters
[in,out]shapepolygon shape

◆ shape_polygon_get_distance()

pure subroutine mod_shape_polygon::shape_polygon_get_distance ( class(t_shape_polygon), intent(in)  shape,
double precision, dimension(3), intent(in)  point,
double precision, intent(out)  distance,
double precision, dimension(3), intent(out)  direction 
)

If the point lies inside the polygon, the distance is negative and the direction points to the closest point on the polygon. If the point lies outiside the polygon, the distance is positive and the direction points in the opposite direction to the closest point on the polygon.

Parameters
[in]shapepolygon shape
[in]pointany point
[out]distancesigned closest distance from the point to the polygon
[out]directionsigned direction from the point to the closest point on the polygon