Skip to content

fossil_aabb_tree_object

Source: src/lib/fossil_aabb_tree_object.f90

Dependencies

Contents

Variables

NameTypeAttributesDescription
TREE_RATIOinteger(kind=I4P)parameter
AABB_USE_INDEXlogicalparameter
AABB_USE_BRUTE_FORCElogicalparameter
AABB_TREE_OCTREEinteger(kind=I4P)parameter
AABB_TREE_SAH_BVHinteger(kind=I4P)parameter
AABB_AUTO_REFINEMENTinteger(kind=I4P)parameter
AUTO_TARGET_FACETS_PER_LEAFinteger(kind=I4P)parameter
AUTO_MIN_LEVELSinteger(kind=I4P)parameter
AUTO_MAX_LEVELSinteger(kind=I4P)parameter
octree_fsmtype(ofsm)

Derived Types

ofsm

Components

NameTypeAttributesDescription
octantinteger(kind=I4P)
directioninteger(kind=I4P)

aabb_tree_object

+----+----+ /| /| /| / | 7 | 8 | / +--------+ / /|/ /|/ /| / / | 5 | 6 | / / /+----+----+ / / // / // / / +----+----+/ / / /| / /| / /| / / / |/ //|/ //|/ / / +--------+ / / /|// /|// /| / / / |/ / |/ / |/ / / /+----+----+ / / // / // / / +----+----+/ / / y(j) z(k) | / | / | / / ^ ^ |/ 3/|/ 4/|/ / | / +----*----+ / | / | / | / | / | / |/ 1 |/ 2 |/ |/ +----+----+ +------->x(i)

Components

NameTypeAttributesDescription
tree_kindinteger(kind=I4P)
refinement_levelsinteger(kind=I4P)
nodes_numberinteger(kind=I4P)
nodetype(aabb_node_object)allocatable
is_initializedlogical
use_indexlogical

Type-Bound Procedures

NameAttributesDescription
get_refinement_levelspass(self)
get_tree_kindpass(self)
get_nodes_numberpass(self)
node_atpass(self)
get_is_initializedpass(self)
get_use_indexpass(self)
set_refinement_levelspass(self)
set_tree_kindpass(self)
set_use_indexpass(self)
compute_vertices_nearbypass(self)
destroypass(self)
distancepass(self)
distance_treepass(self)
distance_tree_with_regionpass(self)
distribute_facetspass(self)
distribute_facets_treepass(self)
has_childrenpass(self)
initializepass(self)
loop_nodepass(self)
ray_intersections_numberpass(self)
intersect_ray_all_treepass(self)
intersect_ray_first_treepass(self)
intersect_ray_any_treepass(self)
save_geometry_tecplot_asciipass(self)
translatepass(self)
assignment(=)
aabb_tree_assign_aabb_treepass(lhs)
build_bvh_sahpass(self)
enumerate_childrenpass(self)
distance_nodepass(self)
distance_node_with_regionpass(self)
ray_intersections_number_nodepass(self)
intersect_ray_all_nodepass(self)
intersect_ray_first_nodepass(self)
intersect_ray_any_nodepass(self)

Subroutines

set_refinement_levels

Attributes: elemental

fortran
subroutine set_refinement_levels(self, refinement_levels)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
refinement_levelsinteger(kind=I4P)in

Call graph

set_tree_kind

Attributes: elemental

fortran
subroutine set_tree_kind(self, tree_kind)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
tree_kindinteger(kind=I4P)in

Call graph

set_use_index

Attributes: elemental

fortran
subroutine set_use_index(self, use_index)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
use_indexlogicalin

aabb_tree_finalize

fortran
subroutine aabb_tree_finalize(self)

Arguments

NameTypeIntentAttributesDescription
selftype(aabb_tree_object)inout

compute_vertices_nearby

Attributes: pure

fortran
subroutine compute_vertices_nearby(self, facet, tolerance_to_be_nearby)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)inout
tolerance_to_be_nearbyreal(kind=R8P)in

Call graph

destroy

Attributes: elemental

fortran
subroutine destroy(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout

Call graph

distance_tree_with_region

fortran
subroutine distance_tree_with_region(self, facet, point, distance, closest_facet, closest_region)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
pointtype(vector_R8P)in
distancereal(kind=R8P)out
closest_facetinteger(kind=I4P)out
closest_regioninteger(kind=I4P)out

Call graph

distribute_facets

Attributes: pure

fortran
subroutine distribute_facets(self, facet, is_exclusive, do_update_extents)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
facettype(facet_object)in
is_exclusivelogicalinoptional
do_update_extentslogicalinoptional

Call graph

distribute_facets_tree

Attributes: pure

fortran
subroutine distribute_facets_tree(self, facet)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
facettype(facet_object)in

Call graph

initialize

Attributes: pure

fortran
subroutine initialize(self, refinement_levels, tree_kind, facet, largest_edge_len, bmin, bmax, do_facets_distribute, is_exclusive, do_update_extents)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
refinement_levelsinteger(kind=I4P)inoptional
tree_kindinteger(kind=I4P)inoptional
facettype(facet_object)inoptional
largest_edge_lenreal(kind=R8P)inoptional
bmintype(vector_R8P)inoptional
bmaxtype(vector_R8P)inoptional
do_facets_distributelogicalinoptional
is_exclusivelogicalinoptional
do_update_extentslogicalinoptional

Call graph

build_bvh_sah

Attributes: pure

fortran
subroutine build_bvh_sah(self, facet)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
facettype(facet_object)in

Call graph

build_node

Attributes: pure, recursive

fortran
subroutine build_node(nodes, idx, lo, hi, facet, this_node, next_idx, n_max)

Arguments

NameTypeIntentAttributesDescription
nodestype(aabb_node_object)inout
idxinteger(kind=I4P)inout
lointeger(kind=I4P)in
hiinteger(kind=I4P)in
facettype(facet_object)in
this_nodeinteger(kind=I4P)in
next_idxinteger(kind=I4P)inout
n_maxinteger(kind=I4P)in

Call graph

compute_node_bboxes

Attributes: pure

fortran
subroutine compute_node_bboxes(facet, idx, lo, hi, node_bmin, node_bmax, centroid_bmin, centroid_bmax)

Arguments

NameTypeIntentAttributesDescription
facettype(facet_object)in
idxinteger(kind=I4P)in
lointeger(kind=I4P)in
hiinteger(kind=I4P)in
node_bmintype(vector_R8P)out
node_bmaxtype(vector_R8P)out
centroid_bmintype(vector_R8P)out
centroid_bmaxtype(vector_R8P)out

Call graph

write_node_bbox

Attributes: pure

fortran
subroutine write_node_bbox(node, bmin, bmax)

Arguments

NameTypeIntentAttributesDescription
nodetype(aabb_node_object)inout
bmintype(vector_R8P)in
bmaxtype(vector_R8P)in

Call graph

write_leaf

Attributes: pure

fortran
subroutine write_leaf(node, ids, n)

Arguments

NameTypeIntentAttributesDescription
nodetype(aabb_node_object)inout
idsinteger(kind=I4P)in
ninteger(kind=I4P)in

Call graph

expand_bbox

Attributes: pure

fortran
subroutine expand_bbox(bmin, bmax, addmin, addmax)

Arguments

NameTypeIntentAttributesDescription
bminreal(kind=R8P)inout
bmaxreal(kind=R8P)inout
addmintype(vector_R8P)in
addmaxtype(vector_R8P)in

Call graph

save_geometry_tecplot_ascii

fortran
subroutine save_geometry_tecplot_ascii(self, file_name)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
file_namecharacter(len=*)in

Call graph

translate

Attributes: elemental

fortran
subroutine translate(self, delta)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)inout
deltatype(vector_R8P)in

Call graph

aabb_tree_assign_aabb_tree

Attributes: pure

fortran
subroutine aabb_tree_assign_aabb_tree(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(aabb_tree_object)inout
rhstype(aabb_tree_object)in

Call graph

enumerate_children

Attributes: pure

fortran
subroutine enumerate_children(self, n, out_idx, nchild)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
out_idxinteger(kind=I4P)out
nchildinteger(kind=I4P)out

Call graph

distance_node

Attributes: recursive

fortran
subroutine distance_node(self, n, facet, point, best)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
facettype(facet_object)in
pointtype(vector_R8P)in
bestreal(kind=R8P)inout

Call graph

distance_node_with_region

Attributes: recursive

fortran
subroutine distance_node_with_region(self, n, facet, point, best, best_facet, best_region)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
facettype(facet_object)in
pointtype(vector_R8P)in
bestreal(kind=R8P)inout
best_facetinteger(kind=I4P)inout
best_regioninteger(kind=I4P)inout

Call graph

intersect_ray_all_tree

fortran
subroutine intersect_ray_all_tree(self, facet, ray_origin, ray_direction, hits)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in
hitstype(ray_hit_t)outallocatable

Call graph

intersect_ray_all_node

Attributes: recursive

fortran
subroutine intersect_ray_all_node(self, n, facet, ray_origin, ray_direction, tmp, n_hits, n_overflow)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in
tmptype(ray_hit_t)inoutallocatable
n_hitsinteger(kind=I4P)inout
n_overflowinteger(kind=I4P)inout

Call graph

intersect_ray_first_tree

fortran
subroutine intersect_ray_first_tree(self, facet, ray_origin, ray_direction, hit, has_hit)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in
hittype(ray_hit_t)out
has_hitlogicalout

Call graph

intersect_ray_first_node

Attributes: recursive

fortran
subroutine intersect_ray_first_node(self, n, facet, ray_origin, ray_direction, hit, has_hit, t_best)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in
hittype(ray_hit_t)inout
has_hitlogicalinout
t_bestreal(kind=R8P)inout

Call graph

intersect_ray_any_tree

fortran
subroutine intersect_ray_any_tree(self, facet, ray_origin, ray_direction, max_t, found)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in
max_treal(kind=R8P)in
foundlogicalout

Call graph

intersect_ray_any_node

Attributes: recursive

fortran
subroutine intersect_ray_any_node(self, n, facet, ray_origin, ray_direction, max_t, found)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in
max_treal(kind=R8P)in
foundlogicalinout

Call graph

sort_hits_by_t

Attributes: pure

fortran
subroutine sort_hits_by_t(hits)

Arguments

NameTypeIntentAttributesDescription
hitstype(ray_hit_t)inout

Call graph

next_location_code

Attributes: pure

fortran
subroutine next_location_code(location_code, direction, next_code, next_direction)

Arguments

NameTypeIntentAttributesDescription
location_codeinteger(kind=I4P)in
directioninteger(kind=I4P)in
next_codeinteger(kind=I4P)outallocatable
next_directioninteger(kind=I4P)out

Functions

auto_refinement_levels

Attributes: pure

Returns: integer(kind=I4P)

fortran
function auto_refinement_levels(facets_number) result(levels)

Arguments

NameTypeIntentAttributesDescription
facets_numberinteger(kind=I4P)in

Call graph

get_refinement_levels

Attributes: pure

Returns: integer(kind=I4P)

fortran
function get_refinement_levels(self) result(n)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in

Call graph

get_tree_kind

Attributes: pure

Returns: integer(kind=I4P)

fortran
function get_tree_kind(self) result(kind)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in

Call graph

get_nodes_number

Attributes: pure

Returns: integer(kind=I4P)

fortran
function get_nodes_number(self) result(n)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in

Call graph

node_at

Returns: type(aabb_node_object)

fortran
function node_at(self, i) result(p)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)intarget
iinteger(kind=I4P)in

Call graph

get_is_initialized

Attributes: pure

Returns: logical

fortran
function get_is_initialized(self) result(yes)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in

Call graph

get_use_index

Attributes: pure

Returns: logical

fortran
function get_use_index(self) result(yes)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in

Call graph

distance

Attributes: pure

Returns: real(kind=R8P)

fortran
function distance(self, facet, point)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
pointtype(vector_R8P)in

Call graph

distance_tree

Returns: real(kind=R8P)

fortran
function distance_tree(self, facet, point) result(distance)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
pointtype(vector_R8P)in

Call graph

has_children

Attributes: pure

Returns: logical

fortran
function has_children(self, node)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
nodeinteger(kind=I4P)in

Call graph

surface_area

Attributes: pure

Returns: real(kind=R8P)

fortran
function surface_area(bmin, bmax) result(sa)

Arguments

NameTypeIntentAttributesDescription
bmintype(vector_R8P)in
bmaxtype(vector_R8P)in

Call graph

surface_area_arr

Attributes: pure

Returns: real(kind=R8P)

fortran
function surface_area_arr(bmin, bmax) result(sa)

Arguments

NameTypeIntentAttributesDescription
bminreal(kind=R8P)in
bmaxreal(kind=R8P)in

Call graph

loop_node

Returns: logical

fortran
function loop_node(self, facet, aabb_facet, b, l) result(again)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)inoptional
aabb_facettype(facet_object)outallocatable, optional
binteger(kind=I4P)outoptional
linteger(kind=I4P)outoptional

Call graph

ray_intersections_number

Returns: integer(kind=I4P)

fortran
function ray_intersections_number(self, facet, ray_origin, ray_direction) result(intersections_number)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in

Call graph

ray_intersections_number_node

Attributes: recursive

Returns: integer(kind=I4P)

fortran
function ray_intersections_number_node(self, n, facet, ray_origin, ray_direction) result(intersections_number)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_tree_object)in
ninteger(kind=I4P)in
facettype(facet_object)in
ray_origintype(vector_R8P)in
ray_directiontype(vector_R8P)in

Call graph

first_child_node

Attributes: pure

Returns: integer(kind=I4P)

fortran
function first_child_node(node)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in

Call graph

first_node

Attributes: pure

Returns: integer(kind=I4P)

fortran
function first_node(level)

Arguments

NameTypeIntentAttributesDescription
levelinteger(kind=I4P)in

Call graph

last_node

Attributes: pure

Returns: integer(kind=I4P)

fortran
function last_node(level)

Arguments

NameTypeIntentAttributesDescription
levelinteger(kind=I4P)in

Call graph

level

Attributes: pure

Returns: integer(kind=I4P)

fortran
function level(node)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in

local_id

Attributes: pure

Returns: integer(kind=I4P)

fortran
function local_id(node)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in

Call graph

location_code

Attributes: pure

Returns: integer(kind=I4P)

fortran
function location_code(node)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in

Call graph

global_id

Attributes: pure

Returns: integer(kind=I4P)

fortran
function global_id(location_code) result(node)

Arguments

NameTypeIntentAttributesDescription
location_codeinteger(kind=I4P)in

Call graph

nodes_number

Attributes: pure

Returns: integer(kind=I4P)

fortran
function nodes_number(refinement_levels)

Arguments

NameTypeIntentAttributesDescription
refinement_levelsinteger(kind=I4P)in

Call graph

nodes_number_at_level

Attributes: pure

Returns: integer(kind=I4P)

fortran
function nodes_number_at_level(level) result(nodes_number)

Arguments

NameTypeIntentAttributesDescription
levelinteger(kind=I4P)in

Call graph

parent_at_level

Attributes: pure

Returns: integer(kind=I4P)

fortran
function parent_at_level(node, parent_level) result(parent)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in
parent_levelinteger(kind=I4P)in

parent_node

Attributes: pure

Returns: integer(kind=I4P)

fortran
function parent_node(node)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in

Call graph

siblings

Attributes: pure

Returns: integer(kind=I4P)

fortran
function siblings(node) result(sbs)

Arguments

NameTypeIntentAttributesDescription
nodeinteger(kind=I4P)in

Call graph

str_location_code

Attributes: pure

Returns: character(len=:)

fortran
function str_location_code(code)

Arguments

NameTypeIntentAttributesDescription
codeinteger(kind=I4P)in

Call graph