FOSSIL Axis-Aligned Bounding Box (AABB) tree-node class.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(aabb_object), | private, | allocatable | :: | aabb | AABB data. |
Add facets to AABB.
Add facets to AABB.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(inout) | :: | self | AABB. |
||
| type(facet_object), | intent(inout), | allocatable | :: | facet(:) | Facets list. |
Return AABB bmin.
Return AABB bmin.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB box. |
AABB bmin.
Return AABB bmax.
Return AABB bmax.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB box. |
AABB bmax.
Return closest point on AABB from point reference.
Return closest point on (or in) AABB from point reference.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB box. |
||
| type(vector_R8P), | intent(in) | :: | point | Point reference. |
Closest point on (on in) aabb to point.
Compute AABB octants.
Return AABB octants.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| type(aabb_object), | intent(out) | :: | octant(8) | AABB octants. |
Destroy AABB.
Destroy AABB.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(inout) | :: | self | AABB. |
Return the (square) distance from point to AABB.
Return the (square) distance from point to AABB.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| type(vector_R8P), | intent(in) | :: | point | Point reference. |
Distance from point to AABB.
Return the (square) distance from point to AABB's facets.
Return the (square) distance from point to AABB's facets.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| type(vector_R8P), | intent(in) | :: | point | Point reference. |
Distance from point to AABB's facets.
Return true if AABB is intersected by ray.
Return true if AABB is intersected by ray from origin and oriented as ray direction vector.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| type(vector_R8P), | intent(in) | :: | ray_origin | Ray origin. |
||
| type(vector_R8P), | intent(in) | :: | ray_direction | Ray direction. |
Test result.
Return true if AABB has facets.
Return true if AABB has facets.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB box. |
Check result.
Initialize AABB.
Initialize AABB.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(inout) | :: | self | AABB. |
||
| 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 true is node is allocated.
Return true if node is allocated.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB box. |
Check result.
Return ray intersections number.
Return ray intersections number.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| type(vector_R8P), | intent(in) | :: | ray_origin | Ray origin. |
||
| type(vector_R8P), | intent(in) | :: | ray_direction | Ray direction. |
Intersection number.
Save AABB geometry into Tecplot ascii file.
Save AABB geometry into Tecplot ascii file.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| integer(kind=I4P), | intent(in) | :: | file_unit | File unit. |
||
| character(len=*), | intent(in), | optional | :: | aabb_name | Name of AABB. |
Save facets into file STL.
Save facets into file STL.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(in) | :: | self | AABB. |
||
| character(len=*), | intent(in) | :: | file_name | File name. |
||
| logical, | intent(in) | :: | is_ascii | Sentinel to check if file is ASCII. |
Update AABB bounding box extents.
Update AABB bounding box extents.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(inout) | :: | self | AABB. |
Overload =.
Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(aabb_node_object), | intent(in) | :: | rhs | Right hand side. |
Operator =.
Operator =.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(aabb_node_object), | intent(inout) | :: | lhs | Left hand side. |
||
| type(aabb_node_object), | intent(in) | :: | rhs | Right hand side. |
type :: aabb_node_object
!< FOSSIL Axis-Aligned Bounding Box (AABB) tree-node class.
private
type(aabb_object), allocatable :: aabb !< AABB data.
contains
! public methods
procedure, pass(self) :: add_facets !< Add facets to AABB.
procedure, pass(self) :: bmin !< Return AABB bmin.
procedure, pass(self) :: bmax !< Return AABB bmax.
procedure, pass(self) :: closest_point !< Return closest point on AABB from point reference.
procedure, pass(self) :: compute_octants !< Compute AABB octants.
procedure, pass(self) :: destroy !< Destroy AABB.
procedure, pass(self) :: distance !< Return the (square) distance from point to AABB.
procedure, pass(self) :: distance_from_facets !< Return the (square) distance from point to AABB's facets.
procedure, pass(self) :: do_ray_intersect !< Return true if AABB is intersected by ray.
procedure, pass(self) :: has_facets !< Return true if AABB has facets.
procedure, pass(self) :: initialize !< Initialize AABB.
procedure, pass(self) :: is_allocated !< Return true is node is allocated.
procedure, pass(self) :: ray_intersections_number !< Return ray intersections number.
procedure, pass(self) :: save_geometry_tecplot_ascii !< Save AABB geometry into Tecplot ascii file.
procedure, pass(self) :: save_facets_into_file_stl !< Save facets into file STL.
procedure, pass(self) :: update_extents !< Update AABB bounding box extents.
! operators
generic :: assignment(=) => aabb_node_assign_aabb_node !< Overload `=`.
procedure, pass(lhs), private :: aabb_node_assign_aabb_node !< Operator `=`.
endtype aabb_node_object