FOSSIL, Axis-Aligned Bounding Box (AABB) tree class definition.
The tree is assumed to be an octree.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I4P), | private, | parameter | :: | TREE_RATIO | = | 8 | Tree refinement ratio, it is assumed to be an octree. |
FOSSIL Axis-Aligned Bounding Box (AABB) tree class.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer(kind=I4P), | public | :: | refinement_levels | = | 0 | Total number of refinement levels used. |
|
| integer(kind=I4P), | public | :: | nodes_number | = | 0 | Total number of tree nodes. |
|
| type(aabb_node_object), | public, | allocatable | :: | node(:) | AABB tree nodes [0:nodes_number-1]. |
||
| logical, | public | :: | is_initialized | = | .false. | Sentinel to check is AABB tree is initialized. |
| procedure, public, pass(self) :: destroy | Destroy AABB tree. |
| procedure, public, pass(self) :: distance | Compute the (minimum) distance from point to triangulated surface. |
| procedure, public, pass(self) :: initialize | Initialize AABB tree. |
| procedure, public, pass(self) :: ray_intersections_number | Return ray intersections number. |
| procedure, public, pass(self) :: save_geometry_tecplot_ascii | Save AABB tree boxes geometry into Tecplot ascii file. |
| procedure, public, pass(self) :: save_into_file_stl | Save AABB tree boxes facets into files STL. |
| generic, public :: assignment(=) => aabb_tree_assign_aabb_tree | Overload |
| procedure, private, pass(lhs) :: aabb_tree_assign_aabb_tree | Operator |
Compute the (minimum) distance from a point to the triangulated surface.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(in) | :: | self | AABB tree. |
||
| type(vector_R8P), | intent(in) | :: | point | Point coordinates. |
Minimum distance from point to the triangulated surface.
Return ray intersections number.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(in) | :: | self | AABB tree. |
||
| type(vector_R8P), | intent(in) | :: | ray_origin | Ray origin. |
||
| type(vector_R8P), | intent(in) | :: | ray_direction | Ray direction. |
Intersection number.
Return first child tree node.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4P), | intent(in) | :: | node | Node queried. |
First child tree node.
Return first tree node at a given level.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4P), | intent(in) | :: | level | Refinement level queried. |
Number of tree nodes at given level.
Return total number of tree nodes given the total number refinement levels used.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4P), | intent(in) | :: | refinement_levels | Total number of refinement levels used. |
Total number of tree nodes.
Return number of tree nodes at a given level.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4P), | intent(in) | :: | level | Refinement level queried. |
Number of tree nodes at given level.
Return parent tree node.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=I4P), | intent(in) | :: | node | Node queried. |
Parent tree node.
Destroy AABB tree.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(inout) | :: | self | AABB tree. |
Initialize AABB tree.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(inout) | :: | self | AABB tree. |
||
| integer(kind=I4P), | intent(in) | :: | refinement_levels | Total number of refinement levels used. |
||
| type(facet_object), | intent(in), | optional | :: | facet(:) | Facets list. |
|
| type(vector_R8P), | intent(in), | optional | :: | bmin | Minimum point of AABB. |
|
| type(vector_R8P), | intent(in), | optional | :: | bmax | Maximum point of AABB. |
Save AABB tree boxes geometry into Tecplot ascii file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(in) | :: | self | AABB tree. |
||
| character(len=*), | intent(in) | :: | file_name | File name. |
Save AABB tree boxes facets into files STL.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(in) | :: | self | AABB tree. |
||
| character(len=*), | intent(in) | :: | base_file_name | File name. |
||
| logical, | intent(in), | optional | :: | is_ascii | Sentinel to check if file is ASCII. |
Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(aabb_tree_object), | intent(in) | :: | rhs | Right hand side. |