FOSSIL Axis-Aligned Bounding Box (AABB) tree class.
The tree is assumed to be an octree.
| 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. |
Destroy AABB tree.
Destroy AABB tree.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_tree_object), | intent(inout) | :: | self | AABB tree. |
Compute the (minimum) distance from point to triangulated surface.
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.
Initialize 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. |
Return ray intersections number.
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.
Save AABB tree boxes geometry into Tecplot ascii file.
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.
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. |
Overload =.
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. |
Operator =.
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. |
type :: aabb_tree_object
!< FOSSIL Axis-Aligned Bounding Box (AABB) tree class.
!<
!< @note The tree is assumed to be an **octree**.
integer(I4P) :: refinement_levels=0 !< Total number of refinement levels used.
integer(I4P) :: nodes_number=0 !< Total number of tree nodes.
type(aabb_node_object), allocatable :: node(:) !< AABB tree nodes [0:nodes_number-1].
logical :: is_initialized=.false. !< Sentinel to check is AABB tree is initialized.
contains
! public methods
procedure, pass(self) :: destroy !< Destroy AABB tree.
procedure, pass(self) :: distance !< Compute the (minimum) distance from point to triangulated surface.
procedure, pass(self) :: initialize !< Initialize AABB tree.
procedure, pass(self) :: ray_intersections_number !< Return ray intersections number.
procedure, pass(self) :: save_geometry_tecplot_ascii !< Save AABB tree boxes geometry into Tecplot ascii file.
procedure, pass(self) :: save_into_file_stl !< Save AABB tree boxes facets into files STL.
! operators
generic :: assignment(=) => aabb_tree_assign_aabb_tree !< Overload `=`.
procedure, pass(lhs), private :: aabb_tree_assign_aabb_tree !< Operator `=`.
endtype aabb_tree_object