├── .gitignore ├── CMakeLists.txt ├── README.md ├── build-msvc15.bat ├── cmake └── utils.cmake ├── doc └── screenshot01.png ├── share ├── images │ ├── ui-box.png │ ├── ui-capsule.png │ ├── ui-cone.png │ ├── ui-custom.png │ ├── ui-cylinder.png │ ├── ui-cylinder8.png │ ├── ui-hexprism.png │ ├── ui-pyramid.png │ ├── ui-sphere.png │ ├── ui-torus.png │ ├── ui-torus82.png │ ├── ui-torus88.png │ └── ui-triangle.png ├── shaders │ ├── include │ │ ├── AppInfo-ubo.inc.glsl │ │ ├── Camera-ubo.inc.glsl │ │ ├── GameState-ssbo.inc.glsl │ │ ├── GameState-ubo.inc.glsl │ │ ├── default-scene.inc.glsl │ │ ├── map-generator.inc.glsl │ │ ├── ray-marcher.inc.glsl │ │ └── templated-ray-marcher.inc.glsl │ ├── init.comp.glsl │ ├── manipulator.frag.glsl │ ├── manipulator.vert.glsl │ ├── map.frag.glsl │ ├── map.geo.glsl │ ├── map.vert.glsl │ ├── mouse-move.comp.glsl │ ├── mouse-scroll.comp.glsl │ ├── render.frag.glsl │ ├── render.geo.glsl │ ├── render.vert.glsl │ └── update.comp.glsl └── styles │ └── default.css └── src ├── CMakeLists.txt ├── RayStep ├── CMakeLists.txt ├── Future.h ├── Logger.cpp ├── Logger.h ├── MainWindow.cpp ├── MainWindow.h ├── MainWindow.ui ├── NodePropertiesModel.cpp ├── NodePropertiesModel.h ├── OutlinerTreeView.cpp ├── OutlinerTreeView.h ├── RenderWidget.cpp ├── RenderWidget.h ├── ResourceManager.h ├── SceneGraph.cpp ├── SceneGraph.h ├── SceneGraphIntrospector.cpp ├── SceneGraphIntrospector.h ├── SceneTreeModel.cpp ├── SceneTreeModel.h ├── SceneTreeView.cpp ├── SceneTreeView.h ├── TextWindow.cpp ├── TextWindow.h ├── TextWindow.ui ├── UniformsModel.cpp ├── UniformsModel.h ├── ViewportWindow.cpp ├── ViewportWindow.h ├── ViewportWindow.ui ├── augen │ ├── Actorio.cpp │ ├── Actorio.h │ ├── Camera.cpp │ ├── Camera.h │ ├── ResourceManager.cpp │ ├── ResourceManager.h │ ├── Shader.cpp │ ├── Shader.h │ ├── ShaderPreprocessor.cpp │ └── ShaderPreprocessor.h ├── main.cpp ├── resources.qrc └── utils │ ├── debug.cpp │ ├── debug.h │ ├── fileutils.cpp │ ├── fileutils.h │ ├── misc.cpp │ ├── misc.h │ ├── strutils.cpp │ ├── strutils.h │ └── tplutils.h └── external ├── CMakeLists.txt ├── glad ├── CMakeLists.txt ├── include │ ├── KHR │ │ └── khrplatform.h │ └── glad │ │ └── glad.h └── src │ └── glad.c ├── glm ├── .appveyor.yml ├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── cmake │ ├── glm.pc.in │ ├── glmBuildConfig.cmake.in │ └── glmConfig.cmake.in ├── copying.txt ├── doc │ ├── api │ │ ├── a00001.html │ │ ├── a00001_source.html │ │ ├── a00002.html │ │ ├── a00002_source.html │ │ ├── a00003.html │ │ ├── a00003_source.html │ │ ├── a00004.html │ │ ├── a00004_source.html │ │ ├── a00005.html │ │ ├── a00005_source.html │ │ ├── a00006.html │ │ ├── a00006_source.html │ │ ├── a00007.html │ │ ├── a00007_source.html │ │ ├── a00008.html │ │ ├── a00008_source.html │ │ ├── a00009.html │ │ ├── a00009_source.html │ │ ├── a00010.html │ │ ├── a00010_source.html │ │ ├── a00011.html │ │ ├── a00011_source.html │ │ ├── a00012.html │ │ ├── a00012_source.html │ │ ├── a00013.html │ │ ├── a00013_source.html │ │ ├── a00014.html │ │ ├── a00014_source.html │ │ ├── a00015.html │ │ ├── a00015_source.html │ │ ├── a00016.html │ │ ├── a00016_source.html │ │ ├── a00017.html │ │ ├── a00017_source.html │ │ ├── a00018.html │ │ ├── a00018_source.html │ │ ├── a00019.html │ │ ├── a00019_source.html │ │ ├── a00020.html │ │ ├── a00020_source.html │ │ ├── a00021.html │ │ ├── a00021_source.html │ │ ├── a00022.html │ │ ├── a00022_source.html │ │ ├── a00023.html │ │ ├── a00023_source.html │ │ ├── a00024.html │ │ ├── a00024_source.html │ │ ├── a00025.html │ │ ├── a00025_source.html │ │ ├── a00026.html │ │ ├── a00026_source.html │ │ ├── a00027.html │ │ ├── a00027_source.html │ │ ├── a00028.html │ │ ├── a00028_source.html │ │ ├── a00029.html │ │ ├── a00029_source.html │ │ ├── a00030.html │ │ ├── a00030_source.html │ │ ├── a00031.html │ │ ├── a00031_source.html │ │ ├── a00032.html │ │ ├── a00032_source.html │ │ ├── a00033.html │ │ ├── a00033_source.html │ │ ├── a00034.html │ │ ├── a00034_source.html │ │ ├── a00035.html │ │ ├── a00035_source.html │ │ ├── a00036.html │ │ ├── a00036_source.html │ │ ├── a00037.html │ │ ├── a00037_source.html │ │ ├── a00038.html │ │ ├── a00038_source.html │ │ ├── a00039.html │ │ ├── a00039_source.html │ │ ├── a00040.html │ │ ├── a00040_source.html │ │ ├── a00041.html │ │ ├── a00041_source.html │ │ ├── a00042.html │ │ ├── a00042_source.html │ │ ├── a00043.html │ │ ├── a00043_source.html │ │ ├── a00044.html │ │ ├── a00044_source.html │ │ ├── a00045.html │ │ ├── a00045_source.html │ │ ├── a00046.html │ │ ├── a00046_source.html │ │ ├── a00047.html │ │ ├── a00047_source.html │ │ ├── a00048.html │ │ ├── a00048_source.html │ │ ├── a00049.html │ │ ├── a00049_source.html │ │ ├── a00050_source.html │ │ ├── a00051.html │ │ ├── a00051_source.html │ │ ├── a00052.html │ │ ├── a00052_source.html │ │ ├── a00053.html │ │ ├── a00053_source.html │ │ ├── a00054.html │ │ ├── a00054_source.html │ │ ├── a00055.html │ │ ├── a00055_source.html │ │ ├── a00056.html │ │ ├── a00056_source.html │ │ ├── a00057.html │ │ ├── a00057_source.html │ │ ├── a00058_source.html │ │ ├── a00059.html │ │ ├── a00059_source.html │ │ ├── a00060.html │ │ ├── a00060_source.html │ │ ├── a00061.html │ │ ├── a00061_source.html │ │ ├── a00062.html │ │ ├── a00062_source.html │ │ ├── a00063.html │ │ ├── a00063_source.html │ │ ├── a00064.html │ │ ├── a00064_source.html │ │ ├── a00065.html │ │ ├── a00065_source.html │ │ ├── a00066.html │ │ ├── a00066_source.html │ │ ├── a00067.html │ │ ├── a00067_source.html │ │ ├── a00068.html │ │ ├── a00068_source.html │ │ ├── a00069.html │ │ ├── a00069_source.html │ │ ├── a00070.html │ │ ├── a00070_source.html │ │ ├── a00071.html │ │ ├── a00071_source.html │ │ ├── a00072.html │ │ ├── a00072_source.html │ │ ├── a00073.html │ │ ├── a00073_source.html │ │ ├── a00074.html │ │ ├── a00074_source.html │ │ ├── a00075.html │ │ ├── a00075_source.html │ │ ├── a00076.html │ │ ├── a00076_source.html │ │ ├── a00077.html │ │ ├── a00077_source.html │ │ ├── a00078.html │ │ ├── a00078_source.html │ │ ├── a00079.html │ │ ├── a00079_source.html │ │ ├── a00080.html │ │ ├── a00080_source.html │ │ ├── a00081.html │ │ ├── a00081_source.html │ │ ├── a00082_source.html │ │ ├── a00083.html │ │ ├── a00083_source.html │ │ ├── a00084.html │ │ ├── a00084_source.html │ │ ├── a00085.html │ │ ├── a00085_source.html │ │ ├── a00086.html │ │ ├── a00086_source.html │ │ ├── a00087.html │ │ ├── a00087_source.html │ │ ├── a00088.html │ │ ├── a00088_source.html │ │ ├── a00089.html │ │ ├── a00089_source.html │ │ ├── a00090.html │ │ ├── a00090_source.html │ │ ├── a00091.html │ │ ├── a00091_source.html │ │ ├── a00092.html │ │ ├── a00092_source.html │ │ ├── a00093.html │ │ ├── a00093_source.html │ │ ├── a00094.html │ │ ├── a00094_source.html │ │ ├── a00095.html │ │ ├── a00095_source.html │ │ ├── a00096.html │ │ ├── a00096_source.html │ │ ├── a00097.html │ │ ├── a00097_source.html │ │ ├── a00098.html │ │ ├── a00098_source.html │ │ ├── a00099.html │ │ ├── a00099_source.html │ │ ├── a00100.html │ │ ├── a00100_source.html │ │ ├── a00101.html │ │ ├── a00101_source.html │ │ ├── a00102.html │ │ ├── a00102_source.html │ │ ├── a00103.html │ │ ├── a00103_source.html │ │ ├── a00104.html │ │ ├── a00104_source.html │ │ ├── a00105.html │ │ ├── a00105_source.html │ │ ├── a00106.html │ │ ├── a00106_source.html │ │ ├── a00107.html │ │ ├── a00107_source.html │ │ ├── a00108.html │ │ ├── a00108_source.html │ │ ├── a00109.html │ │ ├── a00109_source.html │ │ ├── a00110.html │ │ ├── a00110_source.html │ │ ├── a00111.html │ │ ├── a00111_source.html │ │ ├── a00112.html │ │ ├── a00112_source.html │ │ ├── a00113.html │ │ ├── a00113_source.html │ │ ├── a00114.html │ │ ├── a00114_source.html │ │ ├── a00115.html │ │ ├── a00115_source.html │ │ ├── a00116.html │ │ ├── a00116_source.html │ │ ├── a00117.html │ │ ├── a00117_source.html │ │ ├── a00118.html │ │ ├── a00118_source.html │ │ ├── a00119.html │ │ ├── a00119_source.html │ │ ├── a00120.html │ │ ├── a00120_source.html │ │ ├── a00121.html │ │ ├── a00121_source.html │ │ ├── a00122.html │ │ ├── a00122_source.html │ │ ├── a00123.html │ │ ├── a00123_source.html │ │ ├── a00124.html │ │ ├── a00124_source.html │ │ ├── a00125.html │ │ ├── a00125_source.html │ │ ├── a00126.html │ │ ├── a00126_source.html │ │ ├── a00127.html │ │ ├── a00127_source.html │ │ ├── a00128.html │ │ ├── a00128_source.html │ │ ├── a00129.html │ │ ├── a00129_source.html │ │ ├── a00130.html │ │ ├── a00130_source.html │ │ ├── a00131.html │ │ ├── a00131_source.html │ │ ├── a00132.html │ │ ├── a00132_source.html │ │ ├── a00133.html │ │ ├── a00133_source.html │ │ ├── a00134.html │ │ ├── a00134_source.html │ │ ├── a00135.html │ │ ├── a00135_source.html │ │ ├── a00136.html │ │ ├── a00136_source.html │ │ ├── a00137.html │ │ ├── a00137_source.html │ │ ├── a00138.html │ │ ├── a00138_source.html │ │ ├── a00139.html │ │ ├── a00139_source.html │ │ ├── a00140.html │ │ ├── a00140_source.html │ │ ├── a00146.html │ │ ├── a00147.html │ │ ├── a00148.html │ │ ├── a00149.html │ │ ├── a00150.html │ │ ├── a00151.html │ │ ├── a00152.html │ │ ├── a00153.html │ │ ├── a00154.html │ │ ├── a00155.html │ │ ├── a00156.html │ │ ├── a00157.html │ │ ├── a00158.html │ │ ├── a00159.html │ │ ├── a00160.html │ │ ├── a00161.html │ │ ├── a00162.html │ │ ├── a00163.html │ │ ├── a00164.html │ │ ├── a00165.html │ │ ├── a00166.html │ │ ├── a00167.html │ │ ├── a00168.html │ │ ├── a00169.html │ │ ├── a00170.html │ │ ├── a00171.html │ │ ├── a00172.html │ │ ├── a00173.html │ │ ├── a00174.html │ │ ├── a00175.html │ │ ├── a00176.html │ │ ├── a00177.html │ │ ├── a00178.html │ │ ├── a00179.html │ │ ├── a00180.html │ │ ├── a00181.html │ │ ├── a00182.html │ │ ├── a00183.html │ │ ├── a00184.html │ │ ├── a00185.html │ │ ├── a00186.html │ │ ├── a00187.html │ │ ├── a00188.html │ │ ├── a00189.html │ │ ├── a00190.html │ │ ├── a00191.html │ │ ├── a00192.html │ │ ├── a00193.html │ │ ├── a00194.html │ │ ├── a00195.html │ │ ├── a00196.html │ │ ├── a00197.html │ │ ├── a00198.html │ │ ├── a00199.html │ │ ├── a00200.html │ │ ├── a00201.html │ │ ├── a00202.html │ │ ├── a00203.html │ │ ├── a00204.html │ │ ├── a00205.html │ │ ├── a00206.html │ │ ├── a00207.html │ │ ├── a00208.html │ │ ├── a00209.html │ │ ├── a00210.html │ │ ├── a00211.html │ │ ├── a00212.html │ │ ├── a00213.html │ │ ├── a00214.html │ │ ├── a00215.html │ │ ├── a00216.html │ │ ├── a00217.html │ │ ├── a00218.html │ │ ├── a00219.html │ │ ├── a00220.html │ │ ├── a00221.html │ │ ├── a00222.html │ │ ├── a00223.html │ │ ├── a00224.html │ │ ├── a00225.html │ │ ├── a00226.html │ │ ├── a00227.html │ │ ├── a00228.html │ │ ├── a00229.html │ │ ├── a00230.html │ │ ├── a00231.html │ │ ├── a00232.html │ │ ├── a00233.html │ │ ├── a00234.html │ │ ├── a00235.html │ │ ├── a00236.html │ │ ├── a00237.html │ │ ├── a00238.html │ │ ├── arrowdown.png │ │ ├── arrowright.png │ │ ├── bc_s.png │ │ ├── bdwn.png │ │ ├── closed.png │ │ ├── dir_1f76e953200861345293ade84ac7fb6c.html │ │ ├── dir_275089585c7fc1b5fd5d7d42c69cb1da.html │ │ ├── dir_577c788b67d63fb3b3b5752bd495d0f2.html │ │ ├── dir_5ce58d942b2d0776e17a9a58abc01e04.html │ │ ├── dir_7b98f88bffbed4b390b5f8f520d9c08e.html │ │ ├── dir_8d176b5b7dd0ae42ea6876078f2bde49.html │ │ ├── dir_9440d7c11b99dcd7e5d369c7cf9802fe.html │ │ ├── dir_e29b03b892e0e25920d021a614d4db9b.html │ │ ├── dir_e529a619cfdec1fa4c331fb042fd332f.html │ │ ├── doc.png │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── dynsections.js │ │ ├── files.html │ │ ├── folderclosed.png │ │ ├── folderopen.png │ │ ├── index.html │ │ ├── jquery.js │ │ ├── logo.png │ │ ├── modules.html │ │ ├── nav_f.png │ │ ├── nav_g.png │ │ ├── nav_h.png │ │ ├── open.png │ │ ├── splitbar.png │ │ ├── sync_off.png │ │ ├── sync_on.png │ │ ├── tab_a.png │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_s.png │ │ └── tabs.css │ ├── glm.docx │ ├── glm.pdf │ ├── logo.png │ ├── man.doxy │ ├── pages.doxy │ └── theme │ │ ├── doxygen.css │ │ └── tabs.css ├── glm │ ├── CMakeLists.txt │ ├── common.hpp │ ├── detail │ │ ├── _features.hpp │ │ ├── _fixes.hpp │ │ ├── _noise.hpp │ │ ├── _swizzle.hpp │ │ ├── _swizzle_func.hpp │ │ ├── _vectorize.hpp │ │ ├── dummy.cpp │ │ ├── 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 │ ├── 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 │ │ ├── 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 ├── readme.md ├── test │ ├── CMakeLists.txt │ ├── bug │ │ ├── CMakeLists.txt │ │ └── bug_ms_vec_static.cpp │ ├── core │ │ ├── CMakeLists.txt │ │ ├── core_force_pure.cpp │ │ ├── core_force_unrestricted_gentype.cpp │ │ ├── core_func_common.cpp │ │ ├── core_func_exponential.cpp │ │ ├── core_func_geometric.cpp │ │ ├── core_func_integer.cpp │ │ ├── core_func_integer_bit_count.cpp │ │ ├── core_func_integer_find_lsb.cpp │ │ ├── core_func_integer_find_msb.cpp │ │ ├── core_func_matrix.cpp │ │ ├── core_func_noise.cpp │ │ ├── core_func_packing.cpp │ │ ├── core_func_swizzle.cpp │ │ ├── core_func_trigonometric.cpp │ │ ├── core_func_vector_relational.cpp │ │ ├── core_setup_force_cxx98.cpp │ │ ├── core_setup_message.cpp │ │ ├── core_setup_precision.cpp │ │ ├── core_type_aligned.cpp │ │ ├── core_type_cast.cpp │ │ ├── core_type_ctor.cpp │ │ ├── core_type_float.cpp │ │ ├── core_type_int.cpp │ │ ├── core_type_length.cpp │ │ ├── core_type_mat2x2.cpp │ │ ├── core_type_mat2x3.cpp │ │ ├── core_type_mat2x4.cpp │ │ ├── core_type_mat3x2.cpp │ │ ├── core_type_mat3x3.cpp │ │ ├── core_type_mat3x4.cpp │ │ ├── core_type_mat4x2.cpp │ │ ├── core_type_mat4x3.cpp │ │ ├── core_type_mat4x4.cpp │ │ ├── core_type_vec1.cpp │ │ ├── core_type_vec2.cpp │ │ ├── core_type_vec3.cpp │ │ └── core_type_vec4.cpp │ ├── external │ │ └── gli │ │ │ ├── CMakeLists.txt │ │ │ ├── core │ │ │ ├── dummy.cpp │ │ │ ├── generate_mipmaps.hpp │ │ │ ├── generate_mipmaps.inl │ │ │ ├── image2d.hpp │ │ │ ├── image2d.inl │ │ │ ├── operation.hpp │ │ │ ├── operation.inl │ │ │ ├── operator.hpp │ │ │ ├── operator.inl │ │ │ ├── shared_array.hpp │ │ │ ├── shared_array.inl │ │ │ ├── shared_ptr.hpp │ │ │ ├── shared_ptr.inl │ │ │ ├── size.hpp │ │ │ ├── size.inl │ │ │ ├── texture2d.hpp │ │ │ ├── texture2d.inl │ │ │ ├── texture2d_array.hpp │ │ │ ├── texture2d_array.inl │ │ │ ├── texture_cube.hpp │ │ │ ├── texture_cube.inl │ │ │ ├── texture_cube_array.hpp │ │ │ └── texture_cube_array.inl │ │ │ ├── gli.hpp │ │ │ └── gtx │ │ │ ├── compression.hpp │ │ │ ├── compression.inl │ │ │ ├── fetch.hpp │ │ │ ├── fetch.inl │ │ │ ├── gl_texture2d.hpp │ │ │ ├── gl_texture2d.inl │ │ │ ├── gradient.hpp │ │ │ ├── gradient.inl │ │ │ ├── loader.hpp │ │ │ ├── loader.inl │ │ │ ├── loader_dds10.hpp │ │ │ ├── loader_dds10.inl │ │ │ ├── loader_dds9.hpp │ │ │ ├── loader_dds9.inl │ │ │ ├── loader_tga.hpp │ │ │ ├── loader_tga.inl │ │ │ ├── wavelet.hpp │ │ │ └── wavelet.inl │ ├── glm.cppcheck │ ├── gtc │ │ ├── CMakeLists.txt │ │ ├── gtc_bitfield.cpp │ │ ├── gtc_color_space.cpp │ │ ├── gtc_constants.cpp │ │ ├── gtc_epsilon.cpp │ │ ├── gtc_functions.cpp │ │ ├── gtc_integer.cpp │ │ ├── gtc_matrix_access.cpp │ │ ├── gtc_matrix_integer.cpp │ │ ├── gtc_matrix_inverse.cpp │ │ ├── gtc_matrix_transform.cpp │ │ ├── gtc_noise.cpp │ │ ├── gtc_packing.cpp │ │ ├── gtc_quaternion.cpp │ │ ├── gtc_random.cpp │ │ ├── gtc_reciprocal.cpp │ │ ├── gtc_round.cpp │ │ ├── gtc_type_aligned.cpp │ │ ├── gtc_type_precision.cpp │ │ ├── gtc_type_ptr.cpp │ │ ├── gtc_ulp.cpp │ │ ├── gtc_user_defined_types.cpp │ │ └── gtc_vec1.cpp │ └── gtx │ │ ├── CMakeLists.txt │ │ ├── gtx.cpp │ │ ├── gtx_associated_min_max.cpp │ │ ├── gtx_closest_point.cpp │ │ ├── gtx_color_space.cpp │ │ ├── gtx_color_space_YCoCg.cpp │ │ ├── gtx_common.cpp │ │ ├── gtx_compatibility.cpp │ │ ├── gtx_component_wise.cpp │ │ ├── gtx_dual_quaternion.cpp │ │ ├── gtx_euler_angle.cpp │ │ ├── gtx_extend.cpp │ │ ├── gtx_extended_min_max.cpp │ │ ├── gtx_extented_min_max.cpp │ │ ├── gtx_fast_exponential.cpp │ │ ├── gtx_fast_square_root.cpp │ │ ├── gtx_fast_trigonometry.cpp │ │ ├── gtx_gradient_paint.cpp │ │ ├── gtx_handed_coordinate_space.cpp │ │ ├── gtx_int_10_10_10_2.cpp │ │ ├── gtx_integer.cpp │ │ ├── gtx_intersect.cpp │ │ ├── gtx_io.cpp │ │ ├── gtx_log_base.cpp │ │ ├── gtx_matrix_cross_product.cpp │ │ ├── gtx_matrix_decompose.cpp │ │ ├── gtx_matrix_interpolation.cpp │ │ ├── gtx_matrix_major_storage.cpp │ │ ├── gtx_matrix_operation.cpp │ │ ├── gtx_matrix_query.cpp │ │ ├── gtx_matrix_transform_2d.cpp │ │ ├── gtx_mixed_product.cpp │ │ ├── gtx_norm.cpp │ │ ├── gtx_normal.cpp │ │ ├── gtx_normalize_dot.cpp │ │ ├── gtx_number_precision.cpp │ │ ├── gtx_optimum_pow.cpp │ │ ├── gtx_orthonormalize.cpp │ │ ├── gtx_perpendicular.cpp │ │ ├── gtx_polar_coordinates.cpp │ │ ├── gtx_projection.cpp │ │ ├── gtx_quaternion.cpp │ │ ├── gtx_random.cpp │ │ ├── gtx_range.cpp │ │ ├── gtx_rotate_normalized_axis.cpp │ │ ├── gtx_rotate_vector.cpp │ │ ├── gtx_scalar_multiplication.cpp │ │ ├── gtx_scalar_relational.cpp │ │ ├── gtx_spline.cpp │ │ ├── gtx_string_cast.cpp │ │ ├── gtx_type_aligned.cpp │ │ ├── gtx_type_trait.cpp │ │ ├── gtx_vector_angle.cpp │ │ ├── gtx_vector_query.cpp │ │ └── gtx_wrap.cpp └── util │ ├── autoexp.txt │ ├── autoexp.vc2010.dat │ ├── conan-package │ ├── .gitignore │ ├── README.md │ ├── conanfile.py │ ├── lib_licenses │ │ ├── LICENSE1.txt │ │ └── LICENSE2.txt │ └── test_package │ │ ├── CMakeLists.txt │ │ ├── conanfile.py │ │ └── main.cpp │ ├── glm.natvis │ └── usertype.dat ├── json ├── CMakeLists.txt └── json.hpp └── upng ├── CMakeLists.txt ├── README.txt ├── upng.c └── upng.h /.gitignore: -------------------------------------------------------------------------------- 1 | build*/ 2 | Win32/ 3 | x64/ 4 | 5 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.6) 2 | project(RayStep) 3 | 4 | set(CMAKE_CXX_STANDARD 11) 5 | 6 | include(cmake/utils.cmake) 7 | add_subdirectory(src) 8 | 9 | # Define RayStep as startup project in VS 10 | set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT RayStep) 11 | 12 | #file(COPY share DESTINATION .) 13 | -------------------------------------------------------------------------------- /build-msvc15.bat: -------------------------------------------------------------------------------- 1 | mkdir build-msvc15 2 | cd build-msvc15 3 | cmake .. -G "Visual Studio 15 2017 Win64" -DQt5Widgets_DIR=E:\Qt\5.9.2\winrt_x64_msvc2017\lib\cmake\Qt5Widgets 4 | -------------------------------------------------------------------------------- /cmake/utils.cmake: -------------------------------------------------------------------------------- 1 | 2 | function(target_link_libraries_and_dll target lib) 3 | target_link_libraries(${target} ${lib}) 4 | add_custom_command( 5 | TARGET ${target} POST_BUILD 6 | COMMAND ${CMAKE_COMMAND} -E copy_if_different 7 | $ 8 | $ 9 | ) 10 | endfunction() 11 | -------------------------------------------------------------------------------- /doc/screenshot01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/doc/screenshot01.png -------------------------------------------------------------------------------- /share/images/ui-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-box.png -------------------------------------------------------------------------------- /share/images/ui-capsule.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-capsule.png -------------------------------------------------------------------------------- /share/images/ui-cone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-cone.png -------------------------------------------------------------------------------- /share/images/ui-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-custom.png -------------------------------------------------------------------------------- /share/images/ui-cylinder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-cylinder.png -------------------------------------------------------------------------------- /share/images/ui-cylinder8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-cylinder8.png -------------------------------------------------------------------------------- /share/images/ui-hexprism.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-hexprism.png -------------------------------------------------------------------------------- /share/images/ui-pyramid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-pyramid.png -------------------------------------------------------------------------------- /share/images/ui-sphere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-sphere.png -------------------------------------------------------------------------------- /share/images/ui-torus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-torus.png -------------------------------------------------------------------------------- /share/images/ui-torus82.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-torus82.png -------------------------------------------------------------------------------- /share/images/ui-torus88.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-torus88.png -------------------------------------------------------------------------------- /share/images/ui-triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/share/images/ui-triangle.png -------------------------------------------------------------------------------- /share/shaders/include/AppInfo-ubo.inc.glsl: -------------------------------------------------------------------------------- 1 | 2 | layout (std140) uniform AppInfo { 3 | vec2 iResolution; 4 | float iTime; 5 | float _pad_AppInfo; 6 | }; 7 | -------------------------------------------------------------------------------- /share/shaders/include/Camera-ubo.inc.glsl: -------------------------------------------------------------------------------- 1 | 2 | layout(std140) uniform Camera { 3 | mat4 viewMatrix; 4 | mat4 perspectiveMatrix; 5 | } camera; 6 | -------------------------------------------------------------------------------- /share/shaders/include/GameState-ssbo.inc.glsl: -------------------------------------------------------------------------------- 1 | 2 | layout(std140) buffer GameState { 3 | vec4 mouse; 4 | vec4 cameraPosition; 5 | float cameraZoom; 6 | float _pad[3]; 7 | } game; 8 | -------------------------------------------------------------------------------- /share/shaders/include/GameState-ubo.inc.glsl: -------------------------------------------------------------------------------- 1 | 2 | layout(std140) uniform GameState { 3 | vec4 mouse; 4 | vec4 cameraPosition; 5 | float cameraZoom; 6 | float _pad[3]; 7 | } game; 8 | -------------------------------------------------------------------------------- /share/shaders/init.comp.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; 3 | 4 | #include "include/AppInfo-ubo.inc.glsl" 5 | #include "include/GameState-ssbo.inc.glsl" 6 | 7 | void main() { 8 | game.cameraZoom = 1.8; 9 | game.cameraPosition = vec4(0.0); 10 | } 11 | -------------------------------------------------------------------------------- /share/shaders/manipulator.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | in vec3 vColor; 4 | 5 | layout (location = 0) out vec4 color; 6 | 7 | #include "include/AppInfo-ubo.inc.glsl" 8 | #include "include/GameState-ubo.inc.glsl" 9 | #include "include/Camera-ubo.inc.glsl" 10 | 11 | void main() { 12 | color = vec4(vColor, 1.0); 13 | } 14 | -------------------------------------------------------------------------------- /share/shaders/manipulator.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | layout (location = 0) in vec3 position; 4 | layout (location = 0) in vec3 color; 5 | 6 | out vec3 vColor; 7 | 8 | #include "include/AppInfo-ubo.inc.glsl" 9 | #include "include/GameState-ubo.inc.glsl" 10 | #include "include/Camera-ubo.inc.glsl" 11 | 12 | 13 | void main() { 14 | gl_Position = camera.perspectiveMatrix * camera.viewMatrix * vec4(position, 1.0); 15 | vColor = color; 16 | } 17 | -------------------------------------------------------------------------------- /share/shaders/map.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | layout (location = 0) out vec4 color; 4 | 5 | #include "include/AppInfo-ubo.inc.glsl" 6 | #include "include/GameState-ubo.inc.glsl" 7 | 8 | vec2 iMouse = game.cameraPosition; 9 | uniform sampler2D iChannel1; 10 | #include "include/map-generator.inc.glsl" 11 | 12 | void main() { 13 | vec2 uv = gl_FragCoord.xy / iResolution.xy; 14 | 15 | color = vec4(uv, 0.0, 1.0); 16 | 17 | if (length(gl_FragCoord.xy - game.cameraPosition.xy) < 5.0) { 18 | color = vec4(0.0, 0.0, 1.0, 1.0); 19 | } 20 | 21 | mainImage(color, gl_FragCoord.xy); 22 | } 23 | -------------------------------------------------------------------------------- /share/shaders/map.geo.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | layout(points) in; 4 | layout(triangle_strip, max_vertices = 3) out; 5 | 6 | void main() 7 | { 8 | gl_Position = vec4(-1.0, 3.0, 0.5, 1.0); 9 | EmitVertex(); 10 | 11 | gl_Position = vec4(3.0, -1.0, 0.5, 1.0); 12 | EmitVertex(); 13 | 14 | gl_Position = vec4(-1.0, -1.0, 0.5, 1.0); 15 | EmitVertex(); 16 | 17 | EndPrimitive(); 18 | } 19 | -------------------------------------------------------------------------------- /share/shaders/map.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | void main() { 4 | gl_Position = vec4(0.0); 5 | } 6 | -------------------------------------------------------------------------------- /share/shaders/mouse-move.comp.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; 3 | 4 | uniform vec2 mouse; 5 | 6 | #include "include/AppInfo-ubo.inc.glsl" 7 | #include "include/GameState-ssbo.inc.glsl" 8 | 9 | void main() { 10 | game.mouse.xy = vec2(mouse.x, iResolution.y - mouse.y); 11 | } 12 | -------------------------------------------------------------------------------- /share/shaders/mouse-scroll.comp.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; 3 | 4 | uniform vec2 scroll; 5 | 6 | #include "include/AppInfo-ubo.inc.glsl" 7 | #include "include/GameState-ssbo.inc.glsl" 8 | 9 | void main() { 10 | game.mouse.zw = scroll.xy; 11 | } 12 | -------------------------------------------------------------------------------- /share/shaders/render.frag.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | layout (location = 0) out vec4 color; 4 | 5 | #include "include/AppInfo-ubo.inc.glsl" 6 | #include "include/GameState-ubo.inc.glsl" 7 | #include "include/Camera-ubo.inc.glsl" 8 | 9 | #include "sys:raystep-uniforms" 10 | 11 | vec2 iMouse = game.cameraPosition.xy; 12 | uniform sampler2D iChannel1; 13 | #include "include/templated-ray-marcher.inc.glsl" 14 | 15 | void main() { 16 | vec2 uv = gl_FragCoord.xy / iResolution.xy; 17 | 18 | mainImage(color, gl_FragCoord.xy); 19 | } 20 | -------------------------------------------------------------------------------- /share/shaders/render.geo.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | layout(points) in; 4 | layout(triangle_strip, max_vertices = 3) out; 5 | 6 | void main() 7 | { 8 | gl_Position = vec4(-1.0, 3.0, 0.5, 1.0); 9 | EmitVertex(); 10 | 11 | gl_Position = vec4(3.0, -1.0, 0.5, 1.0); 12 | EmitVertex(); 13 | 14 | gl_Position = vec4(-1.0, -1.0, 0.5, 1.0); 15 | EmitVertex(); 16 | 17 | EndPrimitive(); 18 | } 19 | -------------------------------------------------------------------------------- /share/shaders/render.vert.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | 3 | void main() { 4 | gl_Position = vec4(0.0); 5 | } 6 | -------------------------------------------------------------------------------- /share/shaders/update.comp.glsl: -------------------------------------------------------------------------------- 1 | #version 450 core 2 | layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in; 3 | 4 | #include "include/AppInfo-ubo.inc.glsl" 5 | #include "include/GameState-ssbo.inc.glsl" 6 | 7 | uniform float speed = 0.05; 8 | 9 | void main() { 10 | float speedModifier = 1.0 / (0.5 + game.cameraZoom); 11 | float actualSpeed = speed * speedModifier; 12 | 13 | if (game.mouse.x < 100) { 14 | game.cameraPosition.x -= actualSpeed; 15 | } else if (game.mouse.x > iResolution.x - 100) { 16 | game.cameraPosition.x += actualSpeed; 17 | } 18 | 19 | if (game.mouse.y < 100) { 20 | game.cameraPosition.y -= actualSpeed; 21 | } else if (game.mouse.y > iResolution.y - 100) { 22 | game.cameraPosition.y += actualSpeed; 23 | } 24 | 25 | game.cameraZoom = clamp(game.cameraZoom + game.mouse.w * 0.1, 0.3, 2.0); 26 | game.mouse.zw = vec2(0.0); 27 | } 28 | -------------------------------------------------------------------------------- /share/styles/default.css: -------------------------------------------------------------------------------- 1 | * { 2 | background-color: rgb(114, 114, 114); 3 | border-top-color: rgb(122, 122, 122); 4 | border-left-color: rgb(122, 122, 122); 5 | border-bottom-color: rgb(92, 92, 92); 6 | border-right-color: rgb(92, 92, 92); 7 | color: rgb(0, 0, 0); 8 | } 9 | 10 | QPlainTextEdit { 11 | background-color: rgb(164, 164, 164); 12 | } 13 | 14 | QPushButton { 15 | background-color: qlineargradient(spread: pad, x1 : 0, y1 : 0, x2 : 0, y2 : 1, stop: 0 rgba(164, 164, 164, 255), stop: 1 rgba(138, 138, 138, 255)); 16 | border-style: outset; 17 | border-width: 1px; 18 | border-radius: 5px; 19 | border-color: rgb(57, 57, 57); 20 | padding: 4px; 21 | } 22 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | add_subdirectory(external) 3 | add_subdirectory(RayStep) 4 | -------------------------------------------------------------------------------- /src/RayStep/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Automatically generate moc files for Qt 2 | set(CMAKE_AUTOMOC ON) 3 | set(CMAKE_AUTOUIC ON) 4 | set(CMAKE_AUTORCC ON) 5 | find_package(Qt5Widgets) 6 | if(Qt5Widgets_FOUND) 7 | message("Using Qt ${Qt5Widgets_VERSION} from ${Qt5Widgets_INCLUDE_DIRS}") 8 | endif() 9 | 10 | add_executable( 11 | RayStep 12 | resources.qrc 13 | ResourceManager.h 14 | Logger.h 15 | Logger.cpp 16 | utils/strutils.h 17 | utils/strutils.cpp 18 | utils/fileutils.h 19 | utils/fileutils.cpp 20 | Future.h 21 | MainWindow.h 22 | MainWindow.ui 23 | MainWindow.cpp 24 | ViewportWindow.h 25 | ViewportWindow.ui 26 | ViewportWindow.cpp 27 | TextWindow.h 28 | TextWindow.ui 29 | TextWindow.cpp 30 | RenderWidget.h 31 | RenderWidget.cpp 32 | SceneTreeModel.h 33 | SceneTreeModel.cpp 34 | SceneGraph.h 35 | SceneGraph.cpp 36 | NodePropertiesModel.h 37 | NodePropertiesModel.cpp 38 | SceneTreeView.h 39 | SceneTreeView.cpp 40 | SceneGraphIntrospector.h 41 | SceneGraphIntrospector.cpp 42 | UniformsModel.h 43 | UniformsModel.cpp 44 | 45 | augen/ResourceManager.h 46 | augen/ResourceManager.cpp 47 | augen/Shader.h 48 | augen/Shader.cpp 49 | augen/ShaderPreprocessor.h 50 | augen/ShaderPreprocessor.cpp 51 | augen/Actorio.h 52 | augen/Actorio.cpp 53 | augen/Camera.h 54 | augen/Camera.cpp 55 | 56 | main.cpp 57 | ) 58 | 59 | include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 60 | 61 | target_link_libraries(RayStep glad) 62 | target_link_libraries(RayStep glm) 63 | target_link_libraries(RayStep upng) 64 | target_link_libraries(RayStep json) 65 | 66 | target_link_libraries_and_dll(RayStep Qt5::Core) 67 | target_link_libraries_and_dll(RayStep Qt5::Gui) 68 | target_link_libraries_and_dll(RayStep Qt5::Widgets) 69 | -------------------------------------------------------------------------------- /src/RayStep/MainWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | #include "ui_MainWindow.h" 3 | 4 | #include "augen/Actorio.h" 5 | #include "Logger.h" 6 | #include "UniformsModel.h" 7 | 8 | #include 9 | #include 10 | 11 | MainWindow::MainWindow(QWidget *parent) 12 | : QMainWindow(parent) 13 | , ui(new Ui::MainWindow) 14 | { 15 | ui->setupUi(this); 16 | 17 | connect(ui->actionQuit, &QAction::triggered, this, &QWidget::close); 18 | connect(ui->actionOpen, &QAction::triggered, this, &MainWindow::showOpenFileDialog); 19 | 20 | connect(ui->text, &TextWindow::submitted, this, &MainWindow::updateShader); 21 | connect(ui->text->uniformsModel(), &UniformsModel::valueChanged, this, &MainWindow::updateUniform); 22 | 23 | ui->splitter->setSizes(QList() << 200 << 100); 24 | 25 | // demo 26 | ui->text->load("E:/SourceCode/Piced/share/shaders/include/default-scene.inc.glsl"); 27 | } 28 | 29 | MainWindow::~MainWindow() 30 | { 31 | } 32 | 33 | void MainWindow::showOpenFileDialog() 34 | { 35 | QString fileName = QFileDialog::getOpenFileName(this, tr("Open Shader"), "", tr("Shader Files (*.txt *.glsl)")); 36 | ui->text->load(fileName); 37 | } 38 | 39 | 40 | void MainWindow::updateShader() 41 | { 42 | Actorio *actorio = ui->viewport->actorio(); 43 | if (actorio) { 44 | std::string content = ui->text->content().toStdString(); 45 | std::string uniforms = ui->text->uniforms().toStdString(); 46 | DEBUG_LOG << content; 47 | actorio->updateShader(content, uniforms); 48 | } 49 | } 50 | 51 | 52 | void MainWindow::updateUniform(std::string name, float value) 53 | { 54 | Actorio *actorio = ui->viewport->actorio(); 55 | if (actorio) { 56 | actorio->setUniform(name, value); 57 | } 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/RayStep/MainWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | namespace Ui { 6 | class MainWindow; 7 | } 8 | 9 | class MainWindow : 10 | public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit MainWindow(QWidget *parent = 0); 16 | ~MainWindow(); 17 | 18 | private slots: 19 | void showOpenFileDialog(); 20 | void updateShader(); 21 | void updateUniform(std::string name, float value); 22 | 23 | private: 24 | Ui::MainWindow *ui; 25 | float m_scale; 26 | }; 27 | 28 | -------------------------------------------------------------------------------- /src/RayStep/OutlinerTreeView.cpp: -------------------------------------------------------------------------------- 1 | #include "OutlinerTreeView.h" 2 | 3 | OutlinerTreeView::OutlinerTreeView(QWidget *parent) 4 | : QTreeView(parent) 5 | { 6 | 7 | } 8 | 9 | OutlinerTreeView::~OutlinerTreeView() 10 | { 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/RayStep/OutlinerTreeView.h: -------------------------------------------------------------------------------- 1 | #ifndef H_OUTLINERTREEVIEW 2 | #define H_OUTLINERTREEVIEW 3 | 4 | #include 5 | 6 | class OutlinerTreeView : public QTreeView 7 | { 8 | public: 9 | explicit OutlinerTreeView(QWidget *parent = 0); 10 | ~OutlinerTreeView(); 11 | }; 12 | 13 | #endif // H_OUTLINERTREEVIEW 14 | -------------------------------------------------------------------------------- /src/RayStep/RenderWidget.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class Actorio; 6 | 7 | class RenderWidget : public QOpenGLWidget 8 | { 9 | Q_OBJECT; 10 | public: 11 | explicit RenderWidget(QWidget *parent = 0); 12 | 13 | inline Actorio *actorio() const { return m_actorio; } 14 | 15 | protected: 16 | void initializeGL() override; 17 | void resizeGL(int w, int h) override; 18 | void paintGL() override; 19 | 20 | void mousePressEvent(QMouseEvent *event) override; 21 | void mouseReleaseEvent(QMouseEvent *event) override; 22 | void mouseMoveEvent(QMouseEvent *event) override; 23 | void wheelEvent(QWheelEvent *event) override; 24 | void keyPressEvent(QKeyEvent *event) override; 25 | 26 | private slots: 27 | void render(); 28 | 29 | private: 30 | static int Q2AButton(Qt::MouseButton qButton); 31 | 32 | private: 33 | Actorio *m_actorio; 34 | float m_time; 35 | QTimer *m_renderTimer; 36 | bool m_isRotation; 37 | }; 38 | -------------------------------------------------------------------------------- /src/RayStep/SceneTreeView.cpp: -------------------------------------------------------------------------------- 1 | #include "SceneTreeView.h" 2 | #include "SceneTreeModel.h" 3 | #include "SceneGraph.h" 4 | #include "Logger.h" 5 | 6 | #include 7 | #include 8 | 9 | SceneTreeView::SceneTreeView(QWidget *parent) 10 | : QTreeView(parent) 11 | { 12 | createAction(); 13 | } 14 | 15 | SceneTreeView::~SceneTreeView() 16 | { 17 | } 18 | 19 | void SceneTreeView::setModel(QAbstractItemModel *model) 20 | { 21 | ERR_LOG << "SceneTreeView only accepts SceneTreeModel objects as model"; 22 | } 23 | 24 | void SceneTreeView::setModel(SceneTreeModel *model) 25 | { 26 | QTreeView::setModel(model); 27 | } 28 | 29 | SceneTreeModel *SceneTreeView::sceneTreeModel() 30 | { 31 | return static_cast(model()); 32 | } 33 | 34 | void SceneTreeView::createAction() 35 | { 36 | m_addPrimitiveAction = new QAction(tr("Add primitive"), this); 37 | connect(m_addPrimitiveAction, &QAction::triggered, this, &SceneTreeView::addPrimitive); 38 | m_addOperationAction = new QAction(tr("Add operator"), this); 39 | connect(m_addOperationAction, &QAction::triggered, this, &SceneTreeView::addOperation); 40 | } 41 | 42 | void SceneTreeView::contextMenuEvent(QContextMenuEvent *event) 43 | { 44 | m_ctxIndex = indexAt(event->pos()); 45 | 46 | QMenu menu(this); 47 | menu.addAction(m_addPrimitiveAction); 48 | menu.addAction(m_addOperationAction); 49 | menu.exec(event->globalPos()); 50 | } 51 | 52 | void SceneTreeView::addPrimitive() 53 | { 54 | auto *node = new ScenePrimitiveNode(); 55 | node->setName("New primitive"); 56 | node->setSource("vec2( sdTorus( pos-vec3( 0.0,0.25, 1.0), vec2(0.20,0.05) ), 25.0 )"); 57 | sceneTreeModel()->insertExistingRow(node, m_ctxIndex.row(), m_ctxIndex.parent()); 58 | } 59 | 60 | void SceneTreeView::addOperation() 61 | { 62 | auto *node = new SceneOperationNode(); 63 | node->setName("New operation"); 64 | node->setOperation(SceneOperationNode::UnionOp); 65 | sceneTreeModel()->insertExistingRow(node, m_ctxIndex.row(), m_ctxIndex.parent()); 66 | } 67 | -------------------------------------------------------------------------------- /src/RayStep/SceneTreeView.h: -------------------------------------------------------------------------------- 1 | #ifndef H_SCENETREEVIEW 2 | #define H_SCENETREEVIEW 3 | 4 | #include 5 | 6 | class SceneTreeModel; 7 | 8 | class SceneTreeView : public QTreeView 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | explicit SceneTreeView(QWidget *parent = 0); 14 | ~SceneTreeView(); 15 | 16 | void setModel(QAbstractItemModel *model) override; 17 | void setModel(SceneTreeModel *model); 18 | SceneTreeModel *sceneTreeModel(); 19 | 20 | protected: 21 | void contextMenuEvent(QContextMenuEvent *event) override; 22 | 23 | private: 24 | void createAction(); 25 | 26 | private slots: 27 | void addPrimitive(); 28 | void addOperation(); 29 | 30 | private: 31 | QAction *m_addPrimitiveAction; 32 | QAction *m_addOperationAction; 33 | QModelIndex m_ctxIndex; 34 | }; 35 | 36 | #endif // H_SCENETREEVIEW 37 | -------------------------------------------------------------------------------- /src/RayStep/TextWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "TextWindow.h" 2 | #include "ui_TextWindow.h" 3 | 4 | #include "SceneGraph.h" 5 | #include "SceneTreeModel.h" 6 | #include "NodePropertiesModel.h" 7 | #include "UniformsModel.h" 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | TextWindow::TextWindow(QWidget *parent) 14 | : QWidget(parent) 15 | , ui(new Ui::TextWindow) 16 | { 17 | ui->setupUi(this); 18 | 19 | m_scene = new SceneTree; 20 | m_model = new SceneTreeModel(m_scene); 21 | ui->outliner->setModel(m_model); 22 | ui->outliner->expandAll(); 23 | 24 | m_propertiesModel = new NodePropertiesModel(); 25 | m_propertiesModel->setSourceModel(m_model); 26 | m_propertiesModel->setSourceSelectionModel(ui->outliner->selectionModel()); 27 | ui->propertiesView->setModel(m_propertiesModel); 28 | ui->propertiesView->expandAll(); 29 | 30 | m_uniformsModel = new UniformsModel(); 31 | ui->uniformsView->setModel(m_uniformsModel); 32 | 33 | connect(ui->submitButton, &QPushButton::clicked, this, &TextWindow::submitted); 34 | } 35 | 36 | TextWindow::~TextWindow() 37 | { 38 | } 39 | 40 | void TextWindow::load(const QString & filename) 41 | { 42 | QFile file(filename); 43 | if (!file.open(QIODevice::ReadOnly)) { 44 | QMessageBox::information(0, "error", file.errorString()); 45 | } 46 | 47 | QTextStream in(&file); 48 | 49 | QString content = in.readAll(); 50 | Q_UNUSED(content) 51 | // TODO: make an actual file format and loading 52 | 53 | file.close(); 54 | } 55 | 56 | QString TextWindow::content() const 57 | { 58 | return QString::fromStdString(m_scene->compileToGlsl("scene")); 59 | } 60 | 61 | QString TextWindow::uniforms() const 62 | { 63 | return QString::fromStdString(m_uniformsModel->compileToGlsl()); 64 | } 65 | -------------------------------------------------------------------------------- /src/RayStep/TextWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef H_TEXTWINDOW 2 | #define H_TEXTWINDOW 3 | 4 | #include 5 | 6 | class SceneTree; 7 | class SceneTreeModel; 8 | class NodePropertiesModel; 9 | class UniformsModel; 10 | 11 | namespace Ui { 12 | class TextWindow; 13 | } 14 | 15 | /** 16 | * TODO: It should not be this class that owns all the models 17 | */ 18 | 19 | class TextWindow : 20 | public QWidget 21 | { 22 | Q_OBJECT 23 | 24 | public: 25 | explicit TextWindow(QWidget *parent = 0); 26 | ~TextWindow(); 27 | 28 | // Arguments needed to generate the shader (to be gathered in a single accessor?) 29 | QString content() const; 30 | QString uniforms() const; 31 | 32 | const UniformsModel *uniformsModel() const { return m_uniformsModel; } 33 | 34 | public slots: 35 | void load(const QString & filename); 36 | 37 | signals: 38 | void submitted(); 39 | 40 | private: 41 | Ui::TextWindow *ui; 42 | SceneTree *m_scene; 43 | SceneTreeModel *m_model; 44 | NodePropertiesModel *m_propertiesModel; 45 | UniformsModel *m_uniformsModel; 46 | }; 47 | 48 | #endif // H_TEXTWINDOW 49 | -------------------------------------------------------------------------------- /src/RayStep/TextWindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | TextWindow 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 557 11 | 12 | 13 | 14 | Text 15 | 16 | 17 | 18 | 2 19 | 20 | 21 | 2 22 | 23 | 24 | 2 25 | 26 | 27 | 2 28 | 29 | 30 | 2 31 | 32 | 33 | 34 | 35 | true 36 | 37 | 38 | QAbstractItemView::DragDrop 39 | 40 | 41 | Qt::CopyAction 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | Update 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | SceneTreeView 63 | QTreeView 64 |
SceneTreeView.h
65 |
66 |
67 | 68 | 69 |
70 | -------------------------------------------------------------------------------- /src/RayStep/UniformsModel.h: -------------------------------------------------------------------------------- 1 | #ifndef H_UNIFORMSMODEL 2 | #define H_UNIFORMSMODEL 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | #include 9 | 10 | /// TODO: support different types of uniforms 11 | class UniformsModel : public QAbstractItemModel 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | struct Uniform 17 | { 18 | std::string name; 19 | float value; 20 | 21 | Uniform(const std::string & _name, float _value) { name = _name; value = _value; } 22 | }; 23 | 24 | public: 25 | explicit UniformsModel(QObject *parent = Q_NULLPTR); 26 | ~UniformsModel(); 27 | 28 | // Read access 29 | QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; 30 | QModelIndex parent(const QModelIndex &index) const override; 31 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 32 | int columnCount(const QModelIndex &parent = QModelIndex()) const override; 33 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 34 | 35 | QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; 36 | 37 | // Editable items 38 | Qt::ItemFlags flags(const QModelIndex &index) const override; 39 | bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; 40 | 41 | std::string compileToGlsl() const; 42 | 43 | signals: 44 | void valueChanged(std::string name, float value); 45 | 46 | private: 47 | QList m_uniforms; 48 | }; 49 | 50 | 51 | #endif // H_UNIFORMSMODEL 52 | -------------------------------------------------------------------------------- /src/RayStep/ViewportWindow.cpp: -------------------------------------------------------------------------------- 1 | #include "ViewportWindow.h" 2 | #include "ui_ViewportWindow.h" 3 | 4 | #include 5 | 6 | ViewportWindow::ViewportWindow(QWidget *parent) 7 | : QWidget(parent) 8 | , ui(new Ui::ViewportWindow) 9 | { 10 | ui->setupUi(this); 11 | } 12 | 13 | ViewportWindow::~ViewportWindow() 14 | { 15 | } 16 | 17 | Actorio *ViewportWindow::actorio() const 18 | { 19 | return ui->render->actorio(); 20 | } 21 | -------------------------------------------------------------------------------- /src/RayStep/ViewportWindow.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | class Actorio; 6 | 7 | namespace Ui { 8 | class ViewportWindow; 9 | } 10 | 11 | class ViewportWindow : 12 | public QWidget 13 | { 14 | Q_OBJECT 15 | 16 | public: 17 | explicit ViewportWindow(QWidget *parent = 0); 18 | ~ViewportWindow(); 19 | 20 | Actorio *actorio() const; 21 | 22 | private: 23 | Ui::ViewportWindow *ui; 24 | }; 25 | 26 | -------------------------------------------------------------------------------- /src/RayStep/augen/Camera.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | class Camera 8 | { 9 | public: 10 | Camera(); 11 | ~Camera(); 12 | void mouseMoveRotation(float dx, float dy); 13 | void mouseMovePanning(float dx, float dy); 14 | void mouseScroll(float dx, float dy); 15 | void viewportResize(float w, float h); 16 | void updateCameraViewMatrix(); 17 | void updateCameraProjectionMatrix(); 18 | 19 | inline GLuint ubo() const { return m_ubo; } 20 | 21 | private: 22 | float m_sensitivity, m_panningSensitivity, m_zoomSensitivity; 23 | float m_viewportWidth, m_viewportHeight; 24 | glm::mat4 m_viewMatrix, m_perspectiveMatrix; 25 | glm::quat m_quat; 26 | float m_zoom; 27 | glm::vec3 m_center; 28 | GLuint m_ubo; 29 | }; 30 | 31 | -------------------------------------------------------------------------------- /src/RayStep/augen/ResourceManager.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class ResourceManager { 7 | public: 8 | static bool loadTexture(GLuint tex, const std::string & filename, GLenum internalformat = GL_RGBA8); 9 | static bool loadTexture(GLuint tex, const unsigned char* data, size_t length, GLenum internalformat = GL_RGBA8); 10 | }; 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/RayStep/augen/ShaderPreprocessor.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/augen/ShaderPreprocessor.cpp -------------------------------------------------------------------------------- /src/RayStep/augen/ShaderPreprocessor.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/augen/ShaderPreprocessor.h -------------------------------------------------------------------------------- /src/RayStep/main.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | QString loadCss(const QString & filename); 8 | 9 | /* 10 | * Roadmap : 11 | * - Add uniforms 12 | * - Add transforms 13 | * - Add drag n drop primitives 14 | */ 15 | 16 | int main(int argc, char *argv[]) 17 | { 18 | QApplication a(argc, argv); 19 | a.setStyleSheet(loadCss(":styles/default.css")); 20 | 21 | MainWindow w; 22 | w.show(); 23 | 24 | return a.exec(); 25 | } 26 | 27 | QString loadCss(const QString & filename) 28 | { 29 | QFile file(filename); 30 | file.open(QIODevice::ReadOnly); 31 | QTextStream in(&file); 32 | QString s = in.readAll(); 33 | file.close(); 34 | return s; 35 | } -------------------------------------------------------------------------------- /src/RayStep/resources.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | ../../share/images/ui-sphere.png 4 | ../../share/images/ui-box.png 5 | ../../share/images/ui-custom.png 6 | ../../share/images/ui-capsule.png 7 | ../../share/images/ui-cone.png 8 | ../../share/images/ui-cylinder.png 9 | ../../share/images/ui-cylinder8.png 10 | ../../share/images/ui-hexprism.png 11 | ../../share/images/ui-pyramid.png 12 | ../../share/images/ui-torus.png 13 | ../../share/images/ui-torus82.png 14 | ../../share/images/ui-torus88.png 15 | ../../share/images/ui-triangle.png 16 | 17 | ../../share/styles/default.css 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/RayStep/utils/debug.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/debug.cpp -------------------------------------------------------------------------------- /src/RayStep/utils/debug.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/debug.h -------------------------------------------------------------------------------- /src/RayStep/utils/fileutils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/fileutils.cpp -------------------------------------------------------------------------------- /src/RayStep/utils/fileutils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/fileutils.h -------------------------------------------------------------------------------- /src/RayStep/utils/misc.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/misc.cpp -------------------------------------------------------------------------------- /src/RayStep/utils/misc.h: -------------------------------------------------------------------------------- 1 | // ************************************************** 2 | // Author : Élie Michel 3 | // UNPUBLISHED CODE. 4 | // Copyright (C) 2017 Élie Michel. 5 | // ************************************************** 6 | 7 | #pragma once 8 | 9 | constexpr auto PI = 3.1415926535897932384626433f; 10 | 11 | int log2(int i); 12 | -------------------------------------------------------------------------------- /src/RayStep/utils/strutils.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/strutils.cpp -------------------------------------------------------------------------------- /src/RayStep/utils/strutils.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/RayStep/utils/strutils.h -------------------------------------------------------------------------------- /src/external/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Glad 2 | add_subdirectory(glad) 3 | set_property(TARGET glad PROPERTY FOLDER "External") 4 | 5 | # glm (0.9.8.5) 6 | add_subdirectory(glm) 7 | #set_property(TARGET glm_dummy PROPERTY FOLDER "External") 8 | 9 | # uPNG 10 | add_subdirectory(upng) 11 | set_property(TARGET upng PROPERTY FOLDER "External") 12 | 13 | # json 14 | add_subdirectory(json) 15 | #set_property(TARGET json PROPERTY FOLDER "External") 16 | -------------------------------------------------------------------------------- /src/external/glad/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_library( 2 | glad 3 | STATIC 4 | include/glad/glad.h 5 | src/glad.c 6 | ) 7 | 8 | target_include_directories( 9 | glad 10 | PUBLIC 11 | ${CMAKE_CURRENT_SOURCE_DIR}/include 12 | ) 13 | -------------------------------------------------------------------------------- /src/external/glm/.appveyor.yml: -------------------------------------------------------------------------------- 1 | clone_folder: c:\dev\glm-cmake 2 | 3 | os: 4 | - Visual Studio 2013 5 | 6 | platform: 7 | - x86 8 | - x86_64 9 | 10 | build_script: 11 | - md build_pure_11 12 | - cd build_pure_11 13 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON -DGLM_TEST_FORCE_PURE=ON .. 14 | - cmake --build . --config Debug 15 | - cmake --build . --config Release 16 | - cd .. 17 | - md build_simd_11 18 | - cd build_simd_11 19 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_LANG_EXTENSIONS=ON .. 20 | - cmake --build . --config Debug 21 | - cmake --build . --config Release 22 | - cd .. 23 | - md build_pure_98 24 | - cd build_pure_98 25 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON -DGLM_TEST_FORCE_PURE=ON .. 26 | - cmake --build . --config Debug 27 | - cmake --build . --config Release 28 | - cd .. 29 | - md build_simd_98 30 | - cd build_simd_98 31 | - cmake -DCMAKE_CXX_COMPILER=$COMPILER -DGLM_TEST_ENABLE=ON -DGLM_TEST_ENABLE_CXX_98=ON .. 32 | - cmake --build . --config Debug 33 | - cmake --build . --config Release 34 | - cd .. 35 | -------------------------------------------------------------------------------- /src/external/glm/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files 2 | *.slo 3 | *.lo 4 | *.o 5 | *.obj 6 | 7 | # Precompiled Headers 8 | *.gch 9 | *.pch 10 | 11 | # Compiled Dynamic libraries 12 | *.so 13 | *.dylib 14 | *.dll 15 | 16 | # Fortran module files 17 | *.mod 18 | 19 | # Compiled Static libraries 20 | *.lai 21 | *.la 22 | *.a 23 | *.lib 24 | 25 | # Executables 26 | *.exe 27 | *.out 28 | *.app 29 | 30 | # CMake 31 | CMakeCache.txt 32 | CMakeFiles 33 | cmake_install.cmake 34 | install_manifest.txt 35 | *.cmake 36 | # ^ May need to add future .cmake files as exceptions 37 | 38 | # Test logs 39 | Testing/* 40 | 41 | # Test input 42 | test/gtc/*.dds 43 | 44 | # Project Files 45 | Makefile 46 | *.cbp 47 | *.user 48 | 49 | # Misc. 50 | *.log 51 | 52 | # local build(s) 53 | build* 54 | 55 | -------------------------------------------------------------------------------- /src/external/glm/cmake/glm.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | includedir=${prefix}/include 3 | 4 | Name: GLM 5 | Description: OpenGL Mathematics 6 | Version: @GLM_VERSION@ 7 | Cflags: -I${includedir} 8 | -------------------------------------------------------------------------------- /src/external/glm/cmake/glmBuildConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(GLM_VERSION "@GLM_VERSION@") 2 | set(GLM_INCLUDE_DIRS "@CMAKE_CURRENT_SOURCE_DIR@") 3 | 4 | if (NOT CMAKE_VERSION VERSION_LESS "3.0") 5 | include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") 6 | endif() 7 | -------------------------------------------------------------------------------- /src/external/glm/cmake/glmConfig.cmake.in: -------------------------------------------------------------------------------- 1 | set(GLM_VERSION "@GLM_VERSION@") 2 | 3 | @PACKAGE_INIT@ 4 | 5 | set_and_check(GLM_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") 6 | 7 | if (NOT CMAKE_VERSION VERSION_LESS "3.0") 8 | include("${CMAKE_CURRENT_LIST_DIR}/glmTargets.cmake") 9 | endif() 10 | -------------------------------------------------------------------------------- /src/external/glm/doc/api/arrowdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/arrowdown.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/arrowright.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/arrowright.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/bc_s.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/bdwn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/bdwn.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/closed.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/doc.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/doxygen.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/folderclosed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/folderclosed.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/folderopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/folderopen.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/logo.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/nav_f.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/nav_g.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/nav_g.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/nav_h.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/open.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/splitbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/splitbar.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/sync_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/sync_off.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/sync_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/sync_on.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/tab_a.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/tab_b.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/tab_h.png -------------------------------------------------------------------------------- /src/external/glm/doc/api/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/api/tab_s.png -------------------------------------------------------------------------------- /src/external/glm/doc/glm.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/glm.docx -------------------------------------------------------------------------------- /src/external/glm/doc/glm.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/glm.pdf -------------------------------------------------------------------------------- /src/external/glm/doc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/doc/logo.png -------------------------------------------------------------------------------- /src/external/glm/glm/common.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/common.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_common.hpp" 7 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/glm/detail/func_trigonometric_simd.inl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eliemichel/RayStep/341bb049439ea9ce440c64a3715130365f7e84ba/src/external/glm/glm/detail/func_trigonometric_simd.inl -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/glm/detail/type_mat.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_mat.inl 3 | 4 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/glm/detail/type_vec.inl: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/detail/type_vec.inl 3 | -------------------------------------------------------------------------------- /src/external/glm/glm/exponential.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/exponential.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_exponential.hpp" 7 | -------------------------------------------------------------------------------- /src/external/glm/glm/geometric.hpp: -------------------------------------------------------------------------------- 1 | /// @ref core 2 | /// @file glm/geometric.hpp 3 | 4 | #pragma once 5 | 6 | #include "detail/func_geometric.hpp" 7 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtc/type_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_swizzle 2 | /// @file glm/gtc/swizzle.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtc/vec1.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtc_vec1 2 | /// @file glm/gtc/vec1.inl 3 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 | -------------------------------------------------------------------------------- /src/external/glm/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 matrixCross3 8 | ( 9 | tvec3 const & x 10 | ) 11 | { 12 | tmat3x3 Result(T(0)); 13 | Result[0][1] = x.z; 14 | Result[1][0] = -x.z; 15 | Result[0][2] = -x.y; 16 | Result[2][0] = x.y; 17 | Result[1][2] = x.x; 18 | Result[2][1] = -x.x; 19 | return Result; 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER tmat4x4 matrixCross4 24 | ( 25 | tvec3 const & x 26 | ) 27 | { 28 | tmat4x4 Result(T(0)); 29 | Result[0][1] = x.z; 30 | Result[1][0] = -x.z; 31 | Result[0][2] = -x.y; 32 | Result[2][0] = x.y; 33 | Result[1][2] = x.x; 34 | Result[2][1] = -x.x; 35 | return Result; 36 | } 37 | 38 | }//namespace glm 39 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/matrix_decompose.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_decompose 2 | /// @file glm/gtx/matrix_decompose.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_matrix_decompose GLM_GTX_matrix_decompose 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Decomposes a model matrix to translations, rotation and scale components 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../mat4x4.hpp" 17 | #include "../vec3.hpp" 18 | #include "../vec4.hpp" 19 | #include "../geometric.hpp" 20 | #include "../gtc/quaternion.hpp" 21 | #include "../gtc/matrix_transform.hpp" 22 | 23 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 24 | # pragma message("GLM: GLM_GTX_matrix_decompose extension included") 25 | #endif 26 | 27 | namespace glm 28 | { 29 | /// @addtogroup gtx_matrix_decompose 30 | /// @{ 31 | 32 | /// Decomposes a model matrix to translations, rotation and scale components 33 | /// @see gtx_matrix_decompose 34 | template 35 | GLM_FUNC_DECL bool decompose( 36 | tmat4x4 const & modelMatrix, 37 | tvec3 & scale, tquat & orientation, tvec3 & translation, tvec3 & skew, tvec4 & perspective); 38 | 39 | /// @} 40 | }//namespace glm 41 | 42 | #include "matrix_decompose.inl" 43 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/matrix_transform_2d.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_matrix_transform_2d 2 | /// @file glm/gtc/matrix_transform_2d.inl 3 | /// @author Miguel Ángel Pérez Martínez 4 | 5 | #include "../trigonometric.hpp" 6 | 7 | namespace glm 8 | { 9 | 10 | template 11 | GLM_FUNC_QUALIFIER tmat3x3 translate( 12 | tmat3x3 const & m, 13 | tvec2 const & v) 14 | { 15 | tmat3x3 Result(m); 16 | Result[2] = m[0] * v[0] + m[1] * v[1] + m[2]; 17 | return Result; 18 | } 19 | 20 | 21 | template 22 | GLM_FUNC_QUALIFIER tmat3x3 rotate( 23 | tmat3x3 const & m, 24 | T angle) 25 | { 26 | T const a = angle; 27 | T const c = cos(a); 28 | T const s = sin(a); 29 | 30 | tmat3x3 Result(uninitialize); 31 | Result[0] = m[0] * c + m[1] * s; 32 | Result[1] = m[0] * -s + m[1] * c; 33 | Result[2] = m[2]; 34 | return Result; 35 | } 36 | 37 | template 38 | GLM_FUNC_QUALIFIER tmat3x3 scale( 39 | tmat3x3 const & m, 40 | tvec2 const & v) 41 | { 42 | tmat3x3 Result(uninitialize); 43 | Result[0] = m[0] * v[0]; 44 | Result[1] = m[1] * v[1]; 45 | Result[2] = m[2]; 46 | return Result; 47 | } 48 | 49 | template 50 | GLM_FUNC_QUALIFIER tmat3x3 shearX( 51 | tmat3x3 const & m, 52 | T y) 53 | { 54 | tmat3x3 Result(1); 55 | Result[0][1] = y; 56 | return m * Result; 57 | } 58 | 59 | template 60 | GLM_FUNC_QUALIFIER tmat3x3 shearY( 61 | tmat3x3 const & m, 62 | T x) 63 | { 64 | tmat3x3 Result(1); 65 | Result[1][0] = x; 66 | return m * Result; 67 | } 68 | 69 | }//namespace glm 70 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/mixed_product.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_mixed_product GLM_GTX_mixed_producte 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Mixed product of 3 vectors. 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_mixed_product extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_mixed_product 25 | /// @{ 26 | 27 | /// @brief Mixed product of 3 vectors (from GLM_GTX_mixed_product extension) 28 | template 29 | GLM_FUNC_DECL T mixedProduct( 30 | tvec3 const & v1, 31 | tvec3 const & v2, 32 | tvec3 const & v3); 33 | 34 | /// @} 35 | }// namespace glm 36 | 37 | #include "mixed_product.inl" 38 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/mixed_product.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_mixed_product 2 | /// @file glm/gtx/mixed_product.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER T mixedProduct 8 | ( 9 | tvec3 const & v1, 10 | tvec3 const & v2, 11 | tvec3 const & v3 12 | ) 13 | { 14 | return dot(cross(v1, v2), v3); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/normal.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_normal GLM_GTX_normal 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Compute the normal of a triangle. 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_normal extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_normal 26 | /// @{ 27 | 28 | //! Computes triangle normal from triangle points. 29 | //! From GLM_GTX_normal extension. 30 | template 31 | GLM_FUNC_DECL tvec3 triangleNormal( 32 | tvec3 const & p1, 33 | tvec3 const & p2, 34 | tvec3 const & p3); 35 | 36 | /// @} 37 | }//namespace glm 38 | 39 | #include "normal.inl" 40 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/normal.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normal 2 | /// @file glm/gtx/normal.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tvec3 triangleNormal 8 | ( 9 | tvec3 const & p1, 10 | tvec3 const & p2, 11 | tvec3 const & p3 12 | ) 13 | { 14 | return normalize(cross(p1 - p2, p1 - p3)); 15 | } 16 | }//namespace glm 17 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/normalize_dot.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | /// @file glm/gtx/normalize_dot.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_fast_square_root (dependence) 6 | /// 7 | /// @defgroup gtx_normalize_dot GLM_GTX_normalize_dot 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Dot product of vectors that need to be normalize with a single square root. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../gtx/fast_square_root.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_GTX_normalize_dot extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_normalize_dot 26 | /// @{ 27 | 28 | /// Normalize parameters and returns the dot product of x and y. 29 | /// It's faster that dot(normalize(x), normalize(y)). 30 | /// 31 | /// @see gtx_normalize_dot extension. 32 | template class vecType> 33 | GLM_FUNC_DECL T normalizeDot(vecType const & x, vecType const & y); 34 | 35 | /// Normalize parameters and returns the dot product of x and y. 36 | /// Faster that dot(fastNormalize(x), fastNormalize(y)). 37 | /// 38 | /// @see gtx_normalize_dot extension. 39 | template class vecType> 40 | GLM_FUNC_DECL T fastNormalizeDot(vecType const & x, vecType const & y); 41 | 42 | /// @} 43 | }//namespace glm 44 | 45 | #include "normalize_dot.inl" 46 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/normalize_dot.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_normalize_dot 2 | /// @file glm/gtx/normalize_dot.inl 3 | 4 | namespace glm 5 | { 6 | template class vecType> 7 | GLM_FUNC_QUALIFIER T normalizeDot(vecType const & x, vecType const & y) 8 | { 9 | return glm::dot(x, y) * glm::inversesqrt(glm::dot(x, x) * glm::dot(y, y)); 10 | } 11 | 12 | template class vecType> 13 | GLM_FUNC_QUALIFIER T fastNormalizeDot(vecType const & x, vecType const & y) 14 | { 15 | return glm::dot(x, y) * glm::fastInverseSqrt(glm::dot(x, x) * glm::dot(y, y)); 16 | } 17 | }//namespace glm 18 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/number_precision.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_number_precision 2 | /// @file glm/gtx/number_precision.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/optimum_pow.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_optimum_pow GLM_GTX_optimum_pow 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Integer exponentiation of power functions. 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_optimum_pow extension included") 20 | #endif 21 | 22 | namespace glm{ 23 | namespace gtx 24 | { 25 | /// @addtogroup gtx_optimum_pow 26 | /// @{ 27 | 28 | /// Returns x raised to the power of 2. 29 | /// 30 | /// @see gtx_optimum_pow 31 | template 32 | GLM_FUNC_DECL genType pow2(genType const & x); 33 | 34 | /// Returns x raised to the power of 3. 35 | /// 36 | /// @see gtx_optimum_pow 37 | template 38 | GLM_FUNC_DECL genType pow3(genType const & x); 39 | 40 | /// Returns x raised to the power of 4. 41 | /// 42 | /// @see gtx_optimum_pow 43 | template 44 | GLM_FUNC_DECL genType pow4(genType const & x); 45 | 46 | /// @} 47 | }//namespace gtx 48 | }//namespace glm 49 | 50 | #include "optimum_pow.inl" 51 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/optimum_pow.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_optimum_pow 2 | /// @file glm/gtx/optimum_pow.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER genType pow2(genType const & x) 8 | { 9 | return x * x; 10 | } 11 | 12 | template 13 | GLM_FUNC_QUALIFIER genType pow3(genType const & x) 14 | { 15 | return x * x * x; 16 | } 17 | 18 | template 19 | GLM_FUNC_QUALIFIER genType pow4(genType const & x) 20 | { 21 | return (x * x) * (x * x); 22 | } 23 | }//namespace glm 24 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/orthonormalize.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_extented_min_max (dependence) 6 | /// 7 | /// @defgroup gtx_orthonormalize GLM_GTX_orthonormalize 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Orthonormalize matrices. 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../vec3.hpp" 18 | #include "../mat3x3.hpp" 19 | #include "../geometric.hpp" 20 | 21 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 22 | # pragma message("GLM: GLM_GTX_orthonormalize extension included") 23 | #endif 24 | 25 | namespace glm 26 | { 27 | /// @addtogroup gtx_orthonormalize 28 | /// @{ 29 | 30 | /// Returns the orthonormalized matrix of m. 31 | /// 32 | /// @see gtx_orthonormalize 33 | template 34 | GLM_FUNC_DECL tmat3x3 orthonormalize(tmat3x3 const & m); 35 | 36 | /// Orthonormalizes x according y. 37 | /// 38 | /// @see gtx_orthonormalize 39 | template 40 | GLM_FUNC_DECL tvec3 orthonormalize(tvec3 const & x, tvec3 const & y); 41 | 42 | /// @} 43 | }//namespace glm 44 | 45 | #include "orthonormalize.inl" 46 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/orthonormalize.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_orthonormalize 2 | /// @file glm/gtx/orthonormalize.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tmat3x3 orthonormalize(tmat3x3 const & m) 8 | { 9 | tmat3x3 r = m; 10 | 11 | r[0] = normalize(r[0]); 12 | 13 | T d0 = dot(r[0], r[1]); 14 | r[1] -= r[0] * d0; 15 | r[1] = normalize(r[1]); 16 | 17 | T d1 = dot(r[1], r[2]); 18 | d0 = dot(r[0], r[2]); 19 | r[2] -= r[0] * d0 + r[1] * d1; 20 | r[2] = normalize(r[2]); 21 | 22 | return r; 23 | } 24 | 25 | template 26 | GLM_FUNC_QUALIFIER tvec3 orthonormalize(tvec3 const & x, tvec3 const & y) 27 | { 28 | return normalize(x - y * dot(y, x)); 29 | } 30 | }//namespace glm 31 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/perpendicular.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtx_projection (dependence) 6 | /// 7 | /// @defgroup gtx_perpendicular GLM_GTX_perpendicular 8 | /// @ingroup gtx 9 | /// 10 | /// @brief Perpendicular of a vector from other one 11 | /// 12 | /// need to be included to use these functionalities. 13 | 14 | #pragma once 15 | 16 | // Dependency: 17 | #include "../glm.hpp" 18 | #include "../gtx/projection.hpp" 19 | 20 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 21 | # pragma message("GLM: GLM_GTX_perpendicular extension included") 22 | #endif 23 | 24 | namespace glm 25 | { 26 | /// @addtogroup gtx_perpendicular 27 | /// @{ 28 | 29 | //! Projects x a perpendicular axis of Normal. 30 | //! From GLM_GTX_perpendicular extension. 31 | template 32 | GLM_FUNC_DECL vecType perp( 33 | vecType const & x, 34 | vecType const & Normal); 35 | 36 | /// @} 37 | }//namespace glm 38 | 39 | #include "perpendicular.inl" 40 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/perpendicular.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_perpendicular 2 | /// @file glm/gtx/perpendicular.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vecType perp 8 | ( 9 | vecType const & x, 10 | vecType const & Normal 11 | ) 12 | { 13 | return x - proj(x, Normal); 14 | } 15 | }//namespace glm 16 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/polar_coordinates.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_polar_coordinates GLM_GTX_polar_coordinates 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Conversion from Euclidean space to polar space and revert. 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_polar_coordinates extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_polar_coordinates 25 | /// @{ 26 | 27 | /// Convert Euclidean to Polar coordinates, x is the xz distance, y, the latitude and z the longitude. 28 | /// 29 | /// @see gtx_polar_coordinates 30 | template 31 | GLM_FUNC_DECL tvec3 polar( 32 | tvec3 const & euclidean); 33 | 34 | /// Convert Polar to Euclidean coordinates. 35 | /// 36 | /// @see gtx_polar_coordinates 37 | template 38 | GLM_FUNC_DECL tvec3 euclidean( 39 | tvec2 const & polar); 40 | 41 | /// @} 42 | }//namespace glm 43 | 44 | #include "polar_coordinates.inl" 45 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/polar_coordinates.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_polar_coordinates 2 | /// @file glm/gtx/polar_coordinates.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tvec3 polar 8 | ( 9 | tvec3 const & euclidean 10 | ) 11 | { 12 | T const Length(length(euclidean)); 13 | tvec3 const tmp(euclidean / Length); 14 | T const xz_dist(sqrt(tmp.x * tmp.x + tmp.z * tmp.z)); 15 | 16 | return tvec3( 17 | asin(tmp.y), // latitude 18 | atan(tmp.x, tmp.z), // longitude 19 | xz_dist); // xz distance 20 | } 21 | 22 | template 23 | GLM_FUNC_QUALIFIER tvec3 euclidean 24 | ( 25 | tvec2 const & polar 26 | ) 27 | { 28 | T const latitude(polar.x); 29 | T const longitude(polar.y); 30 | 31 | return tvec3( 32 | cos(latitude) * sin(longitude), 33 | sin(latitude), 34 | cos(latitude) * cos(longitude)); 35 | } 36 | 37 | }//namespace glm 38 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/projection.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_projection GLM_GTX_projection 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Projection of a vector to other one 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependency: 16 | #include "../geometric.hpp" 17 | 18 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 19 | # pragma message("GLM: GLM_GTX_projection extension included") 20 | #endif 21 | 22 | namespace glm 23 | { 24 | /// @addtogroup gtx_projection 25 | /// @{ 26 | 27 | /// Projects x on Normal. 28 | /// 29 | /// @see gtx_projection 30 | template 31 | GLM_FUNC_DECL vecType proj(vecType const & x, vecType const & Normal); 32 | 33 | /// @} 34 | }//namespace glm 35 | 36 | #include "projection.inl" 37 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/projection.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_projection 2 | /// @file glm/gtx/projection.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER vecType proj(vecType const & x, vecType const & Normal) 8 | { 9 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; 10 | } 11 | }//namespace glm 12 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/raw_data.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_raw_data GLM_GTX_raw_data 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Projection of a vector to other one 10 | /// 11 | /// need to be included to use these functionalities. 12 | 13 | #pragma once 14 | 15 | // Dependencies 16 | #include "../detail/setup.hpp" 17 | #include "../detail/type_int.hpp" 18 | 19 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 20 | # pragma message("GLM: GLM_GTX_raw_data extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_raw_data 26 | /// @{ 27 | 28 | //! Type for byte numbers. 29 | //! From GLM_GTX_raw_data extension. 30 | typedef detail::uint8 byte; 31 | 32 | //! Type for word numbers. 33 | //! From GLM_GTX_raw_data extension. 34 | typedef detail::uint16 word; 35 | 36 | //! Type for dword numbers. 37 | //! From GLM_GTX_raw_data extension. 38 | typedef detail::uint32 dword; 39 | 40 | //! Type for qword numbers. 41 | //! From GLM_GTX_raw_data extension. 42 | typedef detail::uint64 qword; 43 | 44 | /// @} 45 | }// namespace glm 46 | 47 | #include "raw_data.inl" 48 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/raw_data.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_raw_data 2 | /// @file glm/gtx/raw_data.inl 3 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/rotate_normalized_axis.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_rotate_normalized_axis 2 | /// @file glm/gtx/rotate_normalized_axis.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER tmat4x4 rotateNormalizedAxis 8 | ( 9 | tmat4x4 const & m, 10 | T const & angle, 11 | tvec3 const & v 12 | ) 13 | { 14 | T const a = angle; 15 | T const c = cos(a); 16 | T const s = sin(a); 17 | 18 | tvec3 const axis(v); 19 | 20 | tvec3 const temp((static_cast(1) - c) * axis); 21 | 22 | tmat4x4 Rotate(uninitialize); 23 | Rotate[0][0] = c + temp[0] * axis[0]; 24 | Rotate[0][1] = 0 + temp[0] * axis[1] + s * axis[2]; 25 | Rotate[0][2] = 0 + temp[0] * axis[2] - s * axis[1]; 26 | 27 | Rotate[1][0] = 0 + temp[1] * axis[0] - s * axis[2]; 28 | Rotate[1][1] = c + temp[1] * axis[1]; 29 | Rotate[1][2] = 0 + temp[1] * axis[2] + s * axis[0]; 30 | 31 | Rotate[2][0] = 0 + temp[2] * axis[0] + s * axis[1]; 32 | Rotate[2][1] = 0 + temp[2] * axis[1] - s * axis[0]; 33 | Rotate[2][2] = c + temp[2] * axis[2]; 34 | 35 | tmat4x4 Result(uninitialize); 36 | Result[0] = m[0] * Rotate[0][0] + m[1] * Rotate[0][1] + m[2] * Rotate[0][2]; 37 | Result[1] = m[0] * Rotate[1][0] + m[1] * Rotate[1][1] + m[2] * Rotate[1][2]; 38 | Result[2] = m[0] * Rotate[2][0] + m[1] * Rotate[2][1] + m[2] * Rotate[2][2]; 39 | Result[3] = m[3]; 40 | return Result; 41 | } 42 | 43 | template 44 | GLM_FUNC_QUALIFIER tquat rotateNormalizedAxis 45 | ( 46 | tquat const & q, 47 | T const & angle, 48 | tvec3 const & v 49 | ) 50 | { 51 | tvec3 const Tmp(v); 52 | 53 | T const AngleRad(angle); 54 | T const Sin = sin(AngleRad * T(0.5)); 55 | 56 | return q * tquat(cos(AngleRad * static_cast(0.5)), Tmp.x * Sin, Tmp.y * Sin, Tmp.z * Sin); 57 | //return gtc::quaternion::cross(q, tquat(cos(AngleRad * T(0.5)), Tmp.x * fSin, Tmp.y * fSin, Tmp.z * fSin)); 58 | } 59 | }//namespace glm 60 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/scalar_relational.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_scalar_relational GLM_GTX_scalar_relational 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_scalar_relational 25 | /// @{ 26 | 27 | 28 | 29 | /// @} 30 | }//namespace glm 31 | 32 | #include "scalar_relational.inl" 33 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/scalar_relational.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_scalar_relational 2 | /// @file glm/gtx/scalar_relational.inl 3 | 4 | namespace glm 5 | { 6 | template 7 | GLM_FUNC_QUALIFIER bool lessThan 8 | ( 9 | T const & x, 10 | T const & y 11 | ) 12 | { 13 | return x < y; 14 | } 15 | 16 | template 17 | GLM_FUNC_QUALIFIER bool lessThanEqual 18 | ( 19 | T const & x, 20 | T const & y 21 | ) 22 | { 23 | return x <= y; 24 | } 25 | 26 | template 27 | GLM_FUNC_QUALIFIER bool greaterThan 28 | ( 29 | T const & x, 30 | T const & y 31 | ) 32 | { 33 | return x > y; 34 | } 35 | 36 | template 37 | GLM_FUNC_QUALIFIER bool greaterThanEqual 38 | ( 39 | T const & x, 40 | T const & y 41 | ) 42 | { 43 | return x >= y; 44 | } 45 | 46 | template 47 | GLM_FUNC_QUALIFIER bool equal 48 | ( 49 | T const & x, 50 | T const & y 51 | ) 52 | { 53 | return x == y; 54 | } 55 | 56 | template 57 | GLM_FUNC_QUALIFIER bool notEqual 58 | ( 59 | T const & x, 60 | T const & y 61 | ) 62 | { 63 | return x != y; 64 | } 65 | 66 | GLM_FUNC_QUALIFIER bool any 67 | ( 68 | bool const & x 69 | ) 70 | { 71 | return x; 72 | } 73 | 74 | GLM_FUNC_QUALIFIER bool all 75 | ( 76 | bool const & x 77 | ) 78 | { 79 | return x; 80 | } 81 | 82 | GLM_FUNC_QUALIFIER bool not_ 83 | ( 84 | bool const & x 85 | ) 86 | { 87 | return !x; 88 | } 89 | }//namespace glm 90 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/spline.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_spline 2 | /// @file glm/gtx/spline.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// 6 | /// @defgroup gtx_spline GLM_GTX_spline 7 | /// @ingroup gtx 8 | /// 9 | /// @brief Spline functions 10 | /// 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_spline extension included") 21 | #endif 22 | 23 | namespace glm 24 | { 25 | /// @addtogroup gtx_spline 26 | /// @{ 27 | 28 | /// Return a point from a catmull rom curve. 29 | /// @see gtx_spline extension. 30 | template 31 | GLM_FUNC_DECL genType catmullRom( 32 | genType const & v1, 33 | genType const & v2, 34 | genType const & v3, 35 | genType const & v4, 36 | typename genType::value_type const & s); 37 | 38 | /// Return a point from a hermite curve. 39 | /// @see gtx_spline extension. 40 | template 41 | GLM_FUNC_DECL genType hermite( 42 | genType const & v1, 43 | genType const & t1, 44 | genType const & v2, 45 | genType const & t2, 46 | typename genType::value_type const & s); 47 | 48 | /// Return a point from a cubic curve. 49 | /// @see gtx_spline extension. 50 | template 51 | GLM_FUNC_DECL genType cubic( 52 | genType const & v1, 53 | genType const & v2, 54 | genType const & v3, 55 | genType const & v4, 56 | typename genType::value_type const & s); 57 | 58 | /// @} 59 | }//namespace glm 60 | 61 | #include "spline.inl" 62 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/std_based_type.inl: -------------------------------------------------------------------------------- 1 | /// @ref gtx_std_based_type 2 | /// @file glm/gtx/std_based_type.inl 3 | 4 | namespace glm 5 | { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/external/glm/glm/gtx/string_cast.hpp: -------------------------------------------------------------------------------- 1 | /// @ref gtx_string_cast 2 | /// @file glm/gtx/string_cast.hpp 3 | /// 4 | /// @see core (dependence) 5 | /// @see gtc_half_float (dependence) 6 | /// @see gtx_integer (dependence) 7 | /// @see gtx_quaternion (dependence) 8 | /// 9 | /// @defgroup gtx_string_cast GLM_GTX_string_cast 10 | /// @ingroup gtx 11 | /// 12 | /// @brief Setup strings for GLM type values 13 | /// 14 | /// need to be included to use these functionalities. 15 | /// This extension is not supported with CUDA 16 | 17 | #pragma once 18 | 19 | // Dependency: 20 | #include "../glm.hpp" 21 | #include "../gtc/type_precision.hpp" 22 | #include "../gtc/quaternion.hpp" 23 | #include "../gtx/dual_quaternion.hpp" 24 | #include 25 | 26 | #if(GLM_COMPILER & GLM_COMPILER_CUDA) 27 | # error "GLM_GTX_string_cast is not supported on CUDA compiler" 28 | #endif 29 | 30 | #if GLM_MESSAGES == GLM_MESSAGES_ENABLED && !defined(GLM_EXT_INCLUDED) 31 | # pragma message("GLM: GLM_GTX_string_cast extension included") 32 | #endif 33 | 34 | namespace glm 35 | { 36 | /// @addtogroup gtx_string_cast 37 | /// @{ 38 | 39 | /// Create a string from a GLM vector or matrix typed variable. 40 | /// @see gtx_string_cast extension. 41 | template