Sparse octree
More...
|
pure subroutine, public | mod_cg3_octree::cg3_create_octree_from_polyhedron (octree, polyhedron) |
| Create an octree from a polyhedron.
|
|
logical pure function, public | mod_cg3_octree::cg3_is_point_inside_octree (octree, point) |
| Determine if a point lies inside the octree.
|
|
pure subroutine, public | mod_cg3_octree::cg3_octree_direction_intersection (octree, origin, direction, nb_objects, object_list) |
| Intersection of an octree with a directional ray.
|
|
pure subroutine, public | mod_cg3_octree::cg3_octree_ray_intersection (octree, ray, nb_objects, object_list) |
| Intersection of an octree with a ray.
|
|
pure subroutine, public | mod_cg3_octree::cg3_octree_get_closest_objects (octree, point, nb_objects, object_list) |
| Find the closest objects to a given point.
|
|
subroutine, public | mod_cg3_octree::cg3_octree_write_vtk_file (octree, filename) |
| Write the sparse octree to a VTK file.
|
|
Sparse octree
Example of a valid sparse octree:
!! ┌───────┬───┬───┐
!! │ │ │ │ ┌┐
!! │ ├───┼─┬─┤ ││: full nodes
!! │ │ ├─┼─┤ └┘
!! ├───────╆━━━┷━┷━┪ ┏┓
!! │ ┃ ┃ ┃┃: empty nodes
!! │ ┡━┳━┳━━━┩ ┗┛
!! │ ┢━┛ ┃ │
!! └───────┺━━━┹───┘
!!
Empty leaves are pruned from the tree
◆ cg3_create_octree_from_polyhedron()
pure subroutine, public mod_cg3_octree::cg3_create_octree_from_polyhedron |
( |
type(t_octree), intent(out) | octree, |
|
|
type(t_polyhedron), intent(in) | polyhedron ) |
- Parameters
-
[out] | octree | octree |
[in] | polyhedron | any polyhedron |
◆ cg3_is_point_inside_octree()
logical pure function, public mod_cg3_octree::cg3_is_point_inside_octree |
( |
type(t_octree), intent(in) | octree, |
|
|
double precision, dimension(3), intent(in) | point ) |
- Parameters
-
[in] | octree | octree |
[in] | point | any point |
- Returns
- return .true. if the point is inside the octree
◆ cg3_octree_direction_intersection()
pure subroutine, public mod_cg3_octree::cg3_octree_direction_intersection |
( |
type(t_octree), intent(in) | octree, |
|
|
double precision, dimension(3), intent(in) | origin, |
|
|
integer, intent(in) | direction, |
|
|
integer, intent(out) | nb_objects, |
|
|
integer, dimension(:), intent(out), allocatable | object_list ) |
Get a list of object that lie in intersected leaves. The ray point to positive values of the given direction.
- Parameters
-
[in] | octree | octree |
[in] | origin | origin of the directional ray |
[in] | direction | axis of the ray |
[out] | nb_objects | number of objects in intersected leaves |
[out] | object_list | list of objects in intersected leaves |
◆ cg3_octree_get_closest_objects()
pure subroutine, public mod_cg3_octree::cg3_octree_get_closest_objects |
( |
type(t_octree), intent(in) | octree, |
|
|
double precision, dimension(3), intent(in) | point, |
|
|
integer, intent(out) | nb_objects, |
|
|
integer, dimension(:), intent(out), allocatable | object_list ) |
Get a list of object that lie in closest leaves.
- Parameters
-
[in] | octree | octree |
[in] | point | any point |
[out] | nb_objects | number of objects in closest leaves |
[out] | object_list | list of objects in closest leaves |
◆ cg3_octree_ray_intersection()
pure subroutine, public mod_cg3_octree::cg3_octree_ray_intersection |
( |
type(t_octree), intent(in) | octree, |
|
|
type(t_ray), intent(in) | ray, |
|
|
integer, intent(out) | nb_objects, |
|
|
integer, dimension(:), intent(out), allocatable | object_list ) |
Get a list of object that lie in intersected leaves.
- Parameters
-
[in] | octree | octree |
[in] | ray | ray |
[out] | nb_objects | number of objects in intersected leaves |
[out] | object_list | list of objects in intersected leaves |
◆ cg3_octree_write_vtk_file()
subroutine, public mod_cg3_octree::cg3_octree_write_vtk_file |
( |
type(t_octree), intent(in) | octree, |
|
|
character(len=*), intent(in) | filename ) |
- Parameters
-
[in] | octree | octree |
[in] | filename | VTK file name (with extension) |