0.6.0
Loading...
Searching...
No Matches
mod_shape_basic Module Reference

Data Types

type  t_shape_circle
 Circle/sphere shape. More...
 
type  t_shape_cylinder
 Cylinder shape (3D only) More...
 
type  t_shape_halfspace
 Half-space shape. More...
 
type  t_shape_rectangle
 Rectangle/rectangular cuboid shape. More...
 
type  t_shape_torus
 Torus shape around Z-axis (3D only) More...
 
type  t_shape_universe
 Represents the whole space. More...
 

Functions/Subroutines

subroutine initialize_shape_circle (shape)
 Initialize the circle/sphere.
 
subroutine copy_shape_circle (shape, copy)
 Copy the circle/sphere.
 
logical pure function shape_circle_is_inside (shape, point)
 Check if a point lies inside the circle/sphere.
 
subroutine shape_circle_get_samples_inside (shape, i, j, k, n, n_samples, samples)
 Check if a given number of point lies in a circle/sphere.
 
pure subroutine shape_circle_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the circle/sphere.
 
pure subroutine shape_circle_ray_trace (shape, ray, has_normal, intersection_list)
 Compute the intersection between the circle/sphere and a ray.
 
subroutine initialize_shape_rectangle (shape)
 Initialize the rectangle/rectangular cuboid.
 
subroutine copy_shape_rectangle (shape, copy)
 Copy the rectangle.
 
logical pure function shape_rectangle_is_inside (shape, point)
 Check if a point lies inside the rectangle/rectangular cuboid.
 
subroutine shape_rectangle_get_samples_inside (shape, i, j, k, n, n_samples, samples)
 Check if a given number of point lies in a rectrangle/rectangular cuboid.
 
pure subroutine shape_rectangle_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the rectangle/rectangular cuboid.
 
pure subroutine shape_rectangle_ray_trace (shape, ray, has_normal, intersection_list)
 Compute the intersection between the rectangle and a ray.
 
subroutine initialize_shape_halfspace (shape)
 Initialize the half-space.
 
subroutine copy_shape_halfspace (shape, copy)
 Copy the half-space.
 
logical pure function shape_halfspace_is_inside (shape, point)
 Check if a point lies inside the half-space.
 
subroutine shape_halfspace_get_samples_inside (shape, i, j, k, n, n_samples, samples)
 Check if a given number of point lies in a half-space.
 
pure subroutine shape_halfspace_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the half-space.
 
pure subroutine shape_halfspace_ray_trace (shape, ray, has_normal, intersection_list)
 Compute the intersection between the half-space and a ray.
 
subroutine initialize_shape_cylinder (shape)
 Initialize the cylinder.
 
subroutine copy_shape_cylinder (shape, copy)
 Copy the cylinder.
 
logical pure function shape_cylinder_is_inside (shape, point)
 Check if a point lies inside the cylinder (3D only)
 
subroutine shape_cylinder_get_samples_inside (shape, i, j, k, n, n_samples, samples)
 Check if a given number of point lies in a cylinder.
 
pure subroutine shape_cylinder_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the cylinder.
 
pure subroutine shape_cylinder_ray_trace (shape, ray, has_normal, intersection_list)
 Compute the intersection between the cylinder and a ray.
 
subroutine initialize_shape_torus (shape)
 Initialize the torus.
 
subroutine copy_shape_torus (shape, copy)
 Copy the torus.
 
logical pure function shape_torus_is_inside (shape, point)
 Check if a point lies inside the torus (3D only)
 
subroutine shape_torus_get_samples_inside (shape, i, j, k, n, n_samples, samples)
 Check if a given number of point lies in a torus.
 
pure subroutine shape_torus_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the torus.
 
pure subroutine shape_torus_ray_trace (shape, ray, has_normal, intersection_list)
 Compute the intersection between the torus and a ray.
 
subroutine initialize_shape_universe (shape)
 Initialize the universe.
 
subroutine copy_shape_universe (shape, copy)
 Copy the universe.
 
logical pure function shape_universe_is_inside (shape, point)
 Check if a point lies inside the universe (always true)
 
subroutine shape_universe_get_samples_inside (shape, i, j, k, n, n_samples, samples)
 Check if a given number of point lies in the universe (yes, they do!)
 
pure subroutine shape_universe_get_distance (shape, point, distance, direction)
 Compute the signed distance and the signed direction from a point to the universe.
 
pure subroutine shape_universe_ray_trace (shape, ray, has_normal, intersection_list)
 Compute the intersection between the universe and a ray.
 

Function/Subroutine Documentation

◆ shape_circle_ray_trace()

pure subroutine mod_shape_basic::shape_circle_ray_trace ( class(t_shape_circle), intent(in) shape,
type(t_ray), intent(in) ray,
logical, intent(in) has_normal,
type(t_intersection_list), intent(inout) intersection_list )

Compute the intersection between the circle/sphere and a ray.

Parameters
[in]shapecircle/sphere shape
[in]rayray to intersect the circle/sphere
[in]has_normallist of intersections between the ray and the circle/sphere
[in,out]intersection_listlist of intersections between the ray and the circle/sphere

◆ shape_cylinder_ray_trace()

pure subroutine mod_shape_basic::shape_cylinder_ray_trace ( class(t_shape_cylinder), intent(in) shape,
type(t_ray), intent(in) ray,
logical, intent(in) has_normal,
type(t_intersection_list), intent(inout) intersection_list )

Compute the intersection between the cylinder and a ray.

Parameters
[in]shapecylinder shape
[in]rayray to intersect the cylinder
[in]has_normallist of intersections between the ray and the cylinder
[in,out]intersection_listlist of intersections between the ray and the cylinder

◆ shape_halfspace_ray_trace()

pure subroutine mod_shape_basic::shape_halfspace_ray_trace ( class(t_shape_halfspace), intent(in) shape,
type(t_ray), intent(in) ray,
logical, intent(in) has_normal,
type(t_intersection_list), intent(inout) intersection_list )

Compute the intersection between the half-space and a ray.

Parameters
[in]shapehalf-space shape
[in]rayray to intersect the half-space
[in]has_normallist of intersections between the ray and the half-space
[in,out]intersection_listlist of intersections between the ray and the half-space

◆ shape_rectangle_ray_trace()

pure subroutine mod_shape_basic::shape_rectangle_ray_trace ( class(t_shape_rectangle), intent(in) shape,
type(t_ray), intent(in) ray,
logical, intent(in) has_normal,
type(t_intersection_list), intent(inout) intersection_list )

Compute the intersection between the rectangle and a ray.

Parameters
[in]shaperectangle shape
[in]rayray to intersect the rectangle
[in]has_normallist of intersections between the ray and the rectangle
[in,out]intersection_listlist of intersections between the ray and the rectangle

◆ shape_torus_ray_trace()

pure subroutine mod_shape_basic::shape_torus_ray_trace ( class(t_shape_torus), intent(in) shape,
type(t_ray), intent(in) ray,
logical, intent(in) has_normal,
type(t_intersection_list), intent(inout) intersection_list )

Compute the intersection between the torus and a ray.

Parameters
[in]shapetorus shape
[in]rayray to intersect the torus
[in]has_normallist of intersections between the ray and the torus
[in,out]intersection_listlist of intersections between the ray and the torus

◆ shape_universe_ray_trace()

pure subroutine mod_shape_basic::shape_universe_ray_trace ( class(t_shape_universe), intent(in) shape,
type(t_ray), intent(in) ray,
logical, intent(in) has_normal,
type(t_intersection_list), intent(inout) intersection_list )

Compute the intersection between the universe and a ray.

Parameters
[in]shapeuniverse shape
[in]rayray to intersect the universe
[in]has_normallist of intersections between the ray and the universe
[in,out]intersection_listlist of intersections between the ray and the universe