fossil_body_distance
Source: src/lib/fossil_body_distance.f90
Dependencies
Contents
- posed_facets_t
- tri_tri_distance
- tri_tri_distance_core
- closest_segment_segment
- body_distance
- body_safe_step
- pair_safe_step
- body_distance_brute
- leaf_pair
- try_pair_posed
- posed_allocate
- pose_facet
- try_pair
- moved_box
- coplanar_meet
- closest_on_triangle
- node_plain_step
- box_rho
- axis_distance
- node_live
- node_box_volume
- row_skipped
- facet_regular
- box_gap2
- box_distance2
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
MAX_CHILDREN | integer(kind=I4P) | parameter | |
PRUNE_REL | real(kind=R8P) | parameter | |
POSED_NONE | integer(kind=I4P) | parameter | |
POSED_NONFINITE | integer(kind=I4P) | parameter | |
POSED_FINITE | integer(kind=I4P) | parameter | |
POSED_REGULAR | integer(kind=I4P) | parameter | |
POSED_IRREGULAR | integer(kind=I4P) | parameter | |
REGULAR_MIN | real(kind=R8P) | parameter | |
REGULAR_MAX | real(kind=R8P) | parameter |
Derived Types
posed_facets_t
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
v | real(kind=R8P) | allocatable | |
box | real(kind=R8P) | allocatable | |
state | integer(kind=I4P) | allocatable |
Subroutines
tri_tri_distance
subroutine tri_tri_distance(a, b, d2, pa, pb, meet)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | ||
b | real(kind=R8P) | in | ||
d2 | real(kind=R8P) | out | ||
pa | real(kind=R8P) | out | ||
pb | real(kind=R8P) | out | ||
meet | logical | out |
Call graph
tri_tri_distance_core
subroutine tri_tri_distance_core(a, b, apart, d2, pa, pb, meet)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | ||
b | real(kind=R8P) | in | ||
apart | logical | in | ||
d2 | real(kind=R8P) | out | ||
pa | real(kind=R8P) | out | ||
pb | real(kind=R8P) | out | ||
meet | logical | out |
Call graph
closest_segment_segment
Attributes: pure
subroutine closest_segment_segment(p1, q1, p2, q2, c1, c2)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p1 | real(kind=R8P) | in | ||
q1 | real(kind=R8P) | in | ||
p2 | real(kind=R8P) | in | ||
q2 | real(kind=R8P) | in | ||
c1 | real(kind=R8P) | out | ||
c2 | real(kind=R8P) | out |
Call graph
body_distance
subroutine body_distance(fa, ta, fb, tb, d2, ia, ib, pa, pb, meet, pose_a, pose_b, pairs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
fa | type(facet_object) | in | ||
ta | type(aabb_tree_object) | in | target | |
fb | type(facet_object) | in | ||
tb | type(aabb_tree_object) | in | target | |
d2 | real(kind=R8P) | out | ||
ia | integer(kind=I4P) | out | ||
ib | integer(kind=I4P) | out | ||
pa | real(kind=R8P) | out | ||
pb | real(kind=R8P) | out | ||
meet | logical | out | ||
pose_a | type(rigid_pose_t) | in | optional | |
pose_b | type(rigid_pose_t) | in | optional | |
pairs | integer(kind=I4P) | out | optional |
Call graph
body_safe_step
subroutine body_safe_step(fa, ta, fb, tb, pose_a, pose_b, ka, tha, dta, kb, thb, dtb, tolerance, cap, step, pairs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
fa | type(facet_object) | in | ||
ta | type(aabb_tree_object) | in | target | |
fb | type(facet_object) | in | ||
tb | type(aabb_tree_object) | in | target | |
pose_a | type(rigid_pose_t) | in | ||
pose_b | type(rigid_pose_t) | in | ||
ka | real(kind=R8P) | in | ||
tha | real(kind=R8P) | in | ||
dta | real(kind=R8P) | in | ||
kb | real(kind=R8P) | in | ||
thb | real(kind=R8P) | in | ||
dtb | real(kind=R8P) | in | ||
tolerance | real(kind=R8P) | in | ||
cap | real(kind=R8P) | in | ||
step | real(kind=R8P) | out | ||
pairs | integer(kind=I4P) | out | optional |
Call graph
pair_safe_step
subroutine pair_safe_step(fa, fb, i, j, pose_a, pose_b, ka, tha, dta, kb, thb, dtb, half, step, np)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
fa | type(facet_object) | in | ||
fb | type(facet_object) | in | ||
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
pose_a | type(rigid_pose_t) | in | ||
pose_b | type(rigid_pose_t) | in | ||
ka | real(kind=R8P) | in | ||
tha | real(kind=R8P) | in | ||
dta | real(kind=R8P) | in | ||
kb | real(kind=R8P) | in | ||
thb | real(kind=R8P) | in | ||
dtb | real(kind=R8P) | in | ||
half | real(kind=R8P) | in | ||
step | real(kind=R8P) | inout | ||
np | integer(kind=I4P) | inout |
Call graph
body_distance_brute
subroutine body_distance_brute(fa, fb, d2, ia, ib, pa, pb, meet, pose_a, pose_b, pairs)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
fa | type(facet_object) | in | ||
fb | type(facet_object) | in | ||
d2 | real(kind=R8P) | out | ||
ia | integer(kind=I4P) | out | ||
ib | integer(kind=I4P) | out | ||
pa | real(kind=R8P) | out | ||
pb | real(kind=R8P) | out | ||
meet | logical | out | ||
pose_a | type(rigid_pose_t) | in | optional | |
pose_b | type(rigid_pose_t) | in | optional | |
pairs | integer(kind=I4P) | out | optional |
Call graph
leaf_pair
subroutine leaf_pair(x, y, fa, fb, xa, xb, d2, ia, ib, pa, pb, meet, np, pose_a, pose_b)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | type(aabb_node_object) | in | ||
y | type(aabb_node_object) | in | ||
fa | type(facet_object) | in | ||
fb | type(facet_object) | in | ||
xa | type(posed_facets_t) | inout | ||
xb | type(posed_facets_t) | inout | ||
d2 | real(kind=R8P) | inout | ||
ia | integer(kind=I4P) | inout | ||
ib | integer(kind=I4P) | inout | ||
pa | real(kind=R8P) | inout | ||
pb | real(kind=R8P) | inout | ||
meet | logical | inout | ||
np | integer(kind=I4P) | inout | ||
pose_a | type(rigid_pose_t) | in | optional | |
pose_b | type(rigid_pose_t) | in | optional |
Call graph
try_pair_posed
subroutine try_pair_posed(xa, xb, i, j, d2, ia, ib, pa, pb, meet, np)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
xa | type(posed_facets_t) | inout | ||
xb | type(posed_facets_t) | inout | ||
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
d2 | real(kind=R8P) | inout | ||
ia | integer(kind=I4P) | inout | ||
ib | integer(kind=I4P) | inout | ||
pa | real(kind=R8P) | inout | ||
pb | real(kind=R8P) | inout | ||
meet | logical | inout | ||
np | integer(kind=I4P) | inout |
Call graph
posed_allocate
subroutine posed_allocate(x, n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | type(posed_facets_t) | inout | ||
n | integer(kind=I4P) | in |
Call graph
pose_facet
subroutine pose_facet(x, f, i, pose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | type(posed_facets_t) | inout | ||
f | type(facet_object) | in | ||
i | integer(kind=I4P) | in | ||
pose | type(rigid_pose_t) | in | optional |
Call graph
try_pair
subroutine try_pair(fa, fb, i, j, d2, ia, ib, pa, pb, meet, np, pose_a, pose_b)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
fa | type(facet_object) | in | ||
fb | type(facet_object) | in | ||
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
d2 | real(kind=R8P) | inout | ||
ia | integer(kind=I4P) | inout | ||
ib | integer(kind=I4P) | inout | ||
pa | real(kind=R8P) | inout | ||
pb | real(kind=R8P) | inout | ||
meet | logical | inout | ||
np | integer(kind=I4P) | inout | ||
pose_a | type(rigid_pose_t) | in | optional | |
pose_b | type(rigid_pose_t) | in | optional |
Call graph
moved_box
subroutine moved_box(pose, lo, hi)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
pose | type(rigid_pose_t) | in | ||
lo | type(vector_R8P) | inout | ||
hi | type(vector_R8P) | inout |
Call graph
Functions
coplanar_meet
Returns: logical
function coplanar_meet(a, b, drop) result(meet)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | ||
b | real(kind=R8P) | in | ||
drop | integer(kind=I4P) | in |
Call graph
closest_on_triangle
Attributes: pure
Returns: real(kind=R8P)
function closest_on_triangle(p, t) result(c)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | real(kind=R8P) | in | ||
t | real(kind=R8P) | in |
Call graph
node_plain_step
Returns: real(kind=R8P)
function node_plain_step(x, y, pose_a, pose_b, ka, tha, dta, kb, thb, dtb, half) result(st)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | type(aabb_node_object) | in | ||
y | type(aabb_node_object) | in | ||
pose_a | type(rigid_pose_t) | in | ||
pose_b | type(rigid_pose_t) | in | ||
ka | real(kind=R8P) | in | ||
tha | real(kind=R8P) | in | ||
dta | real(kind=R8P) | in | ||
kb | real(kind=R8P) | in | ||
thb | real(kind=R8P) | in | ||
dtb | real(kind=R8P) | in | ||
half | real(kind=R8P) | in |
Call graph
box_rho
Attributes: pure
Returns: real(kind=R8P)
function box_rho(k, pose, lo, hi) result(r)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
k | real(kind=R8P) | in | ||
pose | type(rigid_pose_t) | in | ||
lo | type(vector_R8P) | in | ||
hi | type(vector_R8P) | in |
Call graph
axis_distance
Attributes: pure
Returns: real(kind=R8P)
function axis_distance(k, y) result(r)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
k | real(kind=R8P) | in | ||
y | real(kind=R8P) | in |
Call graph
node_live
Returns: logical
function node_live(t, n) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
t | type(aabb_tree_object) | in | target | |
n | integer(kind=I4P) | in |
Call graph
node_box_volume
Attributes: pure
Returns: real(kind=R8P)
function node_box_volume(x) result(v)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | type(aabb_node_object) | in |
Call graph
row_skipped
Returns: logical
function row_skipped(xa, i, n, ub, finite_union, d2) result(skip)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
xa | type(posed_facets_t) | in | ||
i | integer(kind=I4P) | in | ||
n | integer(kind=I4P) | in | ||
ub | real(kind=R8P) | in | ||
finite_union | logical | in | ||
d2 | real(kind=R8P) | in |
Call graph
facet_regular
Returns: logical
function facet_regular(x, i) result(ok)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | type(posed_facets_t) | inout | ||
i | integer(kind=I4P) | in |
Call graph
box_gap2
Attributes: pure
Returns: real(kind=R8P)
function box_gap2(p, q) result(d2)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
p | real(kind=R8P) | in | ||
q | real(kind=R8P) | in |
Call graph
box_distance2
Attributes: pure
Returns: real(kind=R8P)
function box_distance2(lo1, hi1, lo2, hi2) result(d2)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
lo1 | type(vector_R8P) | in | ||
hi1 | type(vector_R8P) | in | ||
lo2 | type(vector_R8P) | in | ||
hi2 | type(vector_R8P) | in |
Call graph