├── .gitattributes
├── .gitignore
├── LICENSE.md
├── OSPGL.sln
├── OSPGL
├── OSPGL.vcxproj
├── OSPGL.vcxproj.filters
├── dep
│ ├── glad
│ │ ├── KHR.h
│ │ ├── glad.c
│ │ └── glad.h
│ ├── glm
│ │ ├── INSTALL.vcxproj
│ │ ├── INSTALL.vcxproj.filters
│ │ ├── common.hpp
│ │ ├── detail
│ │ │ ├── _features.hpp
│ │ │ ├── _fixes.hpp
│ │ │ ├── _noise.hpp
│ │ │ ├── _swizzle.hpp
│ │ │ ├── _swizzle_func.hpp
│ │ │ ├── _vectorize.hpp
│ │ │ ├── func_common.hpp
│ │ │ ├── func_common.inl
│ │ │ ├── func_common_simd.inl
│ │ │ ├── func_exponential.hpp
│ │ │ ├── func_exponential.inl
│ │ │ ├── func_exponential_simd.inl
│ │ │ ├── func_geometric.hpp
│ │ │ ├── func_geometric.inl
│ │ │ ├── func_geometric_simd.inl
│ │ │ ├── func_integer.hpp
│ │ │ ├── func_integer.inl
│ │ │ ├── func_integer_simd.inl
│ │ │ ├── func_matrix.hpp
│ │ │ ├── func_matrix.inl
│ │ │ ├── func_matrix_simd.inl
│ │ │ ├── func_packing.hpp
│ │ │ ├── func_packing.inl
│ │ │ ├── func_packing_simd.inl
│ │ │ ├── func_trigonometric.hpp
│ │ │ ├── func_trigonometric.inl
│ │ │ ├── func_trigonometric_simd.inl
│ │ │ ├── func_vector_relational.hpp
│ │ │ ├── func_vector_relational.inl
│ │ │ ├── func_vector_relational_simd.inl
│ │ │ ├── glm.cpp
│ │ │ ├── precision.hpp
│ │ │ ├── setup.hpp
│ │ │ ├── type_float.hpp
│ │ │ ├── type_gentype.hpp
│ │ │ ├── type_gentype.inl
│ │ │ ├── type_half.hpp
│ │ │ ├── type_half.inl
│ │ │ ├── type_int.hpp
│ │ │ ├── type_mat.hpp
│ │ │ ├── type_mat.inl
│ │ │ ├── type_mat2x2.hpp
│ │ │ ├── type_mat2x2.inl
│ │ │ ├── type_mat2x3.hpp
│ │ │ ├── type_mat2x3.inl
│ │ │ ├── type_mat2x4.hpp
│ │ │ ├── type_mat2x4.inl
│ │ │ ├── type_mat3x2.hpp
│ │ │ ├── type_mat3x2.inl
│ │ │ ├── type_mat3x3.hpp
│ │ │ ├── type_mat3x3.inl
│ │ │ ├── type_mat3x4.hpp
│ │ │ ├── type_mat3x4.inl
│ │ │ ├── type_mat4x2.hpp
│ │ │ ├── type_mat4x2.inl
│ │ │ ├── type_mat4x3.hpp
│ │ │ ├── type_mat4x3.inl
│ │ │ ├── type_mat4x4.hpp
│ │ │ ├── type_mat4x4.inl
│ │ │ ├── type_mat4x4_simd.inl
│ │ │ ├── type_vec.hpp
│ │ │ ├── type_vec.inl
│ │ │ ├── type_vec1.hpp
│ │ │ ├── type_vec1.inl
│ │ │ ├── type_vec2.hpp
│ │ │ ├── type_vec2.inl
│ │ │ ├── type_vec3.hpp
│ │ │ ├── type_vec3.inl
│ │ │ ├── type_vec4.hpp
│ │ │ ├── type_vec4.inl
│ │ │ └── type_vec4_simd.inl
│ │ ├── exponential.hpp
│ │ ├── ext.hpp
│ │ ├── fwd.hpp
│ │ ├── geometric.hpp
│ │ ├── glm.hpp
│ │ ├── glm_dummy.vcxproj
│ │ ├── glm_dummy.vcxproj.filters
│ │ ├── gtc
│ │ │ ├── bitfield.hpp
│ │ │ ├── bitfield.inl
│ │ │ ├── color_encoding.inl
│ │ │ ├── color_space.hpp
│ │ │ ├── color_space.inl
│ │ │ ├── constants.hpp
│ │ │ ├── constants.inl
│ │ │ ├── epsilon.hpp
│ │ │ ├── epsilon.inl
│ │ │ ├── functions.hpp
│ │ │ ├── functions.inl
│ │ │ ├── integer.hpp
│ │ │ ├── integer.inl
│ │ │ ├── matrix_access.hpp
│ │ │ ├── matrix_access.inl
│ │ │ ├── matrix_integer.hpp
│ │ │ ├── matrix_inverse.hpp
│ │ │ ├── matrix_inverse.inl
│ │ │ ├── matrix_transform.hpp
│ │ │ ├── matrix_transform.inl
│ │ │ ├── noise.hpp
│ │ │ ├── noise.inl
│ │ │ ├── packing.hpp
│ │ │ ├── packing.inl
│ │ │ ├── quaternion.hpp
│ │ │ ├── quaternion.inl
│ │ │ ├── quaternion_simd.inl
│ │ │ ├── random.hpp
│ │ │ ├── random.inl
│ │ │ ├── reciprocal.hpp
│ │ │ ├── reciprocal.inl
│ │ │ ├── round.hpp
│ │ │ ├── round.inl
│ │ │ ├── type_aligned.hpp
│ │ │ ├── type_precision.hpp
│ │ │ ├── type_precision.inl
│ │ │ ├── type_ptr.hpp
│ │ │ ├── type_ptr.inl
│ │ │ ├── ulp.hpp
│ │ │ ├── ulp.inl
│ │ │ ├── vec1.hpp
│ │ │ └── vec1.inl
│ │ ├── gtx
│ │ │ ├── associated_min_max.hpp
│ │ │ ├── associated_min_max.inl
│ │ │ ├── bit.hpp
│ │ │ ├── bit.inl
│ │ │ ├── closest_point.hpp
│ │ │ ├── closest_point.inl
│ │ │ ├── color_space.hpp
│ │ │ ├── color_space.inl
│ │ │ ├── color_space_YCoCg.hpp
│ │ │ ├── color_space_YCoCg.inl
│ │ │ ├── common.hpp
│ │ │ ├── common.inl
│ │ │ ├── compatibility.hpp
│ │ │ ├── compatibility.inl
│ │ │ ├── component_wise.hpp
│ │ │ ├── component_wise.inl
│ │ │ ├── dual_quaternion.hpp
│ │ │ ├── dual_quaternion.inl
│ │ │ ├── euler_angles.hpp
│ │ │ ├── euler_angles.inl
│ │ │ ├── extend.hpp
│ │ │ ├── extend.inl
│ │ │ ├── extended_min_max.hpp
│ │ │ ├── extended_min_max.inl
│ │ │ ├── fast_exponential.hpp
│ │ │ ├── fast_exponential.inl
│ │ │ ├── fast_square_root.hpp
│ │ │ ├── fast_square_root.inl
│ │ │ ├── fast_trigonometry.hpp
│ │ │ ├── fast_trigonometry.inl
│ │ │ ├── float_notmalize.inl
│ │ │ ├── gradient_paint.hpp
│ │ │ ├── gradient_paint.inl
│ │ │ ├── handed_coordinate_space.hpp
│ │ │ ├── handed_coordinate_space.inl
│ │ │ ├── hash.hpp
│ │ │ ├── hash.inl
│ │ │ ├── integer.hpp
│ │ │ ├── integer.inl
│ │ │ ├── intersect.hpp
│ │ │ ├── intersect.inl
│ │ │ ├── io.hpp
│ │ │ ├── io.inl
│ │ │ ├── log_base.hpp
│ │ │ ├── log_base.inl
│ │ │ ├── matrix_cross_product.hpp
│ │ │ ├── matrix_cross_product.inl
│ │ │ ├── matrix_decompose.hpp
│ │ │ ├── matrix_decompose.inl
│ │ │ ├── matrix_interpolation.hpp
│ │ │ ├── matrix_interpolation.inl
│ │ │ ├── matrix_major_storage.hpp
│ │ │ ├── matrix_major_storage.inl
│ │ │ ├── matrix_operation.hpp
│ │ │ ├── matrix_operation.inl
│ │ │ ├── matrix_query.hpp
│ │ │ ├── matrix_query.inl
│ │ │ ├── matrix_transform_2d.hpp
│ │ │ ├── matrix_transform_2d.inl
│ │ │ ├── mixed_product.hpp
│ │ │ ├── mixed_product.inl
│ │ │ ├── norm.hpp
│ │ │ ├── norm.inl
│ │ │ ├── normal.hpp
│ │ │ ├── normal.inl
│ │ │ ├── normalize_dot.hpp
│ │ │ ├── normalize_dot.inl
│ │ │ ├── number_precision.hpp
│ │ │ ├── number_precision.inl
│ │ │ ├── optimum_pow.hpp
│ │ │ ├── optimum_pow.inl
│ │ │ ├── orthonormalize.hpp
│ │ │ ├── orthonormalize.inl
│ │ │ ├── perpendicular.hpp
│ │ │ ├── perpendicular.inl
│ │ │ ├── polar_coordinates.hpp
│ │ │ ├── polar_coordinates.inl
│ │ │ ├── projection.hpp
│ │ │ ├── projection.inl
│ │ │ ├── quaternion.hpp
│ │ │ ├── quaternion.inl
│ │ │ ├── range.hpp
│ │ │ ├── raw_data.hpp
│ │ │ ├── raw_data.inl
│ │ │ ├── rotate_normalized_axis.hpp
│ │ │ ├── rotate_normalized_axis.inl
│ │ │ ├── rotate_vector.hpp
│ │ │ ├── rotate_vector.inl
│ │ │ ├── scalar_multiplication.hpp
│ │ │ ├── scalar_relational.hpp
│ │ │ ├── scalar_relational.inl
│ │ │ ├── simd_mat4.hpp
│ │ │ ├── simd_mat4.inl
│ │ │ ├── simd_quat.hpp
│ │ │ ├── simd_quat.inl
│ │ │ ├── simd_vec4.hpp
│ │ │ ├── simd_vec4.inl
│ │ │ ├── spline.hpp
│ │ │ ├── spline.inl
│ │ │ ├── std_based_type.hpp
│ │ │ ├── std_based_type.inl
│ │ │ ├── string_cast.hpp
│ │ │ ├── string_cast.inl
│ │ │ ├── transform.hpp
│ │ │ ├── transform.inl
│ │ │ ├── transform2.hpp
│ │ │ ├── transform2.inl
│ │ │ ├── type_aligned.hpp
│ │ │ ├── type_aligned.inl
│ │ │ ├── type_trait.hpp
│ │ │ ├── type_trait.inl
│ │ │ ├── vector_angle.hpp
│ │ │ ├── vector_angle.inl
│ │ │ ├── vector_query.hpp
│ │ │ ├── vector_query.inl
│ │ │ ├── wrap.hpp
│ │ │ └── wrap.inl
│ │ ├── integer.hpp
│ │ ├── mat2x2.hpp
│ │ ├── mat2x3.hpp
│ │ ├── mat2x4.hpp
│ │ ├── mat3x2.hpp
│ │ ├── mat3x3.hpp
│ │ ├── mat3x4.hpp
│ │ ├── mat4x2.hpp
│ │ ├── mat4x3.hpp
│ │ ├── mat4x4.hpp
│ │ ├── matrix.hpp
│ │ ├── packing.hpp
│ │ ├── simd
│ │ │ ├── common.h
│ │ │ ├── exponential.h
│ │ │ ├── geometric.h
│ │ │ ├── integer.h
│ │ │ ├── matrix.h
│ │ │ ├── packing.h
│ │ │ ├── platform.h
│ │ │ ├── trigonometric.h
│ │ │ └── vector_relational.h
│ │ ├── trigonometric.hpp
│ │ ├── vec2.hpp
│ │ ├── vec3.hpp
│ │ ├── vec4.hpp
│ │ └── vector_relational.hpp
│ ├── imgui
│ │ ├── imconfig.h
│ │ ├── imgui.cpp
│ │ ├── imgui.h
│ │ ├── imgui_draw.cpp
│ │ ├── imgui_impl_glfw.cpp
│ │ ├── imgui_impl_glfw.h
│ │ ├── imgui_impl_opengl3.cpp
│ │ ├── imgui_impl_opengl3.h
│ │ ├── imgui_internal.h
│ │ ├── stb_rect_pack.h
│ │ ├── stb_textedit.h
│ │ └── stb_truetype.h
│ ├── imnodes
│ │ ├── imnodes.cpp
│ │ └── imnodes.h
│ ├── json.hpp
│ ├── rang.h
│ ├── spdlog
│ │ ├── async_logger.h
│ │ ├── common.h
│ │ ├── details
│ │ │ ├── async_log_helper.h
│ │ │ ├── async_logger_impl.h
│ │ │ ├── file_helper.h
│ │ │ ├── log_msg.h
│ │ │ ├── logger_impl.h
│ │ │ ├── mpmc_bounded_q.h
│ │ │ ├── null_mutex.h
│ │ │ ├── os.h
│ │ │ ├── pattern_formatter_impl.h
│ │ │ ├── registry.h
│ │ │ └── spdlog_impl.h
│ │ ├── fmt
│ │ │ ├── bundled
│ │ │ │ ├── format.cc
│ │ │ │ ├── format.h
│ │ │ │ ├── ostream.cc
│ │ │ │ ├── ostream.h
│ │ │ │ ├── posix.cc
│ │ │ │ ├── posix.h
│ │ │ │ └── time.h
│ │ │ ├── fmt.h
│ │ │ └── ostr.h
│ │ ├── formatter.h
│ │ ├── logger.h
│ │ ├── sinks
│ │ │ ├── android_sink.h
│ │ │ ├── ansicolor_sink.h
│ │ │ ├── base_sink.h
│ │ │ ├── dist_sink.h
│ │ │ ├── file_sinks.h
│ │ │ ├── msvc_sink.h
│ │ │ ├── null_sink.h
│ │ │ ├── ostream_sink.h
│ │ │ ├── sink.h
│ │ │ ├── stdout_sinks.h
│ │ │ ├── syslog_sink.h
│ │ │ └── wincolor_sink.h
│ │ ├── spdlog.h
│ │ └── tweakme.h
│ ├── stb
│ │ ├── impl_stb.cpp
│ │ ├── stb_image.h
│ │ └── stb_perlin.h
│ ├── tiny_obj_loader.cpp
│ └── tiny_obj_loader.h
├── imgui.ini
├── res
│ ├── cmaps
│ │ ├── CREDITS.txt
│ │ ├── earth
│ │ │ ├── nx.png
│ │ │ ├── ny.png
│ │ │ ├── nz.png
│ │ │ ├── px.png
│ │ │ ├── py.png
│ │ │ └── pz.png
│ │ ├── moon
│ │ │ ├── nx.png
│ │ │ ├── ny.png
│ │ │ ├── nz.png
│ │ │ ├── px.png
│ │ │ ├── py.png
│ │ │ └── pz.png
│ │ └── test
│ │ │ ├── nx.png
│ │ │ ├── ny.png
│ │ │ ├── nz.png
│ │ │ ├── px.png
│ │ │ ├── py.png
│ │ │ └── pz.png
│ ├── icon.png
│ ├── material
│ │ ├── carbon-monoxide.txt
│ │ ├── nitromethane.txt
│ │ ├── reaction
│ │ │ └── nitromethane-monoprop.txt
│ │ └── water.txt
│ ├── model
│ │ ├── icosphere.mtl
│ │ ├── rocket_arrow.blend
│ │ ├── rocket_arrow.blend1
│ │ └── rocket_arrow.mtl
│ ├── shaders
│ │ ├── debug.fs
│ │ ├── debug.vs
│ │ ├── generic
│ │ │ ├── sprite.fs
│ │ │ └── sprite.vs
│ │ ├── navball
│ │ │ ├── navball.fs
│ │ │ └── navball.vs
│ │ ├── planet.fs
│ │ ├── planet.vs
│ │ ├── planet_tile.fs
│ │ ├── planet_tile.vs
│ │ ├── test.fs
│ │ └── test.vs
│ ├── surface
│ │ └── Moon
│ │ │ └── hmap.png
│ ├── surfaces
│ │ ├── test.json
│ │ └── tester.json
│ ├── systems
│ │ └── earth_moon.txt
│ └── texture
│ │ └── navball
│ │ ├── CREDITS.txt
│ │ ├── antinormal.png
│ │ ├── frame.png
│ │ ├── frame.xcf
│ │ ├── navball.png
│ │ ├── navball.xcf
│ │ ├── normal.png
│ │ ├── prograde.png
│ │ ├── radialin.png
│ │ ├── radialout.png
│ │ └── retrograde.png
├── src
│ ├── game
│ │ ├── ui
│ │ │ ├── navball
│ │ │ │ ├── navball.cpp
│ │ │ │ └── navball.h
│ │ │ ├── orbit_predictor.cpp
│ │ │ ├── orbit_predictor.h
│ │ │ ├── orbit_view.cpp
│ │ │ ├── orbit_view.h
│ │ │ ├── ui_manager.cpp
│ │ │ └── ui_manager.h
│ │ └── vessel
│ │ │ ├── engine
│ │ │ ├── rocket_engine.cpp
│ │ │ └── rocket_engine.h
│ │ │ ├── material
│ │ │ ├── material.h
│ │ │ └── reaction.h
│ │ │ ├── part.cpp
│ │ │ └── part.h
│ ├── main.cpp
│ ├── main2.cpp
│ ├── orbital
│ │ ├── newton_body.cpp
│ │ ├── newton_body.h
│ │ ├── planet.h
│ │ ├── space_body.cpp
│ │ ├── space_body.h
│ │ ├── space_system.cpp
│ │ └── space_system.h
│ ├── render
│ │ ├── renderlow
│ │ │ ├── debug_draw.cpp
│ │ │ ├── debug_draw.h
│ │ │ ├── drawable.h
│ │ │ ├── drawables
│ │ │ │ ├── dbillboard.cpp
│ │ │ │ ├── dbillboard.h
│ │ │ │ ├── dcubesphere.cpp
│ │ │ │ ├── dcubesphere.h
│ │ │ │ ├── dmodel.cpp
│ │ │ │ ├── dmodel.h
│ │ │ │ ├── dsprite.cpp
│ │ │ │ └── dsprite.h
│ │ │ ├── framebuffer.cpp
│ │ │ ├── framebuffer.h
│ │ │ ├── image.cpp
│ │ │ ├── image.h
│ │ │ ├── map.cpp
│ │ │ ├── map.h
│ │ │ ├── mesh.cpp
│ │ │ ├── mesh.h
│ │ │ ├── shader.cpp
│ │ │ ├── shader.h
│ │ │ ├── texture.cpp
│ │ │ ├── texture.h
│ │ │ ├── transform.cpp
│ │ │ └── transform.h
│ │ ├── rendernear
│ │ │ ├── render_body.cpp
│ │ │ └── render_body.h
│ │ └── renderspace
│ │ │ ├── nodes
│ │ │ ├── all_nodes.cpp
│ │ │ ├── all_nodes.h
│ │ │ ├── constant_spn.cpp
│ │ │ ├── constant_spn.h
│ │ │ ├── input_spn.cpp
│ │ │ ├── input_spn.h
│ │ │ ├── math_spn.cpp
│ │ │ ├── math_spn.h
│ │ │ ├── noise_spn.cpp
│ │ │ ├── noise_spn.h
│ │ │ ├── output_spn.cpp
│ │ │ ├── output_spn.h
│ │ │ ├── pack_spn.cpp
│ │ │ ├── pack_spn.h
│ │ │ ├── preview_spn.cpp
│ │ │ ├── preview_spn.h
│ │ │ ├── unpack_spn.cpp
│ │ │ └── unpack_spn.h
│ │ │ ├── planet_tile.cpp
│ │ │ ├── planet_tile.h
│ │ │ ├── planet_tile_path.h
│ │ │ ├── planet_tile_server.cpp
│ │ │ ├── planet_tile_server.h
│ │ │ ├── quad_tree_node.cpp
│ │ │ ├── quad_tree_node.h
│ │ │ ├── quad_tree_planet.cpp
│ │ │ ├── quad_tree_planet.h
│ │ │ ├── surface_provider.cpp
│ │ │ ├── surface_provider.h
│ │ │ ├── surface_provider_node.cpp
│ │ │ └── surface_provider_node.h
│ └── util
│ │ ├── defines.h
│ │ ├── file_util.cpp
│ │ ├── file_util.h
│ │ ├── gui
│ │ ├── multi_plot.cpp
│ │ └── multi_plot.h
│ │ ├── math_util.cpp
│ │ ├── math_util.h
│ │ └── types
│ │ ├── gradients.cpp
│ │ └── gradients.h
└── øï
├── README.md
└── READMEimg
├── delavalnozzle.PNG
├── img.PNG
└── moon.PNG
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Tatjam
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/OSPGL.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26430.12
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OSPGL", "OSPGL\OSPGL.vcxproj", "{C09FF82B-F286-4CD5-B0CC-B766523808A9}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Debug|x64.ActiveCfg = Debug|x64
17 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Debug|x64.Build.0 = Debug|x64
18 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Debug|x86.ActiveCfg = Debug|Win32
19 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Debug|x86.Build.0 = Debug|Win32
20 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Release|x64.ActiveCfg = Release|x64
21 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Release|x64.Build.0 = Release|x64
22 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Release|x86.ActiveCfg = Release|Win32
23 | {C09FF82B-F286-4CD5-B0CC-B766523808A9}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | EndGlobal
29 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/INSTALL.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CMake Rules
6 |
7 |
8 |
9 |
10 | {BD547D03-5047-3C08-9EF3-4EC9005F5B05}
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/common.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/common.hpp
3 |
4 | #pragma once
5 |
6 | #include "detail/func_common.hpp"
7 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/_fixes.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/_fixes.hpp
3 |
4 | #include
5 |
6 | //! Workaround for compatibility with other libraries
7 | #ifdef max
8 | #undef max
9 | #endif
10 |
11 | //! Workaround for compatibility with other libraries
12 | #ifdef min
13 | #undef min
14 | #endif
15 |
16 | //! Workaround for Android
17 | #ifdef isnan
18 | #undef isnan
19 | #endif
20 |
21 | //! Workaround for Android
22 | #ifdef isinf
23 | #undef isinf
24 | #endif
25 |
26 | //! Workaround for Chrone Native Client
27 | #ifdef log2
28 | #undef log2
29 | #endif
30 |
31 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/func_exponential_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_exponential_simd.inl
3 |
4 | #include "../simd/exponential.h"
5 |
6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | template
12 | struct compute_sqrt
13 | {
14 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v)
15 | {
16 | tvec4 result(uninitialize);
17 | result.data = _mm_sqrt_ps(v.data);
18 | return result;
19 | }
20 | };
21 |
22 | template <>
23 | struct compute_sqrt
24 | {
25 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v)
26 | {
27 | tvec4 result(uninitialize);
28 | result.data = glm_vec4_sqrt_lowp(v.data);
29 | return result;
30 | }
31 | };
32 | }//namespace detail
33 | }//namespace glm
34 |
35 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
36 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/func_integer_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_integer_simd.inl
3 |
4 | #include "../simd/integer.h"
5 |
6 | #if GLM_ARCH & GLM_ARCH_SSE2_BIT
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | template
12 | struct compute_bitfieldReverseStep
13 | {
14 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v, uint32 Mask, uint32 Shift)
15 | {
16 | __m128i const set0 = v.data;
17 |
18 | __m128i const set1 = _mm_set1_epi32(Mask);
19 | __m128i const and1 = _mm_and_si128(set0, set1);
20 | __m128i const sft1 = _mm_slli_epi32(and1, Shift);
21 |
22 | __m128i const set2 = _mm_andnot_si128(set0, _mm_set1_epi32(-1));
23 | __m128i const and2 = _mm_and_si128(set0, set2);
24 | __m128i const sft2 = _mm_srai_epi32(and2, Shift);
25 |
26 | __m128i const or0 = _mm_or_si128(sft1, sft2);
27 |
28 | return or0;
29 | }
30 | };
31 |
32 | template
33 | struct compute_bitfieldBitCountStep
34 | {
35 | GLM_FUNC_QUALIFIER static tvec4 call(tvec4 const & v, uint32 Mask, uint32 Shift)
36 | {
37 | __m128i const set0 = v.data;
38 |
39 | __m128i const set1 = _mm_set1_epi32(Mask);
40 | __m128i const and0 = _mm_and_si128(set0, set1);
41 | __m128i const sft0 = _mm_slli_epi32(set0, Shift);
42 | __m128i const and1 = _mm_and_si128(sft0, set1);
43 | __m128i const add0 = _mm_add_epi32(and0, and1);
44 |
45 | return add0;
46 | }
47 | };
48 | }//namespace detail
49 |
50 | # if GLM_ARCH & GLM_ARCH_AVX_BIT
51 | template <>
52 | GLM_FUNC_QUALIFIER int bitCount(uint32 x)
53 | {
54 | return _mm_popcnt_u32(x);
55 | }
56 |
57 | # if(GLM_MODEL == GLM_MODEL_64)
58 | template <>
59 | GLM_FUNC_QUALIFIER int bitCount(uint64 x)
60 | {
61 | return static_cast(_mm_popcnt_u64(x));
62 | }
63 | # endif//GLM_MODEL
64 | # endif//GLM_ARCH
65 |
66 | }//namespace glm
67 |
68 | #endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
69 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/func_packing_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_packing_simd.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 |
8 | }//namespace detail
9 | }//namespace glm
10 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/func_trigonometric_simd.inl:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/TheOpenSpaceProgramArchive/osp/63a240be92784b3ee10b878c8d3d5af55756957d/OSPGL/dep/glm/detail/func_trigonometric_simd.inl
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/func_vector_relational_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/func_vector_relational_simd.inl
3 |
4 | namespace glm{
5 | namespace detail
6 | {
7 |
8 | }//namespace detail
9 | }//namespace glm
10 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/precision.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/precision.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm
9 | {
10 | enum precision
11 | {
12 | packed_highp,
13 | packed_mediump,
14 | packed_lowp,
15 |
16 | # if GLM_HAS_ALIGNED_TYPE
17 | aligned_highp,
18 | aligned_mediump,
19 | aligned_lowp,
20 | aligned = aligned_highp,
21 | # endif
22 |
23 | highp = packed_highp,
24 | mediump = packed_mediump,
25 | lowp = packed_lowp,
26 | packed = packed_highp,
27 |
28 | # if GLM_HAS_ALIGNED_TYPE && defined(GLM_FORCE_ALIGNED)
29 | defaultp = aligned_highp
30 | # else
31 | defaultp = highp
32 | # endif
33 | };
34 |
35 | namespace detail
36 | {
37 | template
38 | struct is_aligned
39 | {
40 | static const bool value = false;
41 | };
42 |
43 | # if GLM_HAS_ALIGNED_TYPE
44 | template<>
45 | struct is_aligned
46 | {
47 | static const bool value = true;
48 | };
49 |
50 | template<>
51 | struct is_aligned
52 | {
53 | static const bool value = true;
54 | };
55 |
56 | template<>
57 | struct is_aligned
58 | {
59 | static const bool value = true;
60 | };
61 | # endif
62 | }//namespace detail
63 | }//namespace glm
64 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/type_half.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_half.hpp
3 |
4 | #pragma once
5 |
6 | #include "setup.hpp"
7 |
8 | namespace glm{
9 | namespace detail
10 | {
11 | typedef short hdata;
12 |
13 | GLM_FUNC_DECL float toFloat32(hdata value);
14 | GLM_FUNC_DECL hdata toFloat16(float const & value);
15 |
16 | }//namespace detail
17 | }//namespace glm
18 |
19 | #include "type_half.inl"
20 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/type_mat.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_mat.inl
3 |
4 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/type_mat4x4_simd.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_mat4x4_sse2.inl
3 |
4 | namespace glm
5 | {
6 |
7 | }//namespace glm
8 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/detail/type_vec.inl:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/detail/type_vec.inl
3 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/exponential.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/exponential.hpp
3 |
4 | #pragma once
5 |
6 | #include "detail/func_exponential.hpp"
7 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/geometric.hpp:
--------------------------------------------------------------------------------
1 | /// @ref core
2 | /// @file glm/geometric.hpp
3 |
4 | #pragma once
5 |
6 | #include "detail/func_geometric.hpp"
7 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/color_space.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_color_space
2 | /// @file glm/gtc/color_space.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_color_space (dependence)
6 | ///
7 | /// @defgroup gtc_color_space GLM_GTC_color_space
8 | /// @ingroup gtc
9 | ///
10 | /// @brief Allow to perform bit operations on integer values
11 | ///
12 | /// need to be included to use these functionalities.
13 |
14 | #pragma once
15 |
16 | // Dependencies
17 | #include "../detail/setup.hpp"
18 | #include "../detail/precision.hpp"
19 | #include "../exponential.hpp"
20 | #include "../vec3.hpp"
21 | #include "../vec4.hpp"
22 | #include
23 |
24 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
25 | # pragma message("GLM: GLM_GTC_color_space extension included")
26 | #endif
27 |
28 | namespace glm
29 | {
30 | /// @addtogroup gtc_color_space
31 | /// @{
32 |
33 | /// Convert a linear color to sRGB color using a standard gamma correction.
34 | /// IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
35 | template class vecType>
36 | GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear);
37 |
38 | /// Convert a linear color to sRGB color using a custom gamma correction.
39 | /// IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
40 | template class vecType>
41 | GLM_FUNC_DECL vecType convertLinearToSRGB(vecType const & ColorLinear, T Gamma);
42 |
43 | /// Convert a sRGB color to linear color using a standard gamma correction.
44 | /// IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
45 | template class vecType>
46 | GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB);
47 |
48 | /// Convert a sRGB color to linear color using a custom gamma correction.
49 | // IEC 61966-2-1:1999 specification https://www.w3.org/Graphics/Color/srgb
50 | template class vecType>
51 | GLM_FUNC_DECL vecType convertSRGBToLinear(vecType const & ColorSRGB, T Gamma);
52 |
53 | /// @}
54 | } //namespace glm
55 |
56 | #include "color_space.inl"
57 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/epsilon.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_epsilon
2 | /// @file glm/gtc/epsilon.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_half_float (dependence)
6 | /// @see gtc_quaternion (dependence)
7 | ///
8 | /// @defgroup gtc_epsilon GLM_GTC_epsilon
9 | /// @ingroup gtc
10 | ///
11 | /// @brief Comparison functions for a user defined epsilon values.
12 | ///
13 | /// need to be included to use these functionalities.
14 |
15 | #pragma once
16 |
17 | // Dependencies
18 | #include "../detail/setup.hpp"
19 | #include "../detail/precision.hpp"
20 |
21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
22 | # pragma message("GLM: GLM_GTC_epsilon extension included")
23 | #endif
24 |
25 | namespace glm
26 | {
27 | /// @addtogroup gtc_epsilon
28 | /// @{
29 |
30 | /// Returns the component-wise comparison of |x - y| < epsilon.
31 | /// True if this expression is satisfied.
32 | ///
33 | /// @see gtc_epsilon
34 | template class vecType>
35 | GLM_FUNC_DECL vecType epsilonEqual(
36 | vecType const & x,
37 | vecType const & y,
38 | T const & epsilon);
39 |
40 | /// Returns the component-wise comparison of |x - y| < epsilon.
41 | /// True if this expression is satisfied.
42 | ///
43 | /// @see gtc_epsilon
44 | template
45 | GLM_FUNC_DECL bool epsilonEqual(
46 | genType const & x,
47 | genType const & y,
48 | genType const & epsilon);
49 |
50 | /// Returns the component-wise comparison of |x - y| < epsilon.
51 | /// True if this expression is not satisfied.
52 | ///
53 | /// @see gtc_epsilon
54 | template
55 | GLM_FUNC_DECL typename genType::boolType epsilonNotEqual(
56 | genType const & x,
57 | genType const & y,
58 | typename genType::value_type const & epsilon);
59 |
60 | /// Returns the component-wise comparison of |x - y| >= epsilon.
61 | /// True if this expression is not satisfied.
62 | ///
63 | /// @see gtc_epsilon
64 | template
65 | GLM_FUNC_DECL bool epsilonNotEqual(
66 | genType const & x,
67 | genType const & y,
68 | genType const & epsilon);
69 |
70 | /// @}
71 | }//namespace glm
72 |
73 | #include "epsilon.inl"
74 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/functions.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_functions
2 | /// @file glm/gtc/functions.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_half_float (dependence)
6 | /// @see gtc_quaternion (dependence)
7 | ///
8 | /// @defgroup gtc_functions GLM_GTC_functions
9 | /// @ingroup gtc
10 | ///
11 | /// @brief List of useful common functions.
12 | ///
13 | /// need to be included to use these functionalities.
14 |
15 | #pragma once
16 |
17 | // Dependencies
18 | #include "../detail/setup.hpp"
19 | #include "../detail/precision.hpp"
20 | #include "../detail/type_vec2.hpp"
21 |
22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
23 | # pragma message("GLM: GLM_GTC_functions extension included")
24 | #endif
25 |
26 | namespace glm
27 | {
28 | /// @addtogroup gtc_functions
29 | /// @{
30 |
31 | /// 1D gauss function
32 | ///
33 | /// @see gtc_epsilon
34 | template
35 | GLM_FUNC_DECL T gauss(
36 | T x,
37 | T ExpectedValue,
38 | T StandardDeviation);
39 |
40 | /// 2D gauss function
41 | ///
42 | /// @see gtc_epsilon
43 | template
44 | GLM_FUNC_DECL T gauss(
45 | tvec2 const& Coord,
46 | tvec2 const& ExpectedValue,
47 | tvec2 const& StandardDeviation);
48 |
49 | /// @}
50 | }//namespace glm
51 |
52 | #include "functions.inl"
53 |
54 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/functions.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_functions
2 | /// @file glm/gtc/functions.inl
3 |
4 | #include "../detail/func_exponential.hpp"
5 |
6 | namespace glm
7 | {
8 | template
9 | GLM_FUNC_QUALIFIER T gauss
10 | (
11 | T x,
12 | T ExpectedValue,
13 | T StandardDeviation
14 | )
15 | {
16 | return exp(-((x - ExpectedValue) * (x - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation)) / (StandardDeviation * sqrt(static_cast(6.28318530717958647692528676655900576)));
17 | }
18 |
19 | template
20 | GLM_FUNC_QUALIFIER T gauss
21 | (
22 | tvec2 const& Coord,
23 | tvec2 const& ExpectedValue,
24 | tvec2 const& StandardDeviation
25 | )
26 | {
27 | tvec2 const Squared = ((Coord - ExpectedValue) * (Coord - ExpectedValue)) / (static_cast(2) * StandardDeviation * StandardDeviation);
28 | return exp(-(Squared.x + Squared.y));
29 | }
30 | }//namespace glm
31 |
32 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/matrix_access.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_matrix_access
2 | /// @file glm/gtc/matrix_access.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_matrix_access GLM_GTC_matrix_access
7 | /// @ingroup gtc
8 | ///
9 | /// Defines functions to access rows or columns of a matrix easily.
10 | /// need to be included to use these functionalities.
11 |
12 | #pragma once
13 |
14 | // Dependency:
15 | #include "../detail/setup.hpp"
16 |
17 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
18 | # pragma message("GLM: GLM_GTC_matrix_access extension included")
19 | #endif
20 |
21 | namespace glm
22 | {
23 | /// @addtogroup gtc_matrix_access
24 | /// @{
25 |
26 | /// Get a specific row of a matrix.
27 | /// @see gtc_matrix_access
28 | template
29 | GLM_FUNC_DECL typename genType::row_type row(
30 | genType const & m,
31 | length_t index);
32 |
33 | /// Set a specific row to a matrix.
34 | /// @see gtc_matrix_access
35 | template
36 | GLM_FUNC_DECL genType row(
37 | genType const & m,
38 | length_t index,
39 | typename genType::row_type const & x);
40 |
41 | /// Get a specific column of a matrix.
42 | /// @see gtc_matrix_access
43 | template
44 | GLM_FUNC_DECL typename genType::col_type column(
45 | genType const & m,
46 | length_t index);
47 |
48 | /// Set a specific column to a matrix.
49 | /// @see gtc_matrix_access
50 | template
51 | GLM_FUNC_DECL genType column(
52 | genType const & m,
53 | length_t index,
54 | typename genType::col_type const & x);
55 |
56 | /// @}
57 | }//namespace glm
58 |
59 | #include "matrix_access.inl"
60 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/matrix_access.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_matrix_access
2 | /// @file glm/gtc/matrix_access.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER genType row
8 | (
9 | genType const & m,
10 | length_t index,
11 | typename genType::row_type const & x
12 | )
13 | {
14 | assert(index >= 0 && index < m[0].length());
15 |
16 | genType Result = m;
17 | for(length_t i = 0; i < m.length(); ++i)
18 | Result[i][index] = x[i];
19 | return Result;
20 | }
21 |
22 | template
23 | GLM_FUNC_QUALIFIER typename genType::row_type row
24 | (
25 | genType const & m,
26 | length_t index
27 | )
28 | {
29 | assert(index >= 0 && index < m[0].length());
30 |
31 | typename genType::row_type Result;
32 | for(length_t i = 0; i < m.length(); ++i)
33 | Result[i] = m[i][index];
34 | return Result;
35 | }
36 |
37 | template
38 | GLM_FUNC_QUALIFIER genType column
39 | (
40 | genType const & m,
41 | length_t index,
42 | typename genType::col_type const & x
43 | )
44 | {
45 | assert(index >= 0 && index < m.length());
46 |
47 | genType Result = m;
48 | Result[index] = x;
49 | return Result;
50 | }
51 |
52 | template
53 | GLM_FUNC_QUALIFIER typename genType::col_type column
54 | (
55 | genType const & m,
56 | length_t index
57 | )
58 | {
59 | assert(index >= 0 && index < m.length());
60 |
61 | return m[index];
62 | }
63 | }//namespace glm
64 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/matrix_inverse.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_matrix_inverse
2 | /// @file glm/gtc/matrix_inverse.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_matrix_inverse GLM_GTC_matrix_inverse
7 | /// @ingroup gtc
8 | ///
9 | /// Defines additional matrix inverting functions.
10 | /// need to be included to use these functionalities.
11 |
12 | #pragma once
13 |
14 | // Dependencies
15 | #include "../detail/setup.hpp"
16 | #include "../matrix.hpp"
17 | #include "../mat2x2.hpp"
18 | #include "../mat3x3.hpp"
19 | #include "../mat4x4.hpp"
20 |
21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
22 | # pragma message("GLM: GLM_GTC_matrix_inverse extension included")
23 | #endif
24 |
25 | namespace glm
26 | {
27 | /// @addtogroup gtc_matrix_inverse
28 | /// @{
29 |
30 | /// Fast matrix inverse for affine matrix.
31 | ///
32 | /// @param m Input matrix to invert.
33 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.
34 | /// @see gtc_matrix_inverse
35 | template
36 | GLM_FUNC_DECL genType affineInverse(genType const & m);
37 |
38 | /// Compute the inverse transpose of a matrix.
39 | ///
40 | /// @param m Input matrix to invert transpose.
41 | /// @tparam genType Squared floating-point matrix: half, float or double. Inverse of matrix based of half-precision floating point value is highly innacurate.
42 | /// @see gtc_matrix_inverse
43 | template
44 | GLM_FUNC_DECL genType inverseTranspose(genType const & m);
45 |
46 | /// @}
47 | }//namespace glm
48 |
49 | #include "matrix_inverse.inl"
50 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/noise.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_noise
2 | /// @file glm/gtc/noise.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_noise GLM_GTC_noise
7 | /// @ingroup gtc
8 | ///
9 | /// Defines 2D, 3D and 4D procedural noise functions
10 | /// Based on the work of Stefan Gustavson and Ashima Arts on "webgl-noise":
11 | /// https://github.com/ashima/webgl-noise
12 | /// Following Stefan Gustavson's paper "Simplex noise demystified":
13 | /// http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
14 | /// need to be included to use these functionalities.
15 |
16 | #pragma once
17 |
18 | // Dependencies
19 | #include "../detail/setup.hpp"
20 | #include "../detail/precision.hpp"
21 | #include "../detail/_noise.hpp"
22 | #include "../geometric.hpp"
23 | #include "../common.hpp"
24 | #include "../vector_relational.hpp"
25 | #include "../vec2.hpp"
26 | #include "../vec3.hpp"
27 | #include "../vec4.hpp"
28 |
29 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
30 | # pragma message("GLM: GLM_GTC_noise extension included")
31 | #endif
32 |
33 | namespace glm
34 | {
35 | /// @addtogroup gtc_noise
36 | /// @{
37 |
38 | /// Classic perlin noise.
39 | /// @see gtc_noise
40 | template class vecType>
41 | GLM_FUNC_DECL T perlin(
42 | vecType const & p);
43 |
44 | /// Periodic perlin noise.
45 | /// @see gtc_noise
46 | template class vecType>
47 | GLM_FUNC_DECL T perlin(
48 | vecType const & p,
49 | vecType const & rep);
50 |
51 | /// Simplex noise.
52 | /// @see gtc_noise
53 | template class vecType>
54 | GLM_FUNC_DECL T simplex(
55 | vecType const & p);
56 |
57 | /// @}
58 | }//namespace glm
59 |
60 | #include "noise.inl"
61 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/type_precision.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_swizzle
2 | /// @file glm/gtc/swizzle.inl
3 |
4 | namespace glm
5 | {
6 |
7 | }
8 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/ulp.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtc_ulp
2 | /// @file glm/gtc/ulp.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtc_ulp GLM_GTC_ulp
7 | /// @ingroup gtc
8 | ///
9 | /// @brief Allow the measurement of the accuracy of a function against a reference
10 | /// implementation. This extension works on floating-point data and provide results
11 | /// in ULP.
12 | /// need to be included to use these features.
13 |
14 | #pragma once
15 |
16 | // Dependencies
17 | #include "../detail/setup.hpp"
18 | #include "../detail/precision.hpp"
19 | #include "../detail/type_int.hpp"
20 |
21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
22 | # pragma message("GLM: GLM_GTC_ulp extension included")
23 | #endif
24 |
25 | namespace glm
26 | {
27 | /// @addtogroup gtc_ulp
28 | /// @{
29 |
30 | /// Return the next ULP value(s) after the input value(s).
31 | /// @see gtc_ulp
32 | template
33 | GLM_FUNC_DECL genType next_float(genType const & x);
34 |
35 | /// Return the previous ULP value(s) before the input value(s).
36 | /// @see gtc_ulp
37 | template
38 | GLM_FUNC_DECL genType prev_float(genType const & x);
39 |
40 | /// Return the value(s) ULP distance after the input value(s).
41 | /// @see gtc_ulp
42 | template
43 | GLM_FUNC_DECL genType next_float(genType const & x, uint const & Distance);
44 |
45 | /// Return the value(s) ULP distance before the input value(s).
46 | /// @see gtc_ulp
47 | template
48 | GLM_FUNC_DECL genType prev_float(genType const & x, uint const & Distance);
49 |
50 | /// Return the distance in the number of ULP between 2 scalars.
51 | /// @see gtc_ulp
52 | template
53 | GLM_FUNC_DECL uint float_distance(T const & x, T const & y);
54 |
55 | /// Return the distance in the number of ULP between 2 vectors.
56 | /// @see gtc_ulp
57 | template class vecType>
58 | GLM_FUNC_DECL vecType float_distance(vecType const & x, vecType const & y);
59 |
60 | /// @}
61 | }// namespace glm
62 |
63 | #include "ulp.inl"
64 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtc/vec1.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtc_vec1
2 | /// @file glm/gtc/vec1.inl
3 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/closest_point.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_closest_point
2 | /// @file glm/gtx/closest_point.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_closest_point GLM_GTX_closest_point
7 | /// @ingroup gtx
8 | ///
9 | /// @brief Find the point on a straight line which is the closet of a point.
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTX_closest_point extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtx_closest_point
25 | /// @{
26 |
27 | /// Find the point on a straight line which is the closet of a point.
28 | /// @see gtx_closest_point
29 | template
30 | GLM_FUNC_DECL tvec3 closestPointOnLine(
31 | tvec3 const & point,
32 | tvec3 const & a,
33 | tvec3 const & b);
34 |
35 | /// 2d lines work as well
36 | template
37 | GLM_FUNC_DECL tvec2 closestPointOnLine(
38 | tvec2 const & point,
39 | tvec2 const & a,
40 | tvec2 const & b);
41 |
42 | /// @}
43 | }// namespace glm
44 |
45 | #include "closest_point.inl"
46 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/closest_point.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_closest_point
2 | /// @file glm/gtx/closest_point.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER tvec3 closestPointOnLine
8 | (
9 | tvec3 const & point,
10 | tvec3 const & a,
11 | tvec3 const & b
12 | )
13 | {
14 | T LineLength = distance(a, b);
15 | tvec3 Vector = point - a;
16 | tvec3 LineDirection = (b - a) / LineLength;
17 |
18 | // Project Vector to LineDirection to get the distance of point from a
19 | T Distance = dot(Vector, LineDirection);
20 |
21 | if(Distance <= T(0)) return a;
22 | if(Distance >= LineLength) return b;
23 | return a + LineDirection * Distance;
24 | }
25 |
26 | template
27 | GLM_FUNC_QUALIFIER tvec2 closestPointOnLine
28 | (
29 | tvec2 const & point,
30 | tvec2 const & a,
31 | tvec2 const & b
32 | )
33 | {
34 | T LineLength = distance(a, b);
35 | tvec2 Vector = point - a;
36 | tvec2 LineDirection = (b - a) / LineLength;
37 |
38 | // Project Vector to LineDirection to get the distance of point from a
39 | T Distance = dot(Vector, LineDirection);
40 |
41 | if(Distance <= T(0)) return a;
42 | if(Distance >= LineLength) return b;
43 | return a + LineDirection * Distance;
44 | }
45 |
46 | }//namespace glm
47 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/color_space.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_color_space
2 | /// @file glm/gtx/color_space.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_color_space GLM_GTX_color_space
7 | /// @ingroup gtx
8 | ///
9 | /// @brief Related to RGB to HSV conversions and operations.
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTX_color_space extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtx_color_space
25 | /// @{
26 |
27 | /// Converts a color from HSV color space to its color in RGB color space.
28 | /// @see gtx_color_space
29 | template
30 | GLM_FUNC_DECL tvec3 rgbColor(
31 | tvec3 const & hsvValue);
32 |
33 | /// Converts a color from RGB color space to its color in HSV color space.
34 | /// @see gtx_color_space
35 | template
36 | GLM_FUNC_DECL tvec3 hsvColor(
37 | tvec3 const & rgbValue);
38 |
39 | /// Build a saturation matrix.
40 | /// @see gtx_color_space
41 | template
42 | GLM_FUNC_DECL tmat4x4 saturation(
43 | T const s);
44 |
45 | /// Modify the saturation of a color.
46 | /// @see gtx_color_space
47 | template
48 | GLM_FUNC_DECL tvec3 saturation(
49 | T const s,
50 | tvec3 const & color);
51 |
52 | /// Modify the saturation of a color.
53 | /// @see gtx_color_space
54 | template
55 | GLM_FUNC_DECL tvec4 saturation(
56 | T const s,
57 | tvec4 const & color);
58 |
59 | /// Compute color luminosity associating ratios (0.33, 0.59, 0.11) to RGB canals.
60 | /// @see gtx_color_space
61 | template
62 | GLM_FUNC_DECL T luminosity(
63 | tvec3 const & color);
64 |
65 | /// @}
66 | }//namespace glm
67 |
68 | #include "color_space.inl"
69 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/color_space_YCoCg.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_color_space_YCoCg
2 | /// @file glm/gtx/color_space_YCoCg.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_color_space_YCoCg GLM_GTX_color_space_YCoCg
7 | /// @ingroup gtx
8 | ///
9 | /// @brief RGB to YCoCg conversions and operations
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTX_color_space_YCoCg extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtx_color_space_YCoCg
25 | /// @{
26 |
27 | /// Convert a color from RGB color space to YCoCg color space.
28 | /// @see gtx_color_space_YCoCg
29 | template
30 | GLM_FUNC_DECL tvec3 rgb2YCoCg(
31 | tvec3 const & rgbColor);
32 |
33 | /// Convert a color from YCoCg color space to RGB color space.
34 | /// @see gtx_color_space_YCoCg
35 | template
36 | GLM_FUNC_DECL tvec3 YCoCg2rgb(
37 | tvec3 const & YCoCgColor);
38 |
39 | /// Convert a color from RGB color space to YCoCgR color space.
40 | /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
41 | /// @see gtx_color_space_YCoCg
42 | template
43 | GLM_FUNC_DECL tvec3 rgb2YCoCgR(
44 | tvec3 const & rgbColor);
45 |
46 | /// Convert a color from YCoCgR color space to RGB color space.
47 | /// @see "YCoCg-R: A Color Space with RGB Reversibility and Low Dynamic Range"
48 | /// @see gtx_color_space_YCoCg
49 | template
50 | GLM_FUNC_DECL tvec3 YCoCgR2rgb(
51 | tvec3 const & YCoCgColor);
52 |
53 | /// @}
54 | }//namespace glm
55 |
56 | #include "color_space_YCoCg.inl"
57 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/common.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_common
2 | /// @file glm/gtx/common.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtc_half_float (dependence)
6 | ///
7 | /// @defgroup gtx_common GLM_GTX_common
8 | /// @ingroup gtx
9 | ///
10 | /// @brief Provide functions to increase the compatibility with Cg and HLSL languages
11 | ///
12 | /// need to be included to use these functionalities.
13 |
14 | #pragma once
15 |
16 | // Dependencies:
17 | #include "../vec2.hpp"
18 | #include "../vec3.hpp"
19 | #include "../vec4.hpp"
20 | #include "../gtc/vec1.hpp"
21 |
22 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
23 | # pragma message("GLM: GLM_GTX_common extension included")
24 | #endif
25 |
26 | namespace glm
27 | {
28 | /// @addtogroup gtx_common
29 | /// @{
30 |
31 | /// Returns true if x is a denormalized number
32 | /// Numbers whose absolute value is too small to be represented in the normal format are represented in an alternate, denormalized format.
33 | /// This format is less precise but can represent values closer to zero.
34 | ///
35 | /// @tparam genType Floating-point scalar or vector types.
36 | ///
37 | /// @see GLSL isnan man page
38 | /// @see GLSL 4.20.8 specification, section 8.3 Common Functions
39 | template
40 | GLM_FUNC_DECL typename genType::bool_type isdenormal(genType const & x);
41 |
42 | /// Similar to 'mod' but with a different rounding and integer support.
43 | /// Returns 'x - y * trunc(x/y)' instead of 'x - y * floor(x/y)'
44 | ///
45 | /// @see GLSL mod vs HLSL fmod
46 | /// @see GLSL mod man page
47 | template class vecType>
48 | GLM_FUNC_DECL vecType fmod(vecType const & v);
49 |
50 | /// @}
51 | }//namespace glm
52 |
53 | #include "common.inl"
54 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/compatibility.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_compatibility
2 | /// @file glm/gtx/compatibility.inl
3 |
4 | #include
5 |
6 | namespace glm
7 | {
8 | // isfinite
9 | template
10 | GLM_FUNC_QUALIFIER bool isfinite(
11 | genType const & x)
12 | {
13 | # if GLM_HAS_CXX11_STL
14 | return std::isfinite(x) != 0;
15 | # elif GLM_COMPILER & GLM_COMPILER_VC
16 | return _finite(x);
17 | # elif GLM_COMPILER & GLM_COMPILER_GCC && GLM_PLATFORM & GLM_PLATFORM_ANDROID
18 | return _isfinite(x) != 0;
19 | # else
20 | if (std::numeric_limits::is_integer || std::denorm_absent == std::numeric_limits::has_denorm)
21 | return std::numeric_limits::min() <= x && std::numeric_limits::max() >= x;
22 | else
23 | return -std::numeric_limits::max() <= x && std::numeric_limits::max() >= x;
24 | # endif
25 | }
26 |
27 | template
28 | GLM_FUNC_QUALIFIER tvec1 isfinite(
29 | tvec1 const & x)
30 | {
31 | return tvec1(
32 | isfinite(x.x));
33 | }
34 |
35 | template
36 | GLM_FUNC_QUALIFIER tvec2 isfinite(
37 | tvec2 const & x)
38 | {
39 | return tvec2(
40 | isfinite(x.x),
41 | isfinite(x.y));
42 | }
43 |
44 | template
45 | GLM_FUNC_QUALIFIER tvec3 isfinite(
46 | tvec3 const & x)
47 | {
48 | return tvec3(
49 | isfinite(x.x),
50 | isfinite(x.y),
51 | isfinite(x.z));
52 | }
53 |
54 | template
55 | GLM_FUNC_QUALIFIER tvec4 isfinite(
56 | tvec4 const & x)
57 | {
58 | return tvec4(
59 | isfinite(x.x),
60 | isfinite(x.y),
61 | isfinite(x.z),
62 | isfinite(x.w));
63 | }
64 |
65 | }//namespace glm
66 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/extend.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_extend
2 | /// @file glm/gtx/extend.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_extend GLM_GTX_extend
7 | /// @ingroup gtx
8 | ///
9 | /// @brief Extend a position from a source to a position at a defined length.
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTX_extend extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtx_extend
25 | /// @{
26 |
27 | /// Extends of Length the Origin position using the (Source - Origin) direction.
28 | /// @see gtx_extend
29 | template
30 | GLM_FUNC_DECL genType extend(
31 | genType const & Origin,
32 | genType const & Source,
33 | typename genType::value_type const Length);
34 |
35 | /// @}
36 | }//namespace glm
37 |
38 | #include "extend.inl"
39 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/extend.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_extend
2 | /// @file glm/gtx/extend.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER genType extend
8 | (
9 | genType const & Origin,
10 | genType const & Source,
11 | genType const & Distance
12 | )
13 | {
14 | return Origin + (Source - Origin) * Distance;
15 | }
16 |
17 | template
18 | GLM_FUNC_QUALIFIER tvec2 extend
19 | (
20 | tvec2 const & Origin,
21 | tvec2 const & Source,
22 | T const & Distance
23 | )
24 | {
25 | return Origin + (Source - Origin) * Distance;
26 | }
27 |
28 | template
29 | GLM_FUNC_QUALIFIER tvec3 extend
30 | (
31 | tvec3 const & Origin,
32 | tvec3 const & Source,
33 | T const & Distance
34 | )
35 | {
36 | return Origin + (Source - Origin) * Distance;
37 | }
38 |
39 | template
40 | GLM_FUNC_QUALIFIER tvec4 extend
41 | (
42 | tvec4 const & Origin,
43 | tvec4 const & Source,
44 | T const & Distance
45 | )
46 | {
47 | return Origin + (Source - Origin) * Distance;
48 | }
49 | }//namespace glm
50 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/float_notmalize.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_float_normalize
2 | /// @file glm/gtx/float_normalize.inl
3 |
4 | #include
5 |
6 | namespace glm
7 | {
8 | template class vecType>
9 | GLM_FUNC_QUALIFIER vecType floatNormalize(vecType const & v)
10 | {
11 | return vecType(v) / static_cast(std::numeric_limits::max());
12 | }
13 |
14 | }//namespace glm
15 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/gradient_paint.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_gradient_paint
2 | /// @file glm/gtx/gradient_paint.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtx_optimum_pow (dependence)
6 | ///
7 | /// @defgroup gtx_gradient_paint GLM_GTX_gradient_paint
8 | /// @ingroup gtx
9 | ///
10 | /// @brief Functions that return the color of procedural gradient for specific coordinates.
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 | #include "../gtx/optimum_pow.hpp"
18 |
19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 | # pragma message("GLM: GLM_GTX_gradient_paint extension included")
21 | #endif
22 |
23 | namespace glm
24 | {
25 | /// @addtogroup gtx_gradient_paint
26 | /// @{
27 |
28 | /// Return a color from a radial gradient.
29 | /// @see - gtx_gradient_paint
30 | template
31 | GLM_FUNC_DECL T radialGradient(
32 | tvec2 const & Center,
33 | T const & Radius,
34 | tvec2 const & Focal,
35 | tvec2 const & Position);
36 |
37 | /// Return a color from a linear gradient.
38 | /// @see - gtx_gradient_paint
39 | template
40 | GLM_FUNC_DECL T linearGradient(
41 | tvec2 const & Point0,
42 | tvec2 const & Point1,
43 | tvec2 const & Position);
44 |
45 | /// @}
46 | }// namespace glm
47 |
48 | #include "gradient_paint.inl"
49 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/gradient_paint.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_gradient_paint
2 | /// @file glm/gtx/gradient_paint.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER T radialGradient
8 | (
9 | tvec2 const & Center,
10 | T const & Radius,
11 | tvec2 const & Focal,
12 | tvec2 const & Position
13 | )
14 | {
15 | tvec2 F = Focal - Center;
16 | tvec2 D = Position - Focal;
17 | T Radius2 = pow2(Radius);
18 | T Fx2 = pow2(F.x);
19 | T Fy2 = pow2(F.y);
20 |
21 | T Numerator = (D.x * F.x + D.y * F.y) + sqrt(Radius2 * (pow2(D.x) + pow2(D.y)) - pow2(D.x * F.y - D.y * F.x));
22 | T Denominator = Radius2 - (Fx2 + Fy2);
23 | return Numerator / Denominator;
24 | }
25 |
26 | template
27 | GLM_FUNC_QUALIFIER T linearGradient
28 | (
29 | tvec2 const & Point0,
30 | tvec2 const & Point1,
31 | tvec2 const & Position
32 | )
33 | {
34 | tvec2 Dist = Point1 - Point0;
35 | return (Dist.x * (Position.x - Point0.x) + Dist.y * (Position.y - Point0.y)) / glm::dot(Dist, Dist);
36 | }
37 | }//namespace glm
38 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/handed_coordinate_space.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_handed_coordinate_space
2 | /// @file glm/gtx/handed_coordinate_space.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_handed_coordinate_space GLM_GTX_handed_coordinate_space
7 | /// @ingroup gtx
8 | ///
9 | /// @brief To know if a set of three basis vectors defines a right or left-handed coordinate system.
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTX_handed_coordinate_space extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtx_handed_coordinate_space
25 | /// @{
26 |
27 | //! Return if a trihedron right handed or not.
28 | //! From GLM_GTX_handed_coordinate_space extension.
29 | template
30 | GLM_FUNC_DECL bool rightHanded(
31 | tvec3 const & tangent,
32 | tvec3 const & binormal,
33 | tvec3 const & normal);
34 |
35 | //! Return if a trihedron left handed or not.
36 | //! From GLM_GTX_handed_coordinate_space extension.
37 | template
38 | GLM_FUNC_DECL bool leftHanded(
39 | tvec3 const & tangent,
40 | tvec3 const & binormal,
41 | tvec3 const & normal);
42 |
43 | /// @}
44 | }// namespace glm
45 |
46 | #include "handed_coordinate_space.inl"
47 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/handed_coordinate_space.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_handed_coordinate_space
2 | /// @file glm/gtx/handed_coordinate_space.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER bool rightHanded
8 | (
9 | tvec3 const & tangent,
10 | tvec3 const & binormal,
11 | tvec3 const & normal
12 | )
13 | {
14 | return dot(cross(normal, tangent), binormal) > T(0);
15 | }
16 |
17 | template
18 | GLM_FUNC_QUALIFIER bool leftHanded
19 | (
20 | tvec3 const & tangent,
21 | tvec3 const & binormal,
22 | tvec3 const & normal
23 | )
24 | {
25 | return dot(cross(normal, tangent), binormal) < T(0);
26 | }
27 | }//namespace glm
28 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/integer.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_integer
2 | /// @file glm/gtx/integer.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_integer GLM_GTX_integer
7 | /// @ingroup gtx
8 | ///
9 | /// @brief Add support for integer for core functions
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 | #include "../gtc/integer.hpp"
18 |
19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 | # pragma message("GLM: GLM_GTX_integer extension included")
21 | #endif
22 |
23 | namespace glm
24 | {
25 | /// @addtogroup gtx_integer
26 | /// @{
27 |
28 | //! Returns x raised to the y power.
29 | //! From GLM_GTX_integer extension.
30 | GLM_FUNC_DECL int pow(int x, int y);
31 |
32 | //! Returns the positive square root of x.
33 | //! From GLM_GTX_integer extension.
34 | GLM_FUNC_DECL int sqrt(int x);
35 |
36 | //! Returns the floor log2 of x.
37 | //! From GLM_GTX_integer extension.
38 | GLM_FUNC_DECL unsigned int floor_log2(unsigned int x);
39 |
40 | //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
41 | //! From GLM_GTX_integer extension.
42 | GLM_FUNC_DECL int mod(int x, int y);
43 |
44 | //! Return the factorial value of a number (!12 max, integer only)
45 | //! From GLM_GTX_integer extension.
46 | template
47 | GLM_FUNC_DECL genType factorial(genType const & x);
48 |
49 | //! 32bit signed integer.
50 | //! From GLM_GTX_integer extension.
51 | typedef signed int sint;
52 |
53 | //! Returns x raised to the y power.
54 | //! From GLM_GTX_integer extension.
55 | GLM_FUNC_DECL uint pow(uint x, uint y);
56 |
57 | //! Returns the positive square root of x.
58 | //! From GLM_GTX_integer extension.
59 | GLM_FUNC_DECL uint sqrt(uint x);
60 |
61 | //! Modulus. Returns x - y * floor(x / y) for each component in x using the floating point value y.
62 | //! From GLM_GTX_integer extension.
63 | GLM_FUNC_DECL uint mod(uint x, uint y);
64 |
65 | //! Returns the number of leading zeros.
66 | //! From GLM_GTX_integer extension.
67 | GLM_FUNC_DECL uint nlz(uint x);
68 |
69 | /// @}
70 | }//namespace glm
71 |
72 | #include "integer.inl"
73 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/log_base.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_log_base
2 | /// @file glm/gtx/log_base.hpp
3 | ///
4 | /// @see core (dependence)
5 | ///
6 | /// @defgroup gtx_log_base GLM_GTX_log_base
7 | /// @ingroup gtx
8 | ///
9 | /// @brief Logarithm for any base. base can be a vector or a scalar.
10 | ///
11 | /// need to be included to use these functionalities.
12 |
13 | #pragma once
14 |
15 | // Dependency:
16 | #include "../glm.hpp"
17 |
18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
19 | # pragma message("GLM: GLM_GTX_log_base extension included")
20 | #endif
21 |
22 | namespace glm
23 | {
24 | /// @addtogroup gtx_log_base
25 | /// @{
26 |
27 | /// Logarithm for any base.
28 | /// From GLM_GTX_log_base.
29 | template
30 | GLM_FUNC_DECL genType log(
31 | genType const & x,
32 | genType const & base);
33 |
34 | /// Logarithm for any base.
35 | /// From GLM_GTX_log_base.
36 | template class vecType>
37 | GLM_FUNC_DECL vecType sign(
38 | vecType const & x,
39 | vecType const & base);
40 |
41 | /// @}
42 | }//namespace glm
43 |
44 | #include "log_base.inl"
45 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/log_base.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_log_base
2 | /// @file glm/gtx/log_base.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER genType log(genType const & x, genType const & base)
8 | {
9 | assert(x != genType(0));
10 | return glm::log(x) / glm::log(base);
11 | }
12 |
13 | template class vecType>
14 | GLM_FUNC_QUALIFIER vecType log(vecType const & x, vecType const & base)
15 | {
16 | return glm::log(x) / glm::log(base);
17 | }
18 | }//namespace glm
19 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/matrix_cross_product.hpp:
--------------------------------------------------------------------------------
1 | /// @ref gtx_matrix_cross_product
2 | /// @file glm/gtx/matrix_cross_product.hpp
3 | ///
4 | /// @see core (dependence)
5 | /// @see gtx_extented_min_max (dependence)
6 | ///
7 | /// @defgroup gtx_matrix_cross_product GLM_GTX_matrix_cross_product
8 | /// @ingroup gtx
9 | ///
10 | /// @brief Build cross product matrices
11 | ///
12 | /// need to be included to use these functionalities.
13 |
14 | #pragma once
15 |
16 | // Dependency:
17 | #include "../glm.hpp"
18 |
19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED)
20 | # pragma message("GLM: GLM_GTX_matrix_cross_product extension included")
21 | #endif
22 |
23 | namespace glm
24 | {
25 | /// @addtogroup gtx_matrix_cross_product
26 | /// @{
27 |
28 | //! Build a cross product matrix.
29 | //! From GLM_GTX_matrix_cross_product extension.
30 | template
31 | GLM_FUNC_DECL tmat3x3 matrixCross3(
32 | tvec3 const & x);
33 |
34 | //! Build a cross product matrix.
35 | //! From GLM_GTX_matrix_cross_product extension.
36 | template
37 | GLM_FUNC_DECL tmat4x4 matrixCross4(
38 | tvec3 const & x);
39 |
40 | /// @}
41 | }//namespace glm
42 |
43 | #include "matrix_cross_product.inl"
44 |
--------------------------------------------------------------------------------
/OSPGL/dep/glm/gtx/matrix_cross_product.inl:
--------------------------------------------------------------------------------
1 | /// @ref gtx_matrix_cross_product
2 | /// @file glm/gtx/matrix_cross_product.inl
3 |
4 | namespace glm
5 | {
6 | template
7 | GLM_FUNC_QUALIFIER tmat3x3