├── .clang-format
├── .clang-tidy
├── .gitignore
├── CMakeLists.txt
├── LICENSE.txt
├── README.md
├── cmake
├── FFTW
│ └── FindFFTW.cmake
├── GLFW
│ └── FindGLFW.cmake
├── GMP
│ └── FindGMP.cmake
├── add_include_files.cmake
├── add_source_files.cmake
├── check_compilers.cmake
└── set_compiler_warnings.cmake
├── font
└── DejaVuSans.ttf
├── pyproject.toml
├── src
├── color
│ ├── color.h
│ ├── colors.h
│ ├── conversion.h
│ ├── illuminants.cpp
│ ├── illuminants.h
│ ├── rgb8.h
│ ├── samples.h
│ ├── samples
│ │ ├── average.cpp
│ │ ├── average.h
│ │ ├── blackbody_samples.cpp
│ │ ├── blackbody_samples.h
│ │ ├── daylight_samples.cpp
│ │ ├── daylight_samples.h
│ │ ├── rgb_samples.cpp
│ │ ├── rgb_samples.h
│ │ ├── test
│ │ │ ├── test_average.cpp
│ │ │ ├── test_blackbody_samples.cpp
│ │ │ ├── test_daylight_samples.cpp
│ │ │ ├── test_xyz_integrals.cpp
│ │ │ ├── test_xyz_samples.cpp
│ │ │ └── test_xyz_values.cpp
│ │ ├── xyz_functions.h
│ │ ├── xyz_samples.cpp
│ │ └── xyz_samples.h
│ ├── table
│ │ ├── conversion.cpp
│ │ └── conversion.h
│ └── test
│ │ ├── test_color.cpp
│ │ ├── test_conversion.cpp
│ │ └── test_illuminants.cpp
├── com
│ ├── alg.h
│ ├── angle.h
│ ├── arrays.h
│ ├── benchmark.h
│ ├── bit
│ │ ├── reverse.h
│ │ ├── table
│ │ │ ├── reverse.cpp
│ │ │ └── reverse.h
│ │ ├── test
│ │ │ ├── test_reverse.cpp
│ │ │ └── test_width.cpp
│ │ └── width.h
│ ├── chrono.cpp
│ ├── chrono.h
│ ├── combinatorics.h
│ ├── constant.h
│ ├── container.h
│ ├── conversion.h
│ ├── enum.h
│ ├── error.cpp
│ ├── error.h
│ ├── exception.cpp
│ ├── exception.h
│ ├── exponent.h
│ ├── file
│ │ ├── path.cpp
│ │ ├── path.h
│ │ ├── read.cpp
│ │ └── read.h
│ ├── frequency.cpp
│ ├── frequency.h
│ ├── global_index.h
│ ├── group_count.h
│ ├── hash.h
│ ├── interpolation.h
│ ├── interpolation_smooth.cpp
│ ├── interpolation_smooth.h
│ ├── log.cpp
│ ├── log.h
│ ├── log
│ │ ├── log.cpp
│ │ ├── log.h
│ │ ├── write.cpp
│ │ └── write.h
│ ├── math.h
│ ├── memory_arena.h
│ ├── merge.h
│ ├── message.cpp
│ ├── message.h
│ ├── min_max.h
│ ├── names.h
│ ├── primes.h
│ ├── print.cpp
│ ├── print.h
│ ├── progression.h
│ ├── radical_inverse.h
│ ├── random
│ │ ├── create.h
│ │ ├── device.cpp
│ │ ├── device.h
│ │ ├── name.h
│ │ ├── pcg.cpp
│ │ ├── pcg.h
│ │ ├── test
│ │ │ ├── compare_engines.cpp
│ │ │ └── test_pcg.cpp
│ │ └── uniform.h
│ ├── read.h
│ ├── reference.h
│ ├── sequence.h
│ ├── set_mpz.h
│ ├── shuffle.h
│ ├── sort.h
│ ├── spinlock.h
│ ├── string
│ │ ├── ascii.h
│ │ ├── str.cpp
│ │ ├── str.h
│ │ ├── strings.h
│ │ └── test
│ │ │ └── test_ascii.cpp
│ ├── string_tree.cpp
│ ├── string_tree.h
│ ├── test
│ │ ├── static_assert.cpp
│ │ ├── test_alg.cpp
│ │ ├── test_combinatorics.cpp
│ │ ├── test_conversion.cpp
│ │ ├── test_enum.cpp
│ │ ├── test_exponent.cpp
│ │ ├── test_global_index.cpp
│ │ ├── test_group_count.cpp
│ │ ├── test_interpolation.cpp
│ │ ├── test_interpolation_smooth.cpp
│ │ ├── test_math.cpp
│ │ ├── test_memory_arena.cpp
│ │ ├── test_min_max.cpp
│ │ ├── test_primes.cpp
│ │ ├── test_print.cpp
│ │ ├── test_radical_inverse.cpp
│ │ ├── test_set_mpz.cpp
│ │ └── test_union_find.cpp
│ ├── thread.h
│ ├── thread_pool.h
│ ├── thread_tasks.h
│ ├── type
│ │ ├── concept.h
│ │ ├── find.h
│ │ ├── limit.h
│ │ ├── name.h
│ │ ├── name_gmp.h
│ │ ├── number.h
│ │ └── test
│ │ │ ├── compare_types.cpp
│ │ │ ├── test_limit.cpp
│ │ │ └── test_number.cpp
│ ├── union_find.h
│ └── variant.h
├── dft
│ ├── cufft.cpp
│ ├── cufft.h
│ ├── dft.h
│ ├── fftw.cpp
│ └── fftw.h
├── filter
│ ├── analysis
│ │ ├── allan_deviation.cpp
│ │ ├── allan_deviation.h
│ │ ├── noise_parameters.cpp
│ │ ├── noise_parameters.h
│ │ └── test
│ │ │ ├── show.py
│ │ │ └── test_allan_deviation.cpp
│ ├── attitude
│ │ ├── kalman
│ │ │ ├── constant.h
│ │ │ ├── cross_matrix.h
│ │ │ ├── ekf_imu.cpp
│ │ │ ├── ekf_imu.h
│ │ │ ├── ekf_marg.cpp
│ │ │ ├── ekf_marg.h
│ │ │ ├── ekf_utility.h
│ │ │ ├── init_imu.cpp
│ │ │ ├── init_imu.h
│ │ │ ├── init_marg.cpp
│ │ │ ├── init_marg.h
│ │ │ ├── init_utility.cpp
│ │ │ ├── init_utility.h
│ │ │ ├── integrator.cpp
│ │ │ ├── integrator.h
│ │ │ ├── matrices.cpp
│ │ │ ├── matrices.h
│ │ │ ├── measurement.cpp
│ │ │ ├── measurement.h
│ │ │ ├── quaternion.h
│ │ │ ├── test
│ │ │ │ ├── cmp.h
│ │ │ │ ├── test_cross_matrix.cpp
│ │ │ │ ├── test_ekf.cpp
│ │ │ │ ├── test_ekf_utility.cpp
│ │ │ │ ├── test_init_utility.cpp
│ │ │ │ ├── test_integrator.cpp
│ │ │ │ ├── test_matrices.cpp
│ │ │ │ ├── test_measurement.cpp
│ │ │ │ ├── test_quaternion.cpp
│ │ │ │ ├── test_ukf.cpp
│ │ │ │ └── test_ukf_utility.cpp
│ │ │ ├── ukf_imu.cpp
│ │ │ ├── ukf_imu.h
│ │ │ ├── ukf_marg.cpp
│ │ │ ├── ukf_marg.h
│ │ │ ├── ukf_utility.cpp
│ │ │ └── ukf_utility.h
│ │ ├── limit.h
│ │ └── madgwick
│ │ │ ├── gain.h
│ │ │ ├── gradient.cpp
│ │ │ ├── gradient.h
│ │ │ ├── madgwick_imu.cpp
│ │ │ ├── madgwick_imu.h
│ │ │ ├── madgwick_marg.cpp
│ │ │ ├── madgwick_marg.h
│ │ │ └── test
│ │ │ ├── cmp.h
│ │ │ ├── test_gradient.cpp
│ │ │ └── test_madgwick.cpp
│ ├── core
│ │ ├── checks.h
│ │ ├── consistency.h
│ │ ├── ekf.h
│ │ ├── gaussian.h
│ │ ├── info.h
│ │ ├── kinematic_models.h
│ │ ├── sigma_points.h
│ │ ├── smooth.h
│ │ ├── test
│ │ │ ├── distribution.cpp
│ │ │ ├── distribution.h
│ │ │ ├── filters
│ │ │ │ ├── ekf
│ │ │ │ │ ├── ekf.cpp
│ │ │ │ │ ├── ekf.h
│ │ │ │ │ ├── ekf_conv.h
│ │ │ │ │ └── ekf_model.h
│ │ │ │ ├── filter.h
│ │ │ │ ├── filter_info.cpp
│ │ │ │ ├── filter_info.h
│ │ │ │ ├── filters.cpp
│ │ │ │ ├── filters.h
│ │ │ │ ├── info
│ │ │ │ │ ├── info.cpp
│ │ │ │ │ ├── info.h
│ │ │ │ │ ├── info_conv.h
│ │ │ │ │ └── info_model.h
│ │ │ │ ├── noise_model.h
│ │ │ │ ├── ukf
│ │ │ │ │ ├── ukf.cpp
│ │ │ │ │ ├── ukf.h
│ │ │ │ │ ├── ukf_conv.h
│ │ │ │ │ └── ukf_model.h
│ │ │ │ └── utility.h
│ │ │ ├── measurements.h
│ │ │ ├── simulator
│ │ │ │ ├── acceleration.cpp
│ │ │ │ ├── acceleration.h
│ │ │ │ ├── measurements.cpp
│ │ │ │ ├── measurements.h
│ │ │ │ ├── speed.cpp
│ │ │ │ └── speed.h
│ │ │ ├── test_filter_acceleration.cpp
│ │ │ ├── test_filters.cpp
│ │ │ ├── test_kinematic_models.cpp
│ │ │ ├── test_sigma_points.cpp
│ │ │ └── view
│ │ │ │ ├── show_1d.py
│ │ │ │ ├── write.cpp
│ │ │ │ └── write.h
│ │ ├── ukf.h
│ │ ├── ukf_transform.h
│ │ └── update_info.h
│ ├── filters
│ │ ├── acceleration
│ │ │ ├── acceleration.cpp
│ │ │ ├── acceleration.h
│ │ │ ├── consistency.cpp
│ │ │ ├── consistency.h
│ │ │ ├── filter_0.cpp
│ │ │ ├── filter_0.h
│ │ │ ├── filter_0_conv.h
│ │ │ ├── filter_0_measurement.h
│ │ │ ├── filter_0_model.h
│ │ │ ├── filter_1.cpp
│ │ │ ├── filter_1.h
│ │ │ ├── filter_1_conv.h
│ │ │ ├── filter_1_measurement.h
│ │ │ ├── filter_1_model.h
│ │ │ ├── filter_ekf.cpp
│ │ │ ├── filter_ekf.h
│ │ │ ├── filter_ekf_conv.h
│ │ │ ├── filter_ekf_measurement.h
│ │ │ ├── filter_ekf_model.h
│ │ │ ├── init.h
│ │ │ └── update.h
│ │ ├── com
│ │ │ ├── measurement_queue.h
│ │ │ └── utility.h
│ │ ├── direction
│ │ │ ├── consistency.cpp
│ │ │ ├── consistency.h
│ │ │ ├── direction.cpp
│ │ │ ├── direction.h
│ │ │ ├── filter_1_0.cpp
│ │ │ ├── filter_1_0.h
│ │ │ ├── filter_1_0_conv.h
│ │ │ ├── filter_1_0_measurement.h
│ │ │ ├── filter_1_0_model.h
│ │ │ ├── filter_1_1.cpp
│ │ │ ├── filter_1_1.h
│ │ │ ├── filter_1_1_conv.h
│ │ │ ├── filter_1_1_measurement.h
│ │ │ ├── filter_1_1_model.h
│ │ │ ├── filter_2_1.cpp
│ │ │ ├── filter_2_1.h
│ │ │ ├── filter_2_1_conv.h
│ │ │ ├── filter_2_1_measurement.h
│ │ │ ├── filter_2_1_model.h
│ │ │ ├── init.h
│ │ │ └── update.h
│ │ ├── estimation.h
│ │ ├── estimation
│ │ │ ├── moving_variance.cpp
│ │ │ ├── moving_variance.h
│ │ │ ├── position_estimation.cpp
│ │ │ ├── position_estimation.h
│ │ │ ├── position_variance.cpp
│ │ │ └── position_variance.h
│ │ ├── filter.h
│ │ ├── measurement.h
│ │ ├── noise_model.h
│ │ ├── position
│ │ │ ├── consistency.cpp
│ │ │ ├── consistency.h
│ │ │ ├── filter_0.cpp
│ │ │ ├── filter_0.h
│ │ │ ├── filter_0_conv.h
│ │ │ ├── filter_0_measurement.h
│ │ │ ├── filter_0_model.h
│ │ │ ├── filter_1.cpp
│ │ │ ├── filter_1.h
│ │ │ ├── filter_1_conv.h
│ │ │ ├── filter_1_measurement.h
│ │ │ ├── filter_1_model.h
│ │ │ ├── filter_2.cpp
│ │ │ ├── filter_2.h
│ │ │ ├── filter_2_conv.h
│ │ │ ├── filter_2_measurement.h
│ │ │ ├── filter_2_model.h
│ │ │ ├── init.h
│ │ │ ├── position.cpp
│ │ │ └── position.h
│ │ └── speed
│ │ │ ├── consistency.cpp
│ │ │ ├── consistency.h
│ │ │ ├── filter_1.cpp
│ │ │ ├── filter_1.h
│ │ │ ├── filter_1_conv.h
│ │ │ ├── filter_1_measurement.h
│ │ │ ├── filter_1_model.h
│ │ │ ├── filter_2.cpp
│ │ │ ├── filter_2.h
│ │ │ ├── filter_2_conv.h
│ │ │ ├── filter_2_measurement.h
│ │ │ ├── filter_2_model.h
│ │ │ ├── init.h
│ │ │ ├── speed.cpp
│ │ │ ├── speed.h
│ │ │ └── update.h
│ ├── settings
│ │ └── instantiation.h
│ ├── test
│ │ ├── config.h
│ │ ├── create_filters.cpp
│ │ ├── create_filters.h
│ │ ├── simulator
│ │ │ ├── annotation.cpp
│ │ │ ├── annotation.h
│ │ │ ├── config.h
│ │ │ ├── simulator.cpp
│ │ │ └── simulator.h
│ │ ├── smooth.cpp
│ │ ├── smooth.h
│ │ ├── test_filter_2d.cpp
│ │ └── view
│ │ │ ├── converters.h
│ │ │ ├── show_2d.py
│ │ │ ├── time_point.h
│ │ │ ├── write.cpp
│ │ │ └── write.h
│ └── utility
│ │ ├── low_pass.cpp
│ │ └── low_pass.h
├── geometry
│ ├── accelerators
│ │ ├── bvh.cpp
│ │ ├── bvh.h
│ │ ├── bvh_build.h
│ │ ├── bvh_functions.h
│ │ ├── bvh_object.h
│ │ ├── bvh_objects.h
│ │ ├── bvh_split.h
│ │ ├── bvh_stack.h
│ │ ├── tree.cpp
│ │ ├── tree.h
│ │ └── tree_objects.h
│ ├── core
│ │ ├── check.h
│ │ ├── convex_hull.cpp
│ │ ├── convex_hull.h
│ │ ├── convex_hull
│ │ │ ├── compute.h
│ │ │ ├── facet.h
│ │ │ ├── facet_connector.h
│ │ │ ├── facet_ortho.h
│ │ │ ├── facet_storage.h
│ │ │ ├── integer_types.h
│ │ │ ├── max_values.h
│ │ │ ├── simplex_points.h
│ │ │ ├── source_points.h
│ │ │ └── test
│ │ │ │ └── test_integer_types.cpp
│ │ ├── delaunay.h
│ │ ├── euler.h
│ │ ├── ridge.h
│ │ ├── test
│ │ │ └── test_convex_hull.cpp
│ │ └── voronoi.h
│ ├── graph
│ │ ├── mst.cpp
│ │ └── mst.h
│ ├── reconstruction
│ │ ├── cocone.cpp
│ │ ├── cocone.h
│ │ ├── extract_manifold.cpp
│ │ ├── extract_manifold.h
│ │ ├── functions.h
│ │ ├── interior.cpp
│ │ ├── interior.h
│ │ ├── print.cpp
│ │ ├── print.h
│ │ ├── prune_facets.cpp
│ │ ├── prune_facets.h
│ │ ├── structure.cpp
│ │ ├── structure.h
│ │ └── test
│ │ │ └── test_reconstruction.cpp
│ ├── shapes
│ │ ├── ball_volume.h
│ │ ├── mesh.h
│ │ ├── mobius_strip.h
│ │ ├── parallelotope_volume.h
│ │ ├── regular_polytopes.h
│ │ ├── simplex_volume.h
│ │ ├── sphere_area.h
│ │ ├── sphere_create.cpp
│ │ ├── sphere_create.h
│ │ ├── sphere_integral.h
│ │ ├── sphere_simplex.h
│ │ ├── test
│ │ │ ├── compare.cpp
│ │ │ ├── compare.h
│ │ │ ├── test_ball_volume.cpp
│ │ │ ├── test_parallelotope_volume.cpp
│ │ │ ├── test_regular_polytopes.cpp
│ │ │ ├── test_simplex_volume.cpp
│ │ │ ├── test_sphere_area.cpp
│ │ │ ├── test_sphere_create.cpp
│ │ │ ├── test_sphere_integral.cpp
│ │ │ └── test_sphere_simplex.cpp
│ │ └── torus.h
│ └── spatial
│ │ ├── bounding_box.cpp
│ │ ├── bounding_box.h
│ │ ├── clip_plane.h
│ │ ├── constraint.h
│ │ ├── convex_polytope.h
│ │ ├── hyperplane.h
│ │ ├── hyperplane_ball.cpp
│ │ ├── hyperplane_ball.h
│ │ ├── hyperplane_parallelotope.cpp
│ │ ├── hyperplane_parallelotope.h
│ │ ├── hyperplane_simplex.cpp
│ │ ├── hyperplane_simplex.h
│ │ ├── intersection
│ │ ├── average.h
│ │ ├── bounding_box.h
│ │ ├── hyperplane_ball.h
│ │ ├── hyperplane_parallelotope.h
│ │ ├── hyperplane_simplex.h
│ │ └── parallelotope.h
│ │ ├── parallelotope.cpp
│ │ ├── parallelotope.h
│ │ ├── parallelotope_aa.h
│ │ ├── parallelotope_edges.h
│ │ ├── parallelotope_length.h
│ │ ├── parallelotope_vertices.h
│ │ ├── point_offset.h
│ │ ├── random
│ │ ├── parallelotope_points.h
│ │ └── vectors.h
│ │ ├── ray_intersection.h
│ │ ├── shape_overlap.h
│ │ ├── simplex_edges.h
│ │ └── test
│ │ ├── compare_parallelotopes.h
│ │ ├── parallelotope_tests.h
│ │ ├── test_bounding_box.cpp
│ │ ├── test_bounding_box_intersection.cpp
│ │ ├── test_convex_polytope.cpp
│ │ ├── test_hyperplane.cpp
│ │ ├── test_hyperplane_ball_intersection.cpp
│ │ ├── test_hyperplane_parallelotope_intersection.cpp
│ │ ├── test_hyperplane_simplex_intersection.cpp
│ │ ├── test_parallelotope.cpp
│ │ └── test_parallelotope_intersection.cpp
├── gpu
│ ├── convex_hull
│ │ ├── barrier.cpp
│ │ ├── barrier.h
│ │ ├── code
│ │ │ ├── code.cpp
│ │ │ ├── code.h
│ │ │ ├── convex_hull_filter.comp
│ │ │ ├── convex_hull_merge.comp
│ │ │ ├── convex_hull_prepare.comp
│ │ │ ├── convex_hull_view.frag
│ │ │ ├── convex_hull_view.vert
│ │ │ └── view_in.glsl
│ │ ├── compute.cpp
│ │ ├── compute.h
│ │ ├── shaders
│ │ │ ├── filter.cpp
│ │ │ ├── filter.h
│ │ │ ├── merge.cpp
│ │ │ ├── merge.h
│ │ │ ├── prepare.cpp
│ │ │ ├── prepare.h
│ │ │ ├── view.cpp
│ │ │ └── view.h
│ │ ├── size.cpp
│ │ ├── size.h
│ │ ├── view.cpp
│ │ └── view.h
│ ├── dft
│ │ ├── barriers.cpp
│ │ ├── barriers.h
│ │ ├── buffer.cpp
│ │ ├── buffer.h
│ │ ├── code
│ │ │ ├── code.cpp
│ │ │ ├── code.h
│ │ │ ├── dft_bit_reverse.comp
│ │ │ ├── dft_copy_input.comp
│ │ │ ├── dft_copy_output.comp
│ │ │ ├── dft_fft_global.comp
│ │ │ ├── dft_fft_shared.comp
│ │ │ ├── dft_mul.comp
│ │ │ ├── dft_mul_d.comp
│ │ │ ├── dft_view.frag
│ │ │ ├── dft_view.vert
│ │ │ └── math.glsl
│ │ ├── compute.cpp
│ │ ├── compute.h
│ │ ├── dft.cpp
│ │ ├── dft.h
│ │ ├── fft.cpp
│ │ ├── fft.h
│ │ ├── function.cpp
│ │ ├── function.h
│ │ ├── sampler.cpp
│ │ ├── sampler.h
│ │ ├── shaders
│ │ │ ├── bit_reverse.cpp
│ │ │ ├── bit_reverse.h
│ │ │ ├── copy_input.cpp
│ │ │ ├── copy_input.h
│ │ │ ├── copy_output.cpp
│ │ │ ├── copy_output.h
│ │ │ ├── fft_global.cpp
│ │ │ ├── fft_global.h
│ │ │ ├── fft_shared.cpp
│ │ │ ├── fft_shared.h
│ │ │ ├── mul.cpp
│ │ │ ├── mul.h
│ │ │ ├── mul_d.cpp
│ │ │ ├── mul_d.h
│ │ │ ├── view.cpp
│ │ │ └── view.h
│ │ ├── test
│ │ │ ├── test_data.cpp
│ │ │ ├── test_data.h
│ │ │ └── test_dft.cpp
│ │ ├── view.cpp
│ │ └── view.h
│ ├── optical_flow
│ │ ├── barriers.cpp
│ │ ├── barriers.h
│ │ ├── code
│ │ │ ├── code.cpp
│ │ │ ├── code.h
│ │ │ ├── optical_flow_downsample.comp
│ │ │ ├── optical_flow_flow.comp
│ │ │ ├── optical_flow_grayscale.comp
│ │ │ ├── optical_flow_sobel.comp
│ │ │ ├── optical_flow_view.frag
│ │ │ ├── optical_flow_view.vert
│ │ │ ├── optical_flow_view_debug.frag
│ │ │ └── optical_flow_view_debug.vert
│ │ ├── compute.cpp
│ │ ├── compute.h
│ │ ├── compute
│ │ │ ├── create.cpp
│ │ │ ├── create.h
│ │ │ ├── flow.cpp
│ │ │ ├── flow.h
│ │ │ ├── image_pyramid.cpp
│ │ │ ├── image_pyramid.h
│ │ │ ├── sobel.cpp
│ │ │ └── sobel.h
│ │ ├── function.cpp
│ │ ├── function.h
│ │ ├── option.h
│ │ ├── sampler.cpp
│ │ ├── sampler.h
│ │ ├── shaders
│ │ │ ├── downsample.cpp
│ │ │ ├── downsample.h
│ │ │ ├── flow.cpp
│ │ │ ├── flow.h
│ │ │ ├── grayscale.cpp
│ │ │ ├── grayscale.h
│ │ │ ├── sobel.cpp
│ │ │ ├── sobel.h
│ │ │ ├── view.cpp
│ │ │ └── view.h
│ │ ├── view.cpp
│ │ └── view.h
│ ├── pencil_sketch
│ │ ├── code
│ │ │ ├── code.cpp
│ │ │ ├── code.h
│ │ │ ├── pencil_sketch_compute.comp
│ │ │ ├── pencil_sketch_view.frag
│ │ │ └── pencil_sketch_view.vert
│ │ ├── compute.cpp
│ │ ├── compute.h
│ │ ├── sampler.cpp
│ │ ├── sampler.h
│ │ ├── shaders
│ │ │ ├── compute.cpp
│ │ │ ├── compute.h
│ │ │ ├── view.cpp
│ │ │ └── view.h
│ │ ├── view.cpp
│ │ └── view.h
│ ├── render_buffers.h
│ ├── renderer
│ │ ├── acceleration_structure.cpp
│ │ ├── acceleration_structure.h
│ │ ├── buffers
│ │ │ ├── commands.cpp
│ │ │ ├── commands.h
│ │ │ ├── drawing.cpp
│ │ │ ├── drawing.h
│ │ │ ├── ggx_f1_albedo.cpp
│ │ │ ├── ggx_f1_albedo.h
│ │ │ ├── opacity.cpp
│ │ │ ├── opacity.h
│ │ │ ├── transparency.cpp
│ │ │ └── transparency.h
│ │ ├── code
│ │ │ ├── code.cpp
│ │ │ ├── code.h
│ │ │ ├── constant.glsl
│ │ │ ├── convex_intersection.glsl
│ │ │ ├── drawing_buffer.glsl
│ │ │ ├── fragments.glsl
│ │ │ ├── mesh_in.glsl
│ │ │ ├── mesh_out.glsl
│ │ │ ├── point_offset.glsl
│ │ │ ├── renderer_mesh_normals.frag
│ │ │ ├── renderer_mesh_normals.geom
│ │ │ ├── renderer_mesh_normals.vert
│ │ │ ├── renderer_mesh_points.frag
│ │ │ ├── renderer_mesh_points_0d.vert
│ │ │ ├── renderer_mesh_points_1d.vert
│ │ │ ├── renderer_mesh_shadow.vert
│ │ │ ├── renderer_mesh_triangle_lines.frag
│ │ │ ├── renderer_mesh_triangle_lines.geom
│ │ │ ├── renderer_mesh_triangle_lines.vert
│ │ │ ├── renderer_mesh_triangles.frag
│ │ │ ├── renderer_mesh_triangles.geom
│ │ │ ├── renderer_mesh_triangles.vert
│ │ │ ├── renderer_volume.vert
│ │ │ ├── renderer_volume_image.frag
│ │ │ ├── renderer_volume_image_opacity.frag
│ │ │ ├── renderer_volume_image_opacity_transparency.frag
│ │ │ ├── renderer_volume_image_transparency.frag
│ │ │ ├── renderer_volume_opacity.frag
│ │ │ ├── renderer_volume_opacity_transparency.frag
│ │ │ ├── renderer_volume_transparency.frag
│ │ │ ├── shade.glsl
│ │ │ ├── visibility.glsl
│ │ │ ├── volume.glsl
│ │ │ ├── volume_image.glsl
│ │ │ ├── volume_in.glsl
│ │ │ ├── volume_intersect.glsl
│ │ │ ├── volume_opacity.glsl
│ │ │ ├── volume_out.glsl
│ │ │ ├── volume_shade.glsl
│ │ │ ├── volume_shadow.glsl
│ │ │ ├── volume_shadow_isosurface.glsl
│ │ │ ├── volume_shadow_mesh.glsl
│ │ │ └── volume_transparency.glsl
│ │ ├── event.h
│ │ ├── functionality.cpp
│ │ ├── functionality.h
│ │ ├── mesh
│ │ │ ├── buffers
│ │ │ │ ├── material.cpp
│ │ │ │ ├── material.h
│ │ │ │ ├── mesh.cpp
│ │ │ │ ├── mesh.h
│ │ │ │ ├── shadow_matrices.cpp
│ │ │ │ └── shadow_matrices.h
│ │ │ ├── commands.cpp
│ │ │ ├── commands.h
│ │ │ ├── depth_buffers.cpp
│ │ │ ├── depth_buffers.h
│ │ │ ├── load.cpp
│ │ │ ├── load.h
│ │ │ ├── memory.cpp
│ │ │ ├── memory.h
│ │ │ ├── meshes.cpp
│ │ │ ├── meshes.h
│ │ │ ├── object.cpp
│ │ │ ├── object.h
│ │ │ ├── render_buffers.cpp
│ │ │ ├── render_buffers.h
│ │ │ ├── renderer.cpp
│ │ │ ├── renderer.h
│ │ │ ├── sampler.cpp
│ │ │ ├── sampler.h
│ │ │ ├── shaders
│ │ │ │ ├── descriptors.cpp
│ │ │ │ ├── descriptors.h
│ │ │ │ ├── program_normals.cpp
│ │ │ │ ├── program_normals.h
│ │ │ │ ├── program_points.cpp
│ │ │ │ ├── program_points.h
│ │ │ │ ├── program_shadow.cpp
│ │ │ │ ├── program_shadow.h
│ │ │ │ ├── program_triangle_lines.cpp
│ │ │ │ ├── program_triangle_lines.h
│ │ │ │ ├── program_triangles.cpp
│ │ │ │ ├── program_triangles.h
│ │ │ │ ├── vertex_points.cpp
│ │ │ │ ├── vertex_points.h
│ │ │ │ ├── vertex_triangles.cpp
│ │ │ │ └── vertex_triangles.h
│ │ │ ├── shadow_mapping.cpp
│ │ │ └── shadow_mapping.h
│ │ ├── renderer.cpp
│ │ ├── renderer.h
│ │ ├── renderer_draw.cpp
│ │ ├── renderer_draw.h
│ │ ├── renderer_object.h
│ │ ├── renderer_view.h
│ │ ├── shading_parameters.h
│ │ ├── storage.h
│ │ ├── storage_mesh.h
│ │ ├── storage_volume.h
│ │ ├── test
│ │ │ └── ray_tracing
│ │ │ │ ├── code
│ │ │ │ ├── code.cpp
│ │ │ │ ├── code.h
│ │ │ │ ├── renderer_ray_closest_hit.rchit
│ │ │ │ ├── renderer_ray_generation.rgen
│ │ │ │ ├── renderer_ray_miss.rmiss
│ │ │ │ └── renderer_ray_query.comp
│ │ │ │ ├── compute.cpp
│ │ │ │ ├── compute.h
│ │ │ │ ├── descriptors.cpp
│ │ │ │ ├── descriptors.h
│ │ │ │ ├── image.cpp
│ │ │ │ ├── image.h
│ │ │ │ ├── program_ray_query.cpp
│ │ │ │ ├── program_ray_query.h
│ │ │ │ ├── program_ray_tracing.cpp
│ │ │ │ ├── program_ray_tracing.h
│ │ │ │ ├── test_ray_tracing.cpp
│ │ │ │ └── test_ray_tracing.h
│ │ ├── transparency_message.h
│ │ ├── viewport_transform.h
│ │ └── volume
│ │ │ ├── buffers
│ │ │ ├── coordinates.cpp
│ │ │ ├── coordinates.h
│ │ │ ├── volume.cpp
│ │ │ └── volume.h
│ │ │ ├── geometry.cpp
│ │ │ ├── geometry.h
│ │ │ ├── image.cpp
│ │ │ ├── image.h
│ │ │ ├── object.cpp
│ │ │ ├── object.h
│ │ │ ├── renderer.cpp
│ │ │ ├── renderer.h
│ │ │ ├── sampler.cpp
│ │ │ ├── sampler.h
│ │ │ └── shaders
│ │ │ ├── descriptors.cpp
│ │ │ ├── descriptors.h
│ │ │ ├── program_volume.cpp
│ │ │ └── program_volume.h
│ └── text_writer
│ │ ├── code
│ │ ├── code.cpp
│ │ ├── code.h
│ │ ├── text_writer_view.frag
│ │ ├── text_writer_view.vert
│ │ └── view_in.glsl
│ │ ├── glyphs.cpp
│ │ ├── glyphs.h
│ │ ├── sampler.cpp
│ │ ├── sampler.h
│ │ ├── shaders
│ │ ├── view.cpp
│ │ └── view.h
│ │ ├── view.cpp
│ │ └── view.h
├── gui
│ ├── application.cpp
│ ├── application.h
│ ├── com
│ │ ├── application.cpp
│ │ ├── application.h
│ │ ├── application_message.cpp
│ │ ├── application_message.h
│ │ ├── command_line.cpp
│ │ ├── command_line.h
│ │ ├── connection.cpp
│ │ ├── connection.h
│ │ ├── model_events.cpp
│ │ ├── model_events.h
│ │ ├── model_tree.h
│ │ ├── support.cpp
│ │ ├── support.h
│ │ ├── thread_queue.cpp
│ │ ├── thread_queue.h
│ │ ├── threads.cpp
│ │ └── threads.h
│ ├── dialogs
│ │ ├── application_about.cpp
│ │ ├── application_about.h
│ │ ├── application_help.cpp
│ │ ├── application_help.h
│ │ ├── bound_cocone.cpp
│ │ ├── bound_cocone.h
│ │ ├── bound_cocone.ui
│ │ ├── color_dialog.cpp
│ │ ├── color_dialog.h
│ │ ├── facet_object.cpp
│ │ ├── facet_object.h
│ │ ├── facet_object.ui
│ │ ├── file_dialog.cpp
│ │ ├── file_dialog.h
│ │ ├── image_slice.cpp
│ │ ├── image_slice.h
│ │ ├── image_slice.ui
│ │ ├── message.cpp
│ │ ├── message.h
│ │ ├── object_selection.cpp
│ │ ├── object_selection.h
│ │ ├── object_selection.ui
│ │ ├── painter_image.cpp
│ │ ├── painter_image.h
│ │ ├── painter_image.ui
│ │ ├── painter_parameters.cpp
│ │ ├── painter_parameters.h
│ │ ├── painter_parameters.ui
│ │ ├── painter_parameters_3d.cpp
│ │ ├── painter_parameters_3d.h
│ │ ├── painter_parameters_3d.ui
│ │ ├── painter_parameters_nd.cpp
│ │ ├── painter_parameters_nd.h
│ │ ├── painter_parameters_nd.ui
│ │ ├── point_object.cpp
│ │ ├── point_object.h
│ │ ├── point_object.ui
│ │ ├── test_selection.cpp
│ │ ├── test_selection.h
│ │ ├── test_selection.ui
│ │ ├── view_image.cpp
│ │ ├── view_image.h
│ │ ├── view_image.ui
│ │ ├── volume_object.cpp
│ │ ├── volume_object.h
│ │ └── volume_object.ui
│ ├── main_window
│ │ ├── actions.cpp
│ │ ├── actions.h
│ │ ├── actions_repository.cpp
│ │ ├── actions_repository.h
│ │ ├── colors_widget.cpp
│ │ ├── colors_widget.h
│ │ ├── colors_widget.ui
│ │ ├── graphics_widget.h
│ │ ├── lighting_widget.cpp
│ │ ├── lighting_widget.h
│ │ ├── lighting_widget.ui
│ │ ├── log.cpp
│ │ ├── log.h
│ │ ├── main_window.cpp
│ │ ├── main_window.h
│ │ ├── main_window.ui
│ │ ├── mesh_widget.cpp
│ │ ├── mesh_widget.h
│ │ ├── mesh_widget.ui
│ │ ├── model_tree.cpp
│ │ ├── model_tree.h
│ │ ├── model_tree.ui
│ │ ├── model_tree_actions.h
│ │ ├── model_tree_menu.cpp
│ │ ├── model_tree_menu.h
│ │ ├── model_tree_style.cpp
│ │ ├── model_tree_style.h
│ │ ├── range_slider.cpp
│ │ ├── range_slider.h
│ │ ├── view_widget.cpp
│ │ ├── view_widget.h
│ │ ├── view_widget.ui
│ │ ├── volume_widget.cpp
│ │ ├── volume_widget.h
│ │ └── volume_widget.ui
│ └── painter_window
│ │ ├── actions.cpp
│ │ ├── actions.h
│ │ ├── difference.h
│ │ ├── image_widget.cpp
│ │ ├── image_widget.h
│ │ ├── image_widget.ui
│ │ ├── initial_image.cpp
│ │ ├── initial_image.h
│ │ ├── painter_window.cpp
│ │ ├── painter_window.h
│ │ ├── painter_window.ui
│ │ ├── pixels.h
│ │ ├── process.cpp
│ │ ├── process.h
│ │ ├── sliders_widget.cpp
│ │ ├── sliders_widget.h
│ │ ├── statistics_widget.cpp
│ │ ├── statistics_widget.h
│ │ └── statistics_widget.ui
├── image
│ ├── alpha.cpp
│ ├── alpha.h
│ ├── alpha_blend.cpp
│ ├── alpha_blend.h
│ ├── conv_from_bytes.cpp
│ ├── conv_from_bytes.h
│ ├── conv_to_bytes.cpp
│ ├── conv_to_bytes.h
│ ├── conversion.cpp
│ ├── conversion.h
│ ├── depth.cpp
│ ├── depth.h
│ ├── file_load.cpp
│ ├── file_load.h
│ ├── file_save.cpp
│ ├── file_save.h
│ ├── flip.cpp
│ ├── flip.h
│ ├── format.cpp
│ ├── format.h
│ ├── grayscale.cpp
│ ├── grayscale.h
│ ├── image.h
│ ├── max.cpp
│ ├── max.h
│ ├── normalize.cpp
│ ├── normalize.h
│ ├── slice.cpp
│ ├── slice.h
│ ├── swap.cpp
│ └── swap.h
├── main.cpp
├── model
│ ├── com
│ │ └── functions.h
│ ├── mesh.h
│ ├── mesh
│ │ ├── bounding_box.h
│ │ ├── create_facets.cpp
│ │ ├── create_facets.h
│ │ ├── create_lines.cpp
│ │ ├── create_lines.h
│ │ ├── create_points.cpp
│ │ ├── create_points.h
│ │ ├── file.cpp
│ │ ├── file.h
│ │ ├── file
│ │ │ ├── data_read.h
│ │ │ ├── file_type.cpp
│ │ │ ├── file_type.h
│ │ │ ├── lines.cpp
│ │ │ ├── lines.h
│ │ │ ├── load_obj.cpp
│ │ │ ├── load_obj.h
│ │ │ ├── load_stl.cpp
│ │ │ ├── load_stl.h
│ │ │ ├── load_txt.cpp
│ │ │ ├── load_txt.h
│ │ │ ├── mesh_facet.h
│ │ │ ├── obj
│ │ │ │ ├── counters.h
│ │ │ │ ├── data_read.h
│ │ │ │ ├── facet.h
│ │ │ │ ├── line.h
│ │ │ │ ├── load_lib.cpp
│ │ │ │ ├── load_lib.h
│ │ │ │ └── name.h
│ │ │ ├── save_obj.cpp
│ │ │ ├── save_obj.h
│ │ │ ├── save_stl.cpp
│ │ │ ├── save_stl.h
│ │ │ └── stl
│ │ │ │ └── swap.h
│ │ ├── file_info.cpp
│ │ ├── file_info.h
│ │ ├── matrix.h
│ │ ├── normals.cpp
│ │ ├── normals.h
│ │ ├── optimize.cpp
│ │ ├── optimize.h
│ │ ├── position.h
│ │ ├── sort.h
│ │ ├── test
│ │ │ └── test_file.cpp
│ │ ├── unique.h
│ │ └── vertices.h
│ ├── mesh_object.h
│ ├── mesh_utility.h
│ ├── object_id.h
│ ├── versions.h
│ ├── volume.h
│ ├── volume
│ │ ├── bounding_box.h
│ │ ├── directory.cpp
│ │ ├── directory.h
│ │ ├── file.cpp
│ │ ├── file.h
│ │ ├── matrix.h
│ │ ├── position.h
│ │ └── vertices.h
│ ├── volume_object.h
│ └── volume_utility.h
├── noise
│ ├── functions.cpp
│ ├── functions.h
│ ├── noise.cpp
│ ├── noise.h
│ ├── simplex_noise.cpp
│ ├── simplex_noise.h
│ ├── tables.cpp
│ ├── tables.h
│ └── test
│ │ ├── image.h
│ │ ├── performance.h
│ │ ├── test_noise.cpp
│ │ ├── test_performance.cpp
│ │ ├── test_simplex_noise.cpp
│ │ └── test_simplex_performance.cpp
├── numerical
│ ├── cholesky.h
│ ├── complement.h
│ ├── conversion.h
│ ├── covariance.h
│ ├── determinant.h
│ ├── eigen.h
│ ├── erf_inv.h
│ ├── gauss.h
│ ├── gram.h
│ ├── identity.h
│ ├── integrate.h
│ ├── interpolation.h
│ ├── matrix.h
│ ├── matrix_object.h
│ ├── normal.h
│ ├── optics.h
│ ├── quadratic.h
│ ├── quaternion.h
│ ├── quaternion_object.h
│ ├── ray.h
│ ├── region.h
│ ├── rotation.h
│ ├── simplex.h
│ ├── solve.h
│ ├── test
│ │ ├── test_cholesky.cpp
│ │ ├── test_complement.cpp
│ │ ├── test_covariance.cpp
│ │ ├── test_determinant.cpp
│ │ ├── test_eigen.cpp
│ │ ├── test_erf_inv.cpp
│ │ ├── test_gram.cpp
│ │ ├── test_identity.cpp
│ │ ├── test_integrate.cpp
│ │ ├── test_normal.cpp
│ │ ├── test_optics.cpp
│ │ ├── test_quaternion.cpp
│ │ ├── test_region.cpp
│ │ ├── test_simplex.cpp
│ │ ├── test_solve.cpp
│ │ ├── test_transform.cpp
│ │ └── test_vector.cpp
│ ├── transform.h
│ ├── vector.h
│ └── vector_object.h
├── painter
│ ├── integrators
│ │ ├── bpt
│ │ │ ├── bpt.cpp
│ │ │ ├── bpt.h
│ │ │ ├── connect.cpp
│ │ │ ├── connect.h
│ │ │ ├── light_distribution.cpp
│ │ │ ├── light_distribution.h
│ │ │ ├── mis.cpp
│ │ │ ├── mis.h
│ │ │ ├── vertex
│ │ │ │ ├── area_pdf.h
│ │ │ │ ├── camera.h
│ │ │ │ ├── infinite_light.h
│ │ │ │ ├── light.h
│ │ │ │ ├── surface.h
│ │ │ │ └── vertex.h
│ │ │ └── vertex_pdf.h
│ │ ├── com
│ │ │ ├── functions.h
│ │ │ ├── normals.h
│ │ │ ├── surface_sample.cpp
│ │ │ ├── surface_sample.h
│ │ │ └── visibility.h
│ │ └── pt
│ │ │ ├── direct_lighting.cpp
│ │ │ ├── direct_lighting.h
│ │ │ ├── pt.cpp
│ │ │ └── pt.h
│ ├── lights
│ │ ├── ball_light.cpp
│ │ ├── ball_light.h
│ │ ├── com
│ │ │ ├── functions.h
│ │ │ └── spotlight.h
│ │ ├── distant_light.cpp
│ │ ├── distant_light.h
│ │ ├── infinite_area_light.cpp
│ │ ├── infinite_area_light.h
│ │ ├── parallelotope_light.cpp
│ │ ├── parallelotope_light.h
│ │ ├── point_light.cpp
│ │ ├── point_light.h
│ │ ├── spot_light.cpp
│ │ └── spot_light.h
│ ├── objects.h
│ ├── painter.cpp
│ ├── painter.h
│ ├── painting
│ │ ├── integrator_bpt.cpp
│ │ ├── integrator_bpt.h
│ │ ├── integrator_pt.cpp
│ │ ├── integrator_pt.h
│ │ ├── paintbrush.h
│ │ ├── painting.cpp
│ │ ├── painting.h
│ │ ├── sampler.h
│ │ ├── statistics.h
│ │ ├── test
│ │ │ └── test_paintbrush.cpp
│ │ └── thread_notifier.h
│ ├── pixels
│ │ ├── background.h
│ │ ├── color_contribution.h
│ │ ├── gaussian.h
│ │ ├── pixel.h
│ │ ├── pixel_filter.h
│ │ ├── pixel_region.h
│ │ ├── pixels.cpp
│ │ ├── pixels.h
│ │ ├── samples
│ │ │ ├── background.h
│ │ │ ├── color.h
│ │ │ ├── com
│ │ │ │ ├── create.h
│ │ │ │ ├── info.h
│ │ │ │ ├── merge.h
│ │ │ │ ├── select.h
│ │ │ │ └── sort.h
│ │ │ ├── create.cpp
│ │ │ ├── create.h
│ │ │ ├── merge.cpp
│ │ │ ├── merge.h
│ │ │ ├── merge_color.cpp
│ │ │ ├── merge_color.h
│ │ │ └── test
│ │ │ │ ├── compare.h
│ │ │ │ ├── test_create.cpp
│ │ │ │ └── test_merge.cpp
│ │ └── test
│ │ │ └── test_gaussian.cpp
│ ├── projectors
│ │ ├── com
│ │ │ └── functions.h
│ │ ├── parallel_projector.cpp
│ │ ├── parallel_projector.h
│ │ ├── perspective_projector.cpp
│ │ ├── perspective_projector.h
│ │ ├── spherical_projector.cpp
│ │ └── spherical_projector.h
│ ├── scenes
│ │ ├── cornell_box.cpp
│ │ ├── cornell_box.h
│ │ ├── ray_intersection.h
│ │ ├── scene.cpp
│ │ ├── scene.h
│ │ ├── simple.cpp
│ │ ├── simple.h
│ │ ├── storage.cpp
│ │ └── storage.h
│ ├── shapes
│ │ ├── hyperplane_parallelotope.cpp
│ │ ├── hyperplane_parallelotope.h
│ │ ├── mesh.cpp
│ │ ├── mesh.h
│ │ ├── mesh
│ │ │ ├── data.cpp
│ │ │ ├── data.h
│ │ │ ├── facet.h
│ │ │ ├── material.h
│ │ │ ├── optimize.cpp
│ │ │ ├── optimize.h
│ │ │ └── texture.h
│ │ ├── parallelotope.cpp
│ │ ├── parallelotope.h
│ │ └── test
│ │ │ ├── spherical_mesh.h
│ │ │ ├── test_mesh.cpp
│ │ │ └── test_mesh_performance.cpp
│ └── test
│ │ ├── test_painter.cpp
│ │ └── test_painter.h
├── process
│ ├── compute_meshes.cpp
│ ├── compute_meshes.h
│ ├── compute_volume.cpp
│ ├── compute_volume.h
│ ├── computing.cpp
│ ├── computing.h
│ ├── dimension.cpp
│ ├── dimension.h
│ ├── load.h
│ ├── loading.cpp
│ ├── loading.h
│ ├── options.h
│ ├── painting.cpp
│ ├── painting.h
│ ├── saving.cpp
│ ├── saving.h
│ ├── testing.cpp
│ └── testing.h
├── progress
│ ├── progress.cpp
│ ├── progress.h
│ ├── progress_interfaces.h
│ ├── progress_list.cpp
│ └── progress_list.h
├── sampling
│ ├── halton_sampler.h
│ ├── lh_sampler.h
│ ├── mis.h
│ ├── parallelotope_uniform.h
│ ├── pdf.h
│ ├── simplex_uniform.h
│ ├── sj_sampler.h
│ ├── sphere_cosine.h
│ ├── sphere_power_cosine.h
│ ├── sphere_uniform.h
│ ├── test
│ │ ├── discrepancy.h
│ │ ├── names.h
│ │ ├── show_points.py
│ │ ├── test_samplers_discrepancy.cpp
│ │ ├── test_samplers_file.cpp
│ │ ├── test_samplers_performance.cpp
│ │ ├── test_sphere_cosine.cpp
│ │ ├── test_sphere_power_cosine.cpp
│ │ ├── test_sphere_uniform.cpp
│ │ ├── test_uniform.cpp
│ │ └── test_uniform_file.cpp
│ └── testing
│ │ ├── angle_distribution.h
│ │ ├── functions.h
│ │ ├── sphere_bucket.h
│ │ ├── sphere_distribution.h
│ │ ├── sphere_intersection.h
│ │ ├── sphere_mesh.h
│ │ └── test.h
├── settings
│ ├── dimensions.h
│ ├── directory.cpp
│ ├── directory.h
│ ├── instantiation.h
│ ├── name.h
│ ├── test
│ │ └── test_dimensions.cpp
│ ├── utility.cpp
│ └── utility.h
├── shading
│ ├── compute
│ │ └── brdf.h
│ ├── ggx
│ │ ├── brdf.h
│ │ ├── code
│ │ │ ├── brdf.glsl
│ │ │ ├── constants.glsl
│ │ │ ├── fresnel.glsl
│ │ │ ├── ggx.glsl
│ │ │ ├── metalness.glsl
│ │ │ ├── multiple_bounce.glsl
│ │ │ └── subsurface.glsl
│ │ ├── f1_albedo.cpp
│ │ ├── f1_albedo.h
│ │ ├── fresnel.h
│ │ ├── ggx.h
│ │ ├── metalness.h
│ │ ├── multiple_bounce.h
│ │ ├── subsurface.h
│ │ ├── table
│ │ │ ├── f1_albedo.cpp
│ │ │ └── f1_albedo.h
│ │ └── test
│ │ │ ├── test_brdf.cpp
│ │ │ ├── test_f1_albedo.cpp
│ │ │ ├── test_fresnel.cpp
│ │ │ └── test_sampling.cpp
│ ├── lambertian
│ │ ├── brdf.h
│ │ └── test
│ │ │ └── test_brdf.cpp
│ ├── objects.h
│ ├── specular
│ │ ├── fresnel.h
│ │ └── test
│ │ │ └── test_fresnel.cpp
│ └── testing
│ │ ├── color.h
│ │ └── random.h
├── statistics
│ ├── estimator_sn.h
│ ├── mad.h
│ ├── median.h
│ ├── median_sorted.h
│ ├── moving_average.h
│ ├── moving_variance.h
│ └── test
│ │ ├── compare.h
│ │ ├── test_estimator_sn.cpp
│ │ ├── test_mad.cpp
│ │ ├── test_median.cpp
│ │ ├── test_median_sorted.cpp
│ │ ├── test_moving_average.cpp
│ │ └── test_moving_variance.cpp
├── storage
│ ├── repository.h
│ ├── repository
│ │ ├── mesh_objects.cpp
│ │ ├── mesh_objects.h
│ │ ├── volume_objects.cpp
│ │ └── volume_objects.h
│ ├── storage.h
│ └── types.h
├── test
│ ├── test.cpp
│ └── test.h
├── text
│ ├── code_points.cpp
│ ├── code_points.h
│ ├── font.cpp
│ ├── font.h
│ ├── fonts.cpp
│ ├── fonts.h
│ ├── glyphs.cpp
│ ├── glyphs.h
│ ├── test
│ │ └── test_unicode.cpp
│ ├── text_data.h
│ ├── unicode.cpp
│ ├── unicode.h
│ ├── vertices.cpp
│ └── vertices.h
├── view
│ ├── com
│ │ ├── camera.cpp
│ │ ├── camera.h
│ │ ├── clip_plane.cpp
│ │ ├── clip_plane.h
│ │ ├── frame_rate.cpp
│ │ ├── frame_rate.h
│ │ ├── mouse.cpp
│ │ ├── mouse.h
│ │ ├── thread_events.h
│ │ ├── thread_queue.h
│ │ ├── view_thread.h
│ │ ├── window.cpp
│ │ └── window.h
│ ├── create.cpp
│ ├── create.h
│ ├── event.h
│ ├── view.h
│ └── view
│ │ ├── buffer_info.cpp
│ │ ├── buffer_info.h
│ │ ├── clear_buffer.cpp
│ │ ├── clear_buffer.h
│ │ ├── image_commands.cpp
│ │ ├── image_commands.h
│ │ ├── image_process.cpp
│ │ ├── image_process.h
│ │ ├── image_resolve.cpp
│ │ ├── image_resolve.h
│ │ ├── render_buffers.cpp
│ │ ├── render_buffers.h
│ │ ├── render_pass.cpp
│ │ ├── render_pass.h
│ │ ├── swapchain.cpp
│ │ ├── swapchain.h
│ │ ├── view.cpp
│ │ ├── view.h
│ │ ├── view_info.cpp
│ │ ├── view_info.h
│ │ └── view_process.h
├── vulkan
│ ├── acceleration_structure.cpp
│ ├── acceleration_structure.h
│ ├── api_version.h
│ ├── buffers.cpp
│ ├── buffers.h
│ ├── buffers
│ │ ├── copy.cpp
│ │ ├── copy.h
│ │ ├── create.cpp
│ │ ├── create.h
│ │ ├── image.cpp
│ │ ├── image.h
│ │ ├── image_copy.cpp
│ │ ├── image_copy.h
│ │ ├── memory.cpp
│ │ ├── memory.h
│ │ ├── query.cpp
│ │ └── query.h
│ ├── commands.cpp
│ ├── commands.h
│ ├── create.cpp
│ ├── create.h
│ ├── descriptor.cpp
│ ├── descriptor.h
│ ├── device.cpp
│ ├── device.h
│ ├── device
│ │ ├── create.cpp
│ │ ├── create.h
│ │ ├── device_compute.cpp
│ │ ├── device_compute.h
│ │ ├── device_graphics.cpp
│ │ ├── device_graphics.h
│ │ ├── queues.cpp
│ │ └── queues.h
│ ├── error.cpp
│ ├── error.h
│ ├── extensions.cpp
│ ├── extensions.h
│ ├── instance.cpp
│ ├── instance.h
│ ├── instance
│ │ ├── create.cpp
│ │ ├── create.h
│ │ ├── debug.cpp
│ │ ├── debug.h
│ │ ├── info.cpp
│ │ └── info.h
│ ├── layout.h
│ ├── object_handles.cpp
│ ├── object_handles.h
│ ├── objects.h
│ ├── overview.cpp
│ ├── overview.h
│ ├── physical_device
│ │ ├── feature_properties.cpp
│ │ ├── feature_properties.h
│ │ ├── features.cpp
│ │ ├── features.h
│ │ ├── find.cpp
│ │ ├── find.h
│ │ ├── functionality.cpp
│ │ ├── functionality.h
│ │ ├── info.cpp
│ │ ├── info.h
│ │ ├── physical_device.cpp
│ │ ├── physical_device.h
│ │ ├── properties.cpp
│ │ └── properties.h
│ ├── pipeline
│ │ ├── compute.cpp
│ │ ├── compute.h
│ │ ├── graphics.cpp
│ │ ├── graphics.h
│ │ ├── ray_tracing.cpp
│ │ ├── ray_tracing.h
│ │ ├── shader_info.cpp
│ │ └── shader_info.h
│ ├── queue.cpp
│ ├── queue.h
│ ├── sample.cpp
│ ├── sample.h
│ ├── shader.cpp
│ ├── shader.h
│ ├── strings.h
│ ├── strings
│ │ ├── api_version.cpp
│ │ ├── api_version.h
│ │ ├── color_space.cpp
│ │ ├── color_space.h
│ │ ├── flags.cpp
│ │ ├── flags.h
│ │ ├── format.cpp
│ │ ├── format.h
│ │ ├── image_layout.cpp
│ │ ├── image_layout.h
│ │ ├── image_type.cpp
│ │ ├── image_type.h
│ │ ├── physical_device_type.cpp
│ │ ├── physical_device_type.h
│ │ ├── pipeline_robustness_buffer_behavior.cpp
│ │ ├── pipeline_robustness_buffer_behavior.h
│ │ ├── pipeline_robustness_image_behavior.cpp
│ │ ├── pipeline_robustness_image_behavior.h
│ │ ├── point_clipping_behavior.cpp
│ │ ├── point_clipping_behavior.h
│ │ ├── present_mode.cpp
│ │ ├── present_mode.h
│ │ ├── primitive_topology.cpp
│ │ ├── primitive_topology.h
│ │ ├── result.cpp
│ │ ├── result.h
│ │ ├── shader_float_controls_independence.cpp
│ │ ├── shader_float_controls_independence.h
│ │ ├── strings.cpp
│ │ └── strings.h
│ ├── surface.cpp
│ ├── surface.h
│ ├── swapchain.cpp
│ ├── swapchain.h
│ ├── sync.cpp
│ ├── sync.h
│ └── test
│ │ └── test_layout.cpp
└── window
│ ├── handle.h
│ ├── obsolete
│ ├── event.h
│ ├── manage.cpp
│ ├── manage.h
│ ├── window.cpp
│ └── window.h
│ ├── surface.cpp
│ └── surface.h
├── src_str
└── create_str.cpp
└── tools
└── code_format.py
/.gitignore:
--------------------------------------------------------------------------------
1 | /CMakeLists.txt.user
2 |
--------------------------------------------------------------------------------
/cmake/FFTW/FindFFTW.cmake:
--------------------------------------------------------------------------------
1 | # FFTW_FOUND
2 | # FFTW_INCLUDE_DIRS
3 | # FFTW_LIBRARIES
4 | # FFTW_THREAD_LIBRARIES
5 |
6 | if (FFTW_INCLUDE_DIRS AND FFTW_LIBRARIES AND FFTW_THREAD_LIBRARIES)
7 | set(FFTW_FIND_QUIETLY TRUE)
8 | endif()
9 |
10 | find_library(FFTW_LIBRARIES NAMES fftw3f libfftw3f)
11 | find_library(FFTW_THREAD_LIBRARIES NAMES fftw3f_threads libfftw3f_threads)
12 | find_path(FFTW_INCLUDE_DIRS NAMES fftw3.h)
13 |
14 | include(FindPackageHandleStandardArgs)
15 | find_package_handle_standard_args(FFTW DEFAULT_MSG FFTW_INCLUDE_DIRS FFTW_LIBRARIES FFTW_THREAD_LIBRARIES)
16 | mark_as_advanced(FFTW_INCLUDE_DIRS FFTW_LIBRARIES FFTW_THREAD_LIBRARIES)
17 |
--------------------------------------------------------------------------------
/cmake/GLFW/FindGLFW.cmake:
--------------------------------------------------------------------------------
1 | # GLFW_FOUND
2 | # GLFW_INCLUDE_DIRS
3 | # GLFW_LIBRARIES
4 |
5 | if (GLFW_INCLUDE_DIRS AND GLFW_LIBRARIES)
6 | set(GLFW_FIND_QUIETLY TRUE)
7 | endif()
8 |
9 | find_library(GLFW_LIBRARIES NAMES glfw libglfw glfw3 libglfw3)
10 | find_path(GLFW_MAIN_INCLUDE_DIR NAMES GLFW/glfw3.h)
11 | find_path(GLFW_NATIVE_INCLUDE_DIR NAMES GLFW/glfw3native.h)
12 |
13 | if (GLFW_MAIN_INCLUDE_DIR AND GLFW_NATIVE_INCLUDE_DIR)
14 | set(GLFW_INCLUDE_DIRS "${GLFW_MAIN_INCLUDE_DIR}" "${GLFW_NATIVE_INCLUDE_DIR}")
15 | list(REMOVE_DUPLICATES GLFW_INCLUDE_DIRS)
16 | endif()
17 |
18 | include(FindPackageHandleStandardArgs)
19 | find_package_handle_standard_args(GLFW DEFAULT_MSG GLFW_INCLUDE_DIRS GLFW_LIBRARIES)
20 | mark_as_advanced(GLFW_INCLUDE_DIRS GLFW_LIBRARIES)
21 |
--------------------------------------------------------------------------------
/cmake/GMP/FindGMP.cmake:
--------------------------------------------------------------------------------
1 | # GMP_FOUND
2 | # GMP_INCLUDE_DIRS
3 | # GMP_C_LIBRARIES
4 | # GMP_CXX_LIBRARIES
5 |
6 | if (GMP_INCLUDE_DIRS AND GMP_C_LIBRARIES AND GMP_CXX_LIBRARIES)
7 | set(GMP_FIND_QUIETLY TRUE)
8 | endif()
9 |
10 | find_library(GMP_C_LIBRARIES NAMES gmp libgmp)
11 | find_library(GMP_CXX_LIBRARIES NAMES gmpxx libgmpxx)
12 | find_path(GMP_C_INCLUDES NAMES gmp.h)
13 | find_path(GMP_CXX_INCLUDES NAMES gmpxx.h)
14 |
15 | if (GMP_C_INCLUDES AND GMP_CXX_INCLUDES)
16 | set(GMP_INCLUDE_DIRS "${GMP_C_INCLUDES}" "${GMP_CXX_INCLUDES}")
17 | list(REMOVE_DUPLICATES GMP_INCLUDE_DIRS)
18 | endif()
19 |
20 | include(FindPackageHandleStandardArgs)
21 | find_package_handle_standard_args(GMP DEFAULT_MSG GMP_INCLUDE_DIRS GMP_C_LIBRARIES GMP_CXX_LIBRARIES)
22 | mark_as_advanced(GMP_INCLUDE_DIRS GMP_C_LIBRARIES GMP_CXX_LIBRARIES)
--------------------------------------------------------------------------------
/font/DejaVuSans.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/cppd/math/7bf73ab56ab9b6970df045a1a4a11fb652dc0a3e/font/DejaVuSans.ttf
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [tool.isort]
2 | atomic = true
3 | combine_star = true
4 | line_length = 120
5 | order_by_type = true
6 | py_version = "auto"
7 |
8 | [tool.black]
9 | line-length = 120
10 | target-version = ["py311"]
11 |
--------------------------------------------------------------------------------
/src/color/colors.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "rgb8.h"
21 |
22 | namespace ns::color::rgb
23 | {
24 | inline constexpr RGB8 BLACK(0, 0, 0);
25 | inline constexpr RGB8 BLUE(0, 0, 255);
26 | inline constexpr RGB8 CYAN(0, 255, 255);
27 | inline constexpr RGB8 GREEN(0, 255, 0);
28 | inline constexpr RGB8 MAGENTA(255, 0, 255);
29 | inline constexpr RGB8 RED(255, 0, 0);
30 | inline constexpr RGB8 WHITE(255, 255, 255);
31 | inline constexpr RGB8 YELLOW(255, 255, 0);
32 | }
33 |
--------------------------------------------------------------------------------
/src/color/illuminants.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "color.h"
21 |
22 | namespace ns::color
23 | {
24 | [[nodiscard]] const Spectrum& daylight_d65();
25 |
26 | [[nodiscard]] double daylight_min_cct();
27 | [[nodiscard]] double daylight_max_cct();
28 | [[nodiscard]] Spectrum daylight(double cct);
29 |
30 | [[nodiscard]] const Spectrum& blackbody_a();
31 | [[nodiscard]] Spectrum blackbody(double t);
32 | }
33 |
--------------------------------------------------------------------------------
/src/color/samples/blackbody_samples.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::color::samples
23 | {
24 | std::vector blackbody_a_samples(int from, int to, int count);
25 | std::vector blackbody_samples(double t, int from, int to, int count);
26 | }
27 |
--------------------------------------------------------------------------------
/src/color/samples/daylight_samples.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::color::samples
23 | {
24 | inline constexpr int DAYLIGHT_SAMPLES_MIN_WAVELENGTH = 300;
25 | inline constexpr int DAYLIGHT_SAMPLES_MAX_WAVELENGTH = 830;
26 |
27 | inline constexpr double DAYLIGHT_SAMPLES_MIN_CCT = 4000;
28 | inline constexpr double DAYLIGHT_SAMPLES_MAX_CCT = 25000;
29 |
30 | std::vector daylight_d65_samples(int from, int to, int count);
31 | std::vector daylight_samples(double cct, int from, int to, int count);
32 | }
33 |
--------------------------------------------------------------------------------
/src/color/table/conversion.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | namespace ns::color::table
21 | {
22 | std::string conversion_lookup_table_float();
23 | std::string conversion_lookup_table_uint16();
24 | }
25 |
--------------------------------------------------------------------------------
/src/com/benchmark.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns
21 | {
22 | template
23 | void do_not_optimize(const T& v)
24 | {
25 | asm volatile("" : : "r,m"(v) : "memory");
26 | }
27 |
28 | template
29 | void do_not_optimize(T&) = delete;
30 | }
31 |
--------------------------------------------------------------------------------
/src/com/bit/table/reverse.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include
19 |
20 | namespace ns::bit::table
21 | {
22 | std::string bit_reverse_lookup_table();
23 | }
24 |
--------------------------------------------------------------------------------
/src/com/chrono.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include "chrono.h"
19 |
20 | #include
21 | #include
22 | #include
23 |
24 | namespace ns
25 | {
26 | std::tm time_to_local_time(const std::chrono::system_clock::time_point& time)
27 | {
28 | const std::time_t t = std::chrono::system_clock::to_time_t(time);
29 | static std::mutex mutex;
30 | const std::lock_guard lg(mutex);
31 | return *std::localtime(&t);
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/com/constant.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns
21 | {
22 | template
23 | inline constexpr T PI = 3.1415926535897932384626433832795028841971693993751L;
24 | }
25 |
--------------------------------------------------------------------------------
/src/com/file/path.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns
24 | {
25 | template
26 | std::string generic_utf8_filename(const T& path);
27 |
28 | template
29 | std::filesystem::path path_from_utf8(const T& filename);
30 |
31 | std::filesystem::path path_from_utf8(const char* filename);
32 | }
33 |
--------------------------------------------------------------------------------
/src/com/file/read.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | template
25 | std::vector read_file(const Path& path);
26 | }
27 |
--------------------------------------------------------------------------------
/src/com/log/write.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns
24 | {
25 | std::string write_log(std::string_view text, std::string_view description) noexcept;
26 |
27 | [[noreturn]] void write_log_fatal_error_and_exit(const char* text) noexcept;
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/message.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | void message_error(const std::string_view& msg) noexcept;
25 | void message_error_fatal(const std::string_view& msg) noexcept;
26 | void message_warning(const std::string_view& msg) noexcept;
27 | void message_information(const std::string_view& msg) noexcept;
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/names.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | inline std::string space_name(const int dimension)
25 | {
26 | return std::to_string(dimension) + "-space";
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/com/print.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | // #include "print.h"
19 | //
20 | // #if !defined(__clang__)
21 | // #include
22 | // #include
23 | //
24 | // namespace ns
25 | // {
26 | // std::string to_string(const __float128 value)
27 | // {
28 | // constexpr const char* QUAD_MATH_FORMAT = "%.36Qe"; // "%+-#*.36Qe"
29 | //
30 | // std::array buf;
31 | // quadmath_snprintf(buf.data(), buf.size(), QUAD_MATH_FORMAT, value);
32 | // return buf.data();
33 | // }
34 | // }
35 | // #endif
36 |
--------------------------------------------------------------------------------
/src/com/progression.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | template
25 | T geometric_progression_sum(const T& ratio, const T& n)
26 | {
27 | return (std::pow(ratio, n) - 1) / (ratio - 1);
28 | }
29 |
30 | template
31 | T geometric_progression_n(const T& ratio, const T& sum)
32 | {
33 | return std::log(sum * (ratio - 1) + 1) / std::log(ratio);
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/com/random/create.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "device.h"
21 |
22 | #include
23 | #include
24 | #include
25 | #include
26 |
27 | namespace ns
28 | {
29 | template
30 | T create_engine()
31 | {
32 | std::array data;
33 | read_system_random(std::as_writable_bytes(std::span(data)));
34 | std::seed_seq seed_seq(data.cbegin(), data.cend());
35 | return T(seed_seq);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/com/random/device.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns
24 | {
25 | void read_system_random(std::span bytes);
26 | }
27 |
--------------------------------------------------------------------------------
/src/com/random/uniform.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns
23 | {
24 | template
25 | [[nodiscard]] T uniform_distribution(RandomEngine& engine, std::uniform_real_distribution& urd)
26 | {
27 | // std::uniform_real_distribution may return b()
28 | T res;
29 | do
30 | {
31 | res = urd(engine);
32 | } while (!(res < urd.b()));
33 | return res;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/com/type/number.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "limit.h"
21 |
22 | #include
23 |
24 | namespace ns
25 | {
26 | template
27 | inline constexpr T PREVIOUS_BEFORE_ONE = []
28 | {
29 | static_assert(std::is_floating_point_v);
30 | static_assert(Limits::radix() == 2);
31 |
32 | T prev_e = 1;
33 | T e = 1;
34 | do
35 | {
36 | prev_e = e;
37 | e /= 2;
38 | } while (1 - e != 1);
39 | return 1 - prev_e;
40 | }();
41 | }
42 |
--------------------------------------------------------------------------------
/src/com/variant.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns
21 | {
22 | template
23 | struct Visitors final : T...
24 | {
25 | using T::operator()...;
26 | };
27 |
28 | template
29 | Visitors(T...) -> Visitors;
30 | }
31 |
--------------------------------------------------------------------------------
/src/dft/cufft.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #if defined(CUDA_FOUND)
21 |
22 | #include "dft.h"
23 |
24 | #include
25 |
26 | namespace ns::dft
27 | {
28 | std::unique_ptr create_cufft(int x, int y);
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/dft/dft.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::dft
24 | {
25 | class DFT
26 | {
27 | public:
28 | virtual ~DFT() = default;
29 |
30 | virtual void exec(bool inverse, std::vector>* data) = 0;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/dft/fftw.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #if defined(FFTW_FOUND)
21 |
22 | #include "dft.h"
23 |
24 | #include
25 |
26 | namespace ns::dft
27 | {
28 | std::unique_ptr create_fftw(int x, int y);
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/filter/analysis/allan_deviation.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::filter::analysis
24 | {
25 | template
26 | struct AllanDeviation final
27 | {
28 | T tau;
29 | T deviation;
30 | };
31 |
32 | template
33 | [[nodiscard]] std::vector> allan_deviation(
34 | const std::vector& data,
35 | T frequency,
36 | std::size_t output_count);
37 | }
38 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/constant.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::attitude::kalman
21 | {
22 | template
23 | inline constexpr T W_THRESHOLD{1e-5}; // rad/s
24 |
25 | template
26 | inline constexpr T MIN_SIN_Z_MAG{0.1};
27 |
28 | inline constexpr unsigned INIT_COUNT{10};
29 | }
30 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/ekf_utility.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "quaternion.h"
21 |
22 | #include
23 |
24 | #include
25 |
26 | namespace ns::filter::attitude::kalman
27 | {
28 | template
29 | [[nodiscard]] Quaternion ekf_delta_quaternion(const numerical::Vector<3, T>& v)
30 | {
31 | const T n2 = v.norm_squared();
32 | if (n2 <= 1)
33 | {
34 | return Quaternion(std::sqrt(1 - n2), v);
35 | }
36 | return Quaternion(1, v) / std::sqrt(1 + n2);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/init_utility.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "quaternion.h"
21 |
22 | #include
23 |
24 | namespace ns::filter::attitude::kalman
25 | {
26 | template
27 | [[nodiscard]] Quaternion initial_quaternion(const numerical::Vector<3, T>& acc);
28 |
29 | template
30 | [[nodiscard]] Quaternion initial_quaternion(const numerical::Vector<3, T>& acc, const numerical::Vector<3, T>& mag);
31 | }
32 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/quaternion.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::filter::attitude::kalman
23 | {
24 | template
25 | using Quaternion = numerical::QuaternionHJ;
26 | }
27 |
--------------------------------------------------------------------------------
/src/filter/attitude/kalman/ukf_utility.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "quaternion.h"
21 |
22 | #include
23 |
24 | namespace ns::filter::attitude::kalman
25 | {
26 | template
27 | [[nodiscard]] Quaternion error_to_quaternion(const numerical::Vector<3, T>& error, const Quaternion& center);
28 |
29 | template
30 | [[nodiscard]] numerical::Vector<3, T> quaternion_to_error(const Quaternion& q, const Quaternion& center_inversed);
31 | }
32 |
--------------------------------------------------------------------------------
/src/filter/core/test/distribution.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::filter::core::test
24 | {
25 | template
26 | class Distribution final
27 | {
28 | std::unordered_map distribution_;
29 |
30 | public:
31 | void add(T difference, T stddev);
32 |
33 | void check(const std::vector& expected_distribution) const;
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/src/filter/core/test/filters/filter_info.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "filter.h"
21 | #include "noise_model.h"
22 |
23 | #include
24 | #include
25 |
26 | namespace ns::filter::core::test::filters
27 | {
28 | template
29 | [[nodiscard]] std::unique_ptr> create_info(
30 | T init_v,
31 | T init_v_variance,
32 | const NoiseModel& noise_model,
33 | T fading_memory_alpha,
34 | T reset_dt,
35 | std::optional gate);
36 | }
37 |
--------------------------------------------------------------------------------
/src/filter/core/test/filters/noise_model.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::filter::core::test::filters
23 | {
24 | template
25 | struct ContinuousNoiseModel final
26 | {
27 | T spectral_density;
28 | };
29 |
30 | template
31 | struct DiscreteNoiseModel final
32 | {
33 | T variance;
34 | };
35 |
36 | template
37 | using NoiseModel = std::variant, DiscreteNoiseModel>;
38 | }
39 |
--------------------------------------------------------------------------------
/src/filter/core/test/measurements.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::filter::core::test
23 | {
24 | template
25 | struct Measurement final
26 | {
27 | T value;
28 | T variance;
29 | };
30 |
31 | template
32 | struct Measurements final
33 | {
34 | T time;
35 | T true_x;
36 | T true_v;
37 | std::optional> x;
38 | std::optional> v;
39 | };
40 | }
41 |
--------------------------------------------------------------------------------
/src/filter/core/test/simulator/acceleration.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::filter::core::test::simulator
25 | {
26 | template
27 | std::vector> simulate_acceleration(
28 | T length,
29 | T init_x,
30 | T dt,
31 | T process_acceleration,
32 | T process_velocity_variance,
33 | T measurement_variance_x,
34 | T measurement_variance_v);
35 | }
36 |
--------------------------------------------------------------------------------
/src/filter/core/test/simulator/speed.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::filter::core::test::simulator
25 | {
26 | template
27 | std::vector> simulate_speed(
28 | T length,
29 | T init_x,
30 | T dt,
31 | T process_velocity_mean,
32 | T process_velocity_variance,
33 | T measurement_variance_x,
34 | T measurement_variance_v);
35 | }
36 |
--------------------------------------------------------------------------------
/src/filter/filters/acceleration/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::acceleration
21 | {
22 | template
23 | struct Init final
24 | {
25 | T angle;
26 | T angle_variance;
27 | T acceleration;
28 | T acceleration_variance;
29 | T angle_speed;
30 | T angle_speed_variance;
31 | T angle_r;
32 | T angle_r_variance;
33 | };
34 | }
35 |
--------------------------------------------------------------------------------
/src/filter/filters/direction/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::direction
21 | {
22 | template
23 | struct Init final
24 | {
25 | T angle;
26 | T angle_variance;
27 | T acceleration;
28 | T acceleration_variance;
29 | T angle_speed;
30 | T angle_speed_variance;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/filter/filters/noise_model.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::filter::filters
23 | {
24 | template
25 | struct ContinuousNoiseModel final
26 | {
27 | T spectral_density;
28 | };
29 |
30 | template
31 | struct DiscreteNoiseModel final
32 | {
33 | T variance;
34 | };
35 |
36 | template
37 | using NoiseModel = std::variant, DiscreteNoiseModel>;
38 | }
39 |
--------------------------------------------------------------------------------
/src/filter/filters/position/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::position
21 | {
22 | template
23 | struct Init final
24 | {
25 | T speed;
26 | T speed_variance;
27 | T acceleration;
28 | T acceleration_variance;
29 | };
30 | }
31 |
--------------------------------------------------------------------------------
/src/filter/filters/speed/init.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::filter::filters::speed
21 | {
22 | template
23 | struct Init final
24 | {
25 | T acceleration;
26 | T acceleration_variance;
27 | };
28 | }
29 |
--------------------------------------------------------------------------------
/src/filter/test/simulator/annotation.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include "config.h"
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace ns::filter::test::simulator
27 | {
28 | template
29 | std::string make_annotation(const Config& config, const std::vector>& measurements);
30 | }
31 |
--------------------------------------------------------------------------------
/src/filter/test/smooth.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "view/write.h"
21 |
22 | #include
23 |
24 | #include
25 | #include
26 |
27 | namespace ns::filter::test
28 | {
29 | template
30 | void smooth(
31 | const filters::FilterPosition<2, T, ORDER>& filter,
32 | const std::vector>& details,
33 | view::Filter<2, T>* data);
34 | }
35 |
--------------------------------------------------------------------------------
/src/filter/test/view/time_point.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::filter::test::view
25 | {
26 | template
27 | struct TimePoint final
28 | {
29 | T time;
30 | numerical::Vector point;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/filter/utility/low_pass.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::filter::utility
24 | {
25 | template
26 | class LowPassFilter final
27 | {
28 | std::deque values_;
29 |
30 | public:
31 | void clear();
32 |
33 | void push(T value);
34 |
35 | [[nodiscard]] std::optional value() const;
36 | };
37 | }
38 |
--------------------------------------------------------------------------------
/src/geometry/graph/mst.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | #include
24 | #include
25 | #include
26 |
27 | namespace ns::geometry::graph
28 | {
29 | template
30 | std::vector> minimum_spanning_tree(
31 | const std::vector>& points,
32 | const std::vector>& delaunay_objects,
33 | progress::Ratio* progress);
34 | }
35 |
--------------------------------------------------------------------------------
/src/geometry/reconstruction/extract_manifold.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::geometry::reconstruction
26 | {
27 | template
28 | std::vector extract_manifold(
29 | const std::vector>& delaunay_objects,
30 | const std::vector>& delaunay_facets,
31 | const std::vector& cocone_facets);
32 | }
33 |
--------------------------------------------------------------------------------
/src/geometry/shapes/sphere_create.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 | #include
25 |
26 | namespace ns::geometry::shapes
27 | {
28 | template
29 | void create_sphere(
30 | unsigned min_facet_count,
31 | std::vector>* vertices,
32 | std::vector>* facets);
33 | }
34 |
--------------------------------------------------------------------------------
/src/geometry/shapes/test/compare.cpp:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #include "compare.h"
19 |
20 | namespace ns::geometry::shapes::test
21 | {
22 | static_assert(compare(1, 1.1, 1.1));
23 | static_assert(compare(1000, 10000.100000001, 10000.100000002));
24 | static_assert(!compare(1, 10000.100000001, 10000.100000002));
25 | static_assert(!compare(1, 10000.100000002, 10000.100000001));
26 | }
27 |
--------------------------------------------------------------------------------
/src/geometry/spatial/intersection/average.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::geometry::spatial::intersection
23 | {
24 | template
25 | auto average(const F& f)
26 | {
27 | using T = std::remove_cvref_t;
28 | static_assert(std::is_floating_point_v);
29 | static_assert(COUNT > 0);
30 |
31 | T sum = 0;
32 | for (int i = 0; i < COUNT; ++i)
33 | {
34 | sum += f();
35 | }
36 | return sum / COUNT;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/barrier.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gpu::convex_hull
23 | {
24 | void buffer_barrier(
25 | VkCommandBuffer command_buffer,
26 | VkBuffer buffer,
27 | VkAccessFlags dst_access_mask,
28 | VkPipelineStageFlags dst_stage_mask);
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::convex_hull
24 | {
25 | std::vector code_prepare_comp();
26 | std::vector code_merge_comp();
27 | std::vector code_filter_comp();
28 | std::vector code_view_frag();
29 | std::vector code_view_vert();
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/convex_hull_view.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "view_in.glsl"
22 |
23 | layout(location = 0) out vec4 color;
24 |
25 | void main()
26 | {
27 | color = vec4(brightness.xxx, 1);
28 | }
29 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/convex_hull_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "view_in.glsl"
22 |
23 | void main()
24 | {
25 | gl_Position = matrix * vec4(points[gl_VertexIndex].xy, 0, 1);
26 | }
27 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/code/view_in.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef VIEW_IN_GLSL
19 | #define VIEW_IN_GLSL
20 |
21 | layout(std140, binding = 0) restrict uniform Data
22 | {
23 | mat4 matrix;
24 | float brightness;
25 | };
26 |
27 | layout(std430, binding = 1) readonly restrict buffer Points
28 | {
29 | ivec2 points[];
30 | };
31 |
32 | #endif
33 |
--------------------------------------------------------------------------------
/src/gpu/convex_hull/size.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gpu::convex_hull
21 | {
22 | int points_buffer_size(int height);
23 |
24 | int group_size_prepare(
25 | int width,
26 | unsigned max_group_size_x,
27 | unsigned max_group_invocations,
28 | unsigned max_shared_memory_size);
29 |
30 | int group_size_merge(
31 | int height,
32 | unsigned max_group_size_x,
33 | unsigned max_group_invocations,
34 | unsigned max_shared_memory_size);
35 |
36 | int iteration_count_merge(unsigned size);
37 | }
38 |
--------------------------------------------------------------------------------
/src/gpu/dft/barriers.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gpu::dft
23 | {
24 | void buffer_barrier(VkCommandBuffer command_buffer, VkBuffer buffer);
25 | void image_barrier_before(VkCommandBuffer command_buffer, VkImage image);
26 | void image_barrier_after(VkCommandBuffer command_buffer, VkImage image);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/dft/code/dft_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) in vec4 vertex_position;
21 | layout(location = 1) in vec2 texture_coordinates;
22 |
23 | layout(location = 0) out VS
24 | {
25 | vec2 texture_coordinates;
26 | }
27 | vs;
28 |
29 | void main()
30 | {
31 | gl_Position = vertex_position;
32 | vs.texture_coordinates = texture_coordinates;
33 | }
34 |
--------------------------------------------------------------------------------
/src/gpu/dft/code/math.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef MATH_GLSL
19 | #define MATH_GLSL
20 |
21 | const float PI = 3.1415926535897932384626433832795028841971693993751;
22 |
23 | uint bit_reverse(const uint value, const uint bit_width)
24 | {
25 | return bitfieldReverse(value) >> (32 - bit_width);
26 | }
27 |
28 | vec2 complex_mul(const vec2 a, const vec2 b)
29 | {
30 | const float x = a.x * b.x - a.y * b.y;
31 | const float y = a.x * b.y + a.y * b.x;
32 | return vec2(x, y);
33 | }
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/src/gpu/dft/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::dft
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/code/optical_flow_view.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) out vec4 color;
21 |
22 | void main()
23 | {
24 | color = vec4(1);
25 | }
26 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/code/optical_flow_view_debug.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(binding = 0) uniform sampler2D tex;
21 |
22 | // layout(location = 0) in VS
23 | // {
24 | // vec2 texture_coordinates;
25 | // }
26 | // vs;
27 |
28 | layout(location = 0) out vec4 color;
29 |
30 | void main()
31 | {
32 | // const float c = texture(tex, vs.texture_coordinates).x;
33 | const float c = texelFetch(tex, ivec2(gl_FragCoord.xy), 0).x;
34 |
35 | // c += 0.5;
36 |
37 | color = vec4(c, c, c, 1);
38 | }
39 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/function.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::optical_flow
24 | {
25 | std::vector> pyramid_sizes(int width, int height, int min_size);
26 |
27 | struct TopLevelPoints final
28 | {
29 | int count_x;
30 | int count_y;
31 | std::vector> points;
32 | };
33 |
34 | TopLevelPoints create_top_level_points(int width, int height, double distance_between_points_in_mm, double ppi);
35 | }
36 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/option.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::optical_flow
25 | {
26 | inline constexpr std::array GROUP_SIZE{16, 16};
27 |
28 | inline constexpr int BOTTOM_IMAGE_MINIMUM_SIZE = 16;
29 |
30 | inline constexpr int RADIUS = 6;
31 | inline constexpr int MAX_ITERATION_COUNT = 10;
32 | inline constexpr float STOP_MOVE_SQUARE = square(1e-3f);
33 | inline constexpr float MIN_DETERMINANT = 1;
34 |
35 | inline constexpr double DISTANCE_BETWEEN_POINTS_IN_MM = 2;
36 | }
37 |
--------------------------------------------------------------------------------
/src/gpu/optical_flow/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::optical_flow
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::pencil_sketch
24 | {
25 | std::vector code_compute_comp();
26 | std::vector code_view_vert();
27 | std::vector code_view_frag();
28 | }
29 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/code/pencil_sketch_view.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(binding = 0) uniform sampler2D tex;
21 |
22 | layout(location = 0) in VS
23 | {
24 | vec2 texture_coordinates;
25 | }
26 | vs;
27 |
28 | layout(location = 0) out vec4 color;
29 |
30 | void main()
31 | {
32 | const float s = texture(tex, vs.texture_coordinates).r;
33 | color = vec4(vec3(s), 1);
34 | }
35 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/code/pencil_sketch_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) in vec4 position;
21 | layout(location = 1) in vec2 texture_coordinates;
22 |
23 | layout(location = 0) out VS
24 | {
25 | vec2 texture_coordinates;
26 | }
27 | vs;
28 |
29 | void main()
30 | {
31 | gl_Position = position;
32 | vs.texture_coordinates = texture_coordinates;
33 | }
34 |
--------------------------------------------------------------------------------
/src/gpu/pencil_sketch/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::pencil_sketch
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/constant.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef CONSTANT_GLSL
19 | #define CONSTANT_GLSL
20 |
21 | const float FLOAT_EPSILON = 1.0 / (1 << 23);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/point_offset.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef POINT_OFFSET_GLSL
19 | #define POINT_OFFSET_GLSL
20 |
21 | #include "constant.glsl"
22 |
23 | const float POINT_OFFSET = 64 * FLOAT_EPSILON;
24 |
25 | vec3 offset_ray_org(const vec3 geometric_normal, const vec3 ray_org, const vec3 ray_dir)
26 | {
27 | const float ray_offset = dot(geometric_normal, ray_dir) < 0 ? -POINT_OFFSET : POINT_OFFSET;
28 | return ray_org + ray_offset * geometric_normal * abs(ray_org);
29 | }
30 |
31 | #endif
32 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_normals.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "mesh_out.glsl"
22 |
23 | layout(location = 0) in GS
24 | {
25 | vec3 color;
26 | }
27 | gs;
28 |
29 | void main()
30 | {
31 | set_fragment_color(gs.color);
32 | }
33 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_normals.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | layout(location = 0) in vec3 position;
21 | layout(location = 1) in vec3 normal;
22 |
23 | layout(location = 0) out VS
24 | {
25 | vec3 position;
26 | vec3 normal;
27 | }
28 | vs;
29 |
30 | void main()
31 | {
32 | vs.position = position;
33 | vs.normal = normal;
34 | }
35 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_triangle_lines.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "mesh_in.glsl"
22 | #include "mesh_out.glsl"
23 |
24 | void main()
25 | {
26 | set_fragment_color(drawing.clip_plane_color);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_mesh_triangle_lines.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "mesh_in.glsl"
22 |
23 | layout(location = 0) in vec3 position;
24 |
25 | layout(location = 0) out VS
26 | {
27 | vec4 world_position;
28 | }
29 | vs;
30 |
31 | void main()
32 | {
33 | vs.world_position = mesh.model_matrix * vec4(position, 1);
34 | }
35 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | const vec4 vertices[3] = {vec4(-1, -1, 0, 1), vec4(3, -1, 0, 1), vec4(-1, 3, 0, 1)};
21 |
22 | out gl_PerVertex
23 | {
24 | vec4 gl_Position;
25 | };
26 |
27 | void main()
28 | {
29 | gl_Position = vertices[gl_VertexIndex];
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 |
22 | #extension GL_GOOGLE_include_directive : enable
23 | #include "volume.glsl"
24 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image_opacity.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 | #define OPACITY
22 |
23 | #extension GL_GOOGLE_include_directive : enable
24 | #include "volume.glsl"
25 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image_opacity_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 | #define OPACITY
22 | #define TRANSPARENCY
23 |
24 | #extension GL_GOOGLE_include_directive : enable
25 | #include "volume.glsl"
26 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_image_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define IMAGE
21 | #define TRANSPARENCY
22 |
23 | #extension GL_GOOGLE_include_directive : enable
24 | #include "volume.glsl"
25 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_opacity.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define OPACITY
21 |
22 | #extension GL_GOOGLE_include_directive : enable
23 | #include "volume.glsl"
24 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_opacity_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define OPACITY
21 | #define TRANSPARENCY
22 |
23 | #extension GL_GOOGLE_include_directive : enable
24 | #include "volume.glsl"
25 |
--------------------------------------------------------------------------------
/src/gpu/renderer/code/renderer_volume_transparency.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #define TRANSPARENCY
21 |
22 | #extension GL_GOOGLE_include_directive : enable
23 | #include "volume.glsl"
24 |
--------------------------------------------------------------------------------
/src/gpu/renderer/functionality.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::renderer
24 | {
25 | vulkan::physical_device::DeviceFunctionality device_ray_tracing_functionality();
26 | vulkan::physical_device::DeviceFunctionality device_functionality();
27 |
28 | bool ray_tracing_supported(const vulkan::Device& device);
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/renderer/mesh/meshes.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "object.h"
21 |
22 | #include
23 |
24 | namespace ns::gpu::renderer
25 | {
26 | void find_opaque_and_transparent_meshes(
27 | const std::vector& meshes,
28 | std::vector* opaque_meshes,
29 | std::vector* transparent_meshes);
30 | }
31 |
--------------------------------------------------------------------------------
/src/gpu/renderer/mesh/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | #include
24 |
25 | namespace ns::gpu::renderer
26 | {
27 | vulkan::handle::Sampler create_mesh_texture_sampler(const vulkan::Device& device, bool anisotropy);
28 | vulkan::handle::Sampler create_mesh_shadow_sampler(VkDevice device);
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::renderer::test
24 | {
25 | std::vector code_ray_closest_hit_rchit();
26 | std::vector code_ray_generation_rgen();
27 | std::vector code_ray_miss_rmiss();
28 | std::vector code_ray_query_comp();
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/code/renderer_ray_closest_hit.rchit:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_EXT_ray_tracing : require
21 |
22 | layout(location = 0) rayPayloadInEXT vec3 hit_value;
23 | hitAttributeEXT vec2 hit_attribute;
24 |
25 | void main()
26 | {
27 | hit_value = vec3(hit_attribute.x, hit_attribute.y, 1 - hit_attribute.x - hit_attribute.y);
28 | }
29 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/code/renderer_ray_miss.rmiss:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_EXT_ray_tracing : require
21 |
22 | layout(location = 0) rayPayloadInEXT vec3 hit_value;
23 |
24 | void main()
25 | {
26 | hit_value = vec3(0.1, 0.1, 0.1);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/renderer/test/ray_tracing/test_ray_tracing.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::renderer::test
24 | {
25 | void test_ray_tracing(const vulkan::Device& device, const vulkan::Queue& compute_queue);
26 | }
27 |
--------------------------------------------------------------------------------
/src/gpu/renderer/volume/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::renderer
25 | {
26 | vulkan::handle::Sampler create_volume_image_sampler(VkDevice device);
27 | vulkan::handle::Sampler create_volume_depth_image_sampler(VkDevice device);
28 | vulkan::handle::Sampler create_volume_transfer_function_sampler(VkDevice device);
29 | }
30 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/code/code.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gpu::text_writer
24 | {
25 | std::vector code_view_vert();
26 | std::vector code_view_frag();
27 | }
28 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/code/text_writer_view.frag:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "view_in.glsl"
22 |
23 | layout(location = 0) in VS
24 | {
25 | vec2 texture_coordinates;
26 | }
27 | vs;
28 |
29 | layout(location = 0) out vec4 color;
30 |
31 | void main()
32 | {
33 | color = vec4(data.color, texture(tex, vs.texture_coordinates).r);
34 | }
35 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/code/text_writer_view.vert:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #version 460
19 |
20 | #extension GL_GOOGLE_include_directive : enable
21 | #include "view_in.glsl"
22 |
23 | layout(location = 0) in ivec2 window_coordinates;
24 | layout(location = 1) in vec2 texture_coordinates;
25 |
26 | layout(location = 0) out VS
27 | {
28 | vec2 texture_coordinates;
29 | }
30 | vs;
31 |
32 | void main()
33 | {
34 | gl_Position = data.matrix * vec4(window_coordinates, 0, 1);
35 | vs.texture_coordinates = texture_coordinates;
36 | }
37 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/code/view_in.glsl:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #ifndef VIEW_IN_GLSL
19 | #define VIEW_IN_GLSL
20 |
21 | layout(std140, binding = 0) restrict uniform Data
22 | {
23 | mat4 matrix;
24 | vec3 color;
25 | }
26 | data;
27 |
28 | layout(binding = 1) uniform sampler2D tex;
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/src/gpu/text_writer/sampler.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gpu::text_writer
25 | {
26 | vulkan::handle::Sampler create_sampler(VkDevice device);
27 | }
28 |
--------------------------------------------------------------------------------
/src/gui/application.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui
21 | {
22 | int run_application(int argc, char** argv);
23 | }
24 |
--------------------------------------------------------------------------------
/src/gui/com/application_message.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui::com
21 | {
22 | struct ApplicationMessage final
23 | {
24 | ApplicationMessage();
25 | ~ApplicationMessage();
26 |
27 | ApplicationMessage(const ApplicationMessage&) = delete;
28 | ApplicationMessage& operator=(const ApplicationMessage&) = delete;
29 | ApplicationMessage(ApplicationMessage&&) = delete;
30 | ApplicationMessage& operator=(ApplicationMessage&&) = delete;
31 | };
32 | }
33 |
--------------------------------------------------------------------------------
/src/gui/com/command_line.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gui::com
24 | {
25 | std::string command_line_description();
26 |
27 | struct CommandLineOptions final
28 | {
29 | std::filesystem::path file_name;
30 | bool no_object_selection_dialog;
31 | };
32 |
33 | CommandLineOptions command_line_options();
34 | }
35 |
--------------------------------------------------------------------------------
/src/gui/com/thread_queue.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 |
24 | namespace ns::gui::com
25 | {
26 | class ThreadQueue final : public QObject
27 | {
28 | Q_OBJECT
29 |
30 | public:
31 | ThreadQueue();
32 |
33 | void push(const std::function& f) const;
34 |
35 | Q_SIGNALS:
36 | void signal(const std::function&) const;
37 | };
38 | }
39 |
--------------------------------------------------------------------------------
/src/gui/dialogs/application_about.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui::dialogs
21 | {
22 | void application_about(bool ray_tracing);
23 | }
24 |
--------------------------------------------------------------------------------
/src/gui/dialogs/application_help.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | namespace ns::gui::dialogs
21 | {
22 | void application_help();
23 | }
24 |
--------------------------------------------------------------------------------
/src/gui/dialogs/color_dialog.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include
23 | #include
24 |
25 | namespace ns::gui::dialogs
26 | {
27 | void color_dialog(const std::string& title, const QColor& current_color, const std::function& f);
28 | }
29 |
--------------------------------------------------------------------------------
/src/gui/dialogs/message.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 |
23 | namespace ns::gui::dialogs
24 | {
25 | void message_critical(const std::string& message, bool with_parent = true);
26 | void message_information(const std::string& message);
27 | void message_warning(const std::string& message);
28 | [[nodiscard]] std::optional message_question_default_yes(const std::string& message);
29 | [[nodiscard]] std::optional message_question_default_no(const std::string& message);
30 | }
31 |
--------------------------------------------------------------------------------
/src/gui/main_window/actions_repository.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 | #include
22 | #include
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace ns::gui::main_window
29 | {
30 | void create_repository_menu(
31 | unsigned thread_id,
32 | std::vector* connections,
33 | com::WorkerThreads* threads,
34 | QMenu* menu_create,
35 | const storage::Repository* repository);
36 | }
37 |
--------------------------------------------------------------------------------
/src/gui/main_window/model_tree_actions.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gui::main_window
23 | {
24 | class ModelTreeActions
25 | {
26 | protected:
27 | ~ModelTreeActions() = default;
28 |
29 | public:
30 | virtual void show(model::ObjectId id, bool show) = 0;
31 | virtual void show_only_it(model::ObjectId id) = 0;
32 | virtual void erase(model::ObjectId id) = 0;
33 | virtual void clear() = 0;
34 | };
35 | }
36 |
--------------------------------------------------------------------------------
/src/gui/main_window/model_tree_menu.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include "model_tree_actions.h"
21 |
22 | #include
23 |
24 | #include
25 |
26 | #include
27 |
28 | namespace ns::gui::main_window
29 | {
30 | std::unique_ptr make_model_tree_menu_for_object(ModelTreeActions* actions, model::ObjectId id, bool visible);
31 | }
32 |
--------------------------------------------------------------------------------
/src/gui/main_window/model_tree_style.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | namespace ns::gui::main_window
23 | {
24 | void set_model_tree_item_style(QTreeWidgetItem* item, bool visible);
25 | void set_model_tree_item_style_deleted(QTreeWidgetItem* item);
26 | }
27 |
--------------------------------------------------------------------------------
/src/gui/painter_window/initial_image.h:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright (C) 2017-2025 Topological Manifold
3 |
4 | This program is free software: you can redistribute it and/or modify
5 | it under the terms of the GNU General Public License as published by
6 | the Free Software Foundation, either version 3 of the License, or
7 | (at your option) any later version.
8 |
9 | This program is distributed in the hope that it will be useful,
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | GNU General Public License for more details.
13 |
14 | You should have received a copy of the GNU General Public License
15 | along with this program. If not, see .
16 | */
17 |
18 | #pragma once
19 |
20 | #include
21 |
22 | #include