Skip to content

fossil_aabb_node_object

FOSSIL, Axis-Aligned Bounding Box (AABB) tree-node class definition.

This is just a container for AABB tree's nodes.

Source: src/lib/fossil_aabb_node_object.f90

Dependencies

Contents

Derived Types

aabb_node_object

FOSSIL Axis-Aligned Bounding Box (AABB) tree-node class.

Components

NameTypeAttributesDescription
aabbtype(aabb_object)allocatableAABB data.

Type-Bound Procedures

NameAttributesDescription
add_facetspass(self)Add facets to AABB.
bminpass(self)Return AABB bmin.
bmaxpass(self)Return AABB bmax.
closest_pointpass(self)Return closest point on AABB from point reference.
compute_octantspass(self)Compute AABB octants.
compute_vertices_nearbypass(self)Compute vertices nearby.
destroypass(self)Destroy AABB.
distancepass(self)Return the (square) distance from point to AABB.
distance_from_facetspass(self)Return the (square) distance from point to AABB's facets.
do_ray_intersectpass(self)Return true if AABB is intersected by ray.
facet_idpass(self)Return the facets IDs list.
get_aabb_facetspass(self)Get AABB facets list.
has_facetspass(self)Return true if AABB has facets.
initializepass(self)Initialize AABB.
is_allocatedpass(self)Return true is node is allocated.
ray_intersections_numberpass(self)Return ray intersections number.
save_geometry_tecplot_asciipass(self)Save AABB geometry into Tecplot ascii file.
save_facets_into_file_stlpass(self)Save facets into file STL.
translatepass(self)Translate AABB by delta.
unionpass(self)Make AABB the union of other AABBs.
update_extentspass(self)Update AABB bounding box extents.
assignment(=)Overload =.
aabb_node_assign_aabb_nodepass(lhs)Operator =.

Subroutines

add_facets

Add facets to AABB.

@note Facets added to AABB are removed to facets list that is also returned.

Attributes: pure

fortran
subroutine add_facets(self, facet_id, facet, is_exclusive)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inoutAABB.
facet_idtype(list_id_object)inoutList of facets IDs.
facettype(facet_object)inFacets list.
is_exclusivelogicalinoptionalSentinel to enable/disable exclusive addition.

Call graph

compute_octants

Return AABB octants.

Attributes: pure

fortran
subroutine compute_octants(self, octant)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
octanttype(aabb_object)outAABB octants.

Call graph

compute_vertices_nearby

Compute vertices nearby.

Attributes: pure

fortran
subroutine compute_vertices_nearby(self, facet, tolerance_to_be_identical, tolerance_to_be_nearby)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
facettype(facet_object)inoutFacets list.
tolerance_to_be_identicalreal(kind=R8P)inTolerance to identify identical vertices.
tolerance_to_be_nearbyreal(kind=R8P)inTolerance to identify nearby vertices.

Call graph

destroy

Destroy AABB.

Attributes: elemental

fortran
subroutine destroy(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inoutAABB.

Call graph

get_aabb_facets

Get AABB facets list.

Attributes: pure

fortran
subroutine get_aabb_facets(self, facet, aabb_facet)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
facettype(facet_object)inWhole facets list.
aabb_facettype(facet_object)outallocatableAABB facets list.

Call graph

initialize

Initialize AABB.

Attributes: pure

fortran
subroutine initialize(self, facet, bmin, bmax)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inoutAABB.
facettype(facet_object)inoptionalFacets list.
bmintype(vector_R8P)inoptionalMinimum point of AABB.
bmaxtype(vector_R8P)inoptionalMaximum point of AABB.

Call graph

save_geometry_tecplot_ascii

Save AABB geometry into Tecplot ascii file.

fortran
subroutine save_geometry_tecplot_ascii(self, file_unit, aabb_name)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
file_unitinteger(kind=I4P)inFile unit.
aabb_namecharacter(len=*)inoptionalName of AABB.

Call graph

save_facets_into_file_stl

Save facets into file STL.

fortran
subroutine save_facets_into_file_stl(self, facet, file_name, is_ascii)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
facettype(facet_object)inFacets list.
file_namecharacter(len=*)inFile name.
is_asciilogicalinSentinel for file format.

Call graph

translate

Translate AABB by delta.

Attributes: elemental

fortran
subroutine translate(self, delta)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inoutAABB.
deltatype(vector_R8P)inDelta of translation.

Call graph

union

Make AABB the union of other AABBs.

Attributes: pure

fortran
subroutine union(self, node, id)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inoutAABB.
nodetype(aabb_node_object)inNodes list.
idinteger(kind=I4P)inNodes ID list.

Call graph

update_extents

Update AABB bounding box extents.

Attributes: pure

fortran
subroutine update_extents(self, facet)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inoutAABB.
facettype(facet_object)inFacets list.

Call graph

aabb_node_assign_aabb_node

Operator =.

Attributes: pure

fortran
subroutine aabb_node_assign_aabb_node(lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
lhsclass(aabb_node_object)inoutLeft hand side.
rhstype(aabb_node_object)inRight hand side.

Call graph

Functions

bmin

Return AABB bmin.

Attributes: pure

Returns: type(vector_R8P)

fortran
function bmin(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB box.

bmax

Return AABB bmax.

Attributes: pure

Returns: type(vector_R8P)

fortran
function bmax(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB box.

closest_point

Return closest point on (or in) AABB from point reference.

Attributes: pure

Returns: type(vector_R8P)

fortran
function closest_point(self, point) result(closest)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB box.
pointtype(vector_R8P)inPoint reference.

Call graph

distance

Return the (square) distance from point to AABB.

Attributes: pure

Returns: real(kind=R8P)

fortran
function distance(self, point)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
pointtype(vector_R8P)inPoint reference.

Call graph

distance_from_facets

Return the (square) distance from point to AABB's facets.

Attributes: pure

Returns: real(kind=R8P)

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

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
facettype(facet_object)inFacets list.
pointtype(vector_R8P)inPoint reference.

Call graph

do_ray_intersect

Return true if AABB is intersected by ray from origin and oriented as ray direction vector.

Attributes: pure

Returns: logical

fortran
function do_ray_intersect(self, ray_origin, ray_direction) result(do_intersect)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
ray_origintype(vector_R8P)inRay origin.
ray_directiontype(vector_R8P)inRay direction.

Call graph

facet_id

Return facets IDs list.

Attributes: pure

Returns: type(list_id_object)

fortran
function facet_id(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB box.

Call graph

has_facets

Return true if AABB has facets.

Attributes: pure

Returns: logical

fortran
function has_facets(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB box.

Call graph

is_allocated

Return true if node is allocated.

Attributes: pure

Returns: logical

fortran
function is_allocated(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB box.

Call graph

ray_intersections_number

Return ray intersections number.

Attributes: pure

Returns: integer(kind=I4P)

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

Arguments

NameTypeIntentAttributesDescription
selfclass(aabb_node_object)inAABB.
facettype(facet_object)inFacets list.
ray_origintype(vector_R8P)inRay origin.
ray_directiontype(vector_R8P)inRay direction.

Call graph