├── .appveyor.yml ├── .github └── workflows │ └── build.yml ├── .gitignore ├── LICENSE ├── README.md ├── bin ├── premake.bat ├── premake5.exe ├── shaderc └── shaderc.exe ├── models ├── cube.obj ├── degenerate_edge.obj ├── double_sided.obj ├── duplicate_edge.obj ├── gazebo.obj ├── gazebo.txt ├── zero_area_face.obj └── zero_length_edge.obj ├── premake5.lua └── source ├── examples ├── example.cpp ├── example_c99.c └── example_uvmesh.cpp ├── test └── test.cpp ├── thirdparty ├── IconFontCppHeaders │ ├── IconsFontAwesome4.h │ └── licence.txt ├── OpenFBX │ ├── LICENSE │ ├── miniz.c │ ├── miniz.h │ ├── ofbx.cpp │ └── ofbx.h ├── bgfx │ ├── 3rdparty │ │ ├── dxsdk │ │ │ ├── directx-sdk-eula.txt │ │ │ └── include │ │ │ │ ├── PIXEventsCommon.h │ │ │ │ ├── PIXEventsGenerated.h │ │ │ │ ├── d3d11.h │ │ │ │ ├── d3d11_1.h │ │ │ │ ├── d3d11_2.h │ │ │ │ ├── d3d11_3.h │ │ │ │ ├── d3d11_4.h │ │ │ │ ├── d3d11sdklayers.h │ │ │ │ ├── d3d11shader.h │ │ │ │ ├── d3d11shadertracing.h │ │ │ │ ├── d3d12.h │ │ │ │ ├── d3d12_1.h │ │ │ │ ├── d3d12sdklayers.h │ │ │ │ ├── d3d12shader.h │ │ │ │ ├── d3d12video.h │ │ │ │ ├── d3d9.h │ │ │ │ ├── d3d9caps.h │ │ │ │ ├── d3d9types.h │ │ │ │ ├── d3dcommon.h │ │ │ │ ├── d3dcompiler.h │ │ │ │ ├── d3dx12.h │ │ │ │ ├── dxgi.h │ │ │ │ ├── dxgi1_2.h │ │ │ │ ├── dxgi1_3.h │ │ │ │ ├── dxgi1_4.h │ │ │ │ ├── dxgi1_5.h │ │ │ │ ├── dxgi1_6.h │ │ │ │ ├── dxgicommon.h │ │ │ │ ├── dxgidebug.h │ │ │ │ ├── dxgiformat.h │ │ │ │ ├── dxgitype.h │ │ │ │ ├── dxva2api.h │ │ │ │ ├── pix3.h │ │ │ │ ├── pix3_win.h │ │ │ │ └── winapifamily.h │ │ ├── khronos │ │ │ ├── EGL │ │ │ │ ├── egl.h │ │ │ │ ├── eglext.h │ │ │ │ └── eglplatform.h │ │ │ ├── GLES2 │ │ │ │ ├── gl2.h │ │ │ │ ├── gl2ext.h │ │ │ │ └── gl2platform.h │ │ │ ├── GLES3 │ │ │ │ ├── gl3.h │ │ │ │ ├── gl31.h │ │ │ │ ├── gl32.h │ │ │ │ ├── gl3ext.h │ │ │ │ └── gl3platform.h │ │ │ ├── KHR │ │ │ │ └── khrplatform.h │ │ │ ├── gl │ │ │ │ ├── GRemedyGLExtensions.h │ │ │ │ ├── glcorearb.h │ │ │ │ └── glext.h │ │ │ ├── glx │ │ │ │ └── glxext.h │ │ │ ├── vulkan-local │ │ │ │ ├── vk_icd.h │ │ │ │ ├── vk_layer.h │ │ │ │ ├── vk_platform.h │ │ │ │ ├── vk_sdk_platform.h │ │ │ │ ├── vulkan.h │ │ │ │ ├── vulkan_android.h │ │ │ │ ├── vulkan_beta.h │ │ │ │ ├── vulkan_core.h │ │ │ │ ├── vulkan_fuchsia.h │ │ │ │ ├── vulkan_ggp.h │ │ │ │ ├── vulkan_ios.h │ │ │ │ ├── vulkan_macos.h │ │ │ │ ├── vulkan_metal.h │ │ │ │ ├── vulkan_vi.h │ │ │ │ ├── vulkan_wayland.h │ │ │ │ ├── vulkan_win32.h │ │ │ │ ├── vulkan_xcb.h │ │ │ │ ├── vulkan_xlib.h │ │ │ │ └── vulkan_xlib_xrandr.h │ │ │ └── wgl │ │ │ │ └── wglext.h │ │ └── renderdoc │ │ │ └── renderdoc_app.h │ ├── LICENSE │ ├── include │ │ └── bgfx │ │ │ ├── bgfx.h │ │ │ ├── c99 │ │ │ └── bgfx.h │ │ │ ├── defines.h │ │ │ ├── embedded_shader.h │ │ │ └── platform.h │ └── src │ │ ├── amalgamated.cpp │ │ ├── amalgamated.mm │ │ ├── bgfx.cpp │ │ ├── bgfx.idl.inl │ │ ├── bgfx_compute.sh │ │ ├── bgfx_p.h │ │ ├── bgfx_shader.sh │ │ ├── charset.h │ │ ├── config.h │ │ ├── debug_renderdoc.cpp │ │ ├── debug_renderdoc.h │ │ ├── dxgi.cpp │ │ ├── dxgi.h │ │ ├── emscripten.h │ │ ├── fs_clear0.bin.h │ │ ├── fs_clear0.sc │ │ ├── fs_clear1.bin.h │ │ ├── fs_clear1.sc │ │ ├── fs_clear2.bin.h │ │ ├── fs_clear2.sc │ │ ├── fs_clear3.bin.h │ │ ├── fs_clear3.sc │ │ ├── fs_clear4.bin.h │ │ ├── fs_clear4.sc │ │ ├── fs_clear5.bin.h │ │ ├── fs_clear5.sc │ │ ├── fs_clear6.bin.h │ │ ├── fs_clear6.sc │ │ ├── fs_clear7.bin.h │ │ ├── fs_clear7.sc │ │ ├── fs_debugfont.bin.h │ │ ├── fs_debugfont.sc │ │ ├── glcontext_eagl.h │ │ ├── glcontext_eagl.mm │ │ ├── glcontext_egl.cpp │ │ ├── glcontext_egl.h │ │ ├── glcontext_glx.cpp │ │ ├── glcontext_glx.h │ │ ├── glcontext_html5.cpp │ │ ├── glcontext_html5.h │ │ ├── glcontext_nsgl.h │ │ ├── glcontext_nsgl.mm │ │ ├── glcontext_wgl.cpp │ │ ├── glcontext_wgl.h │ │ ├── glimports.h │ │ ├── makefile │ │ ├── nvapi.cpp │ │ ├── nvapi.h │ │ ├── renderer.h │ │ ├── renderer_d3d.h │ │ ├── renderer_d3d11.cpp │ │ ├── renderer_d3d11.h │ │ ├── renderer_d3d12.cpp │ │ ├── renderer_d3d12.h │ │ ├── renderer_d3d9.cpp │ │ ├── renderer_d3d9.h │ │ ├── renderer_gl.cpp │ │ ├── renderer_gl.h │ │ ├── renderer_gnm.cpp │ │ ├── renderer_mtl.h │ │ ├── renderer_mtl.mm │ │ ├── renderer_noop.cpp │ │ ├── renderer_nvn.cpp │ │ ├── renderer_vk.cpp │ │ ├── renderer_vk.h │ │ ├── renderer_webgpu.cpp │ │ ├── renderer_webgpu.h │ │ ├── shader.cpp │ │ ├── shader.h │ │ ├── shader_dx9bc.cpp │ │ ├── shader_dx9bc.h │ │ ├── shader_dxbc.cpp │ │ ├── shader_dxbc.h │ │ ├── shader_spirv.cpp │ │ ├── shader_spirv.h │ │ ├── topology.cpp │ │ ├── topology.h │ │ ├── varying.def.sc │ │ ├── version.h │ │ ├── vertexlayout.cpp │ │ ├── vertexlayout.h │ │ ├── vs_clear.bin.h │ │ ├── vs_clear.sc │ │ ├── vs_debugfont.bin.h │ │ └── vs_debugfont.sc ├── bimg │ ├── LICENSE │ ├── include │ │ └── bimg │ │ │ ├── bimg.h │ │ │ ├── decode.h │ │ │ └── encode.h │ └── src │ │ ├── bimg_p.h │ │ ├── config.h │ │ ├── image.cpp │ │ └── image_gnf.cpp ├── bx │ ├── 3rdparty │ │ └── ini │ │ │ ├── README.md │ │ │ ├── ini.h │ │ │ └── ini.md │ ├── LICENSE │ ├── include │ │ ├── bx │ │ │ ├── allocator.h │ │ │ ├── bx.h │ │ │ ├── commandline.h │ │ │ ├── config.h │ │ │ ├── cpu.h │ │ │ ├── debug.h │ │ │ ├── easing.h │ │ │ ├── endian.h │ │ │ ├── error.h │ │ │ ├── file.h │ │ │ ├── filepath.h │ │ │ ├── float4x4_t.h │ │ │ ├── handlealloc.h │ │ │ ├── hash.h │ │ │ ├── inline │ │ │ │ ├── allocator.inl │ │ │ │ ├── bx.inl │ │ │ │ ├── cpu.inl │ │ │ │ ├── easing.inl │ │ │ │ ├── endian.inl │ │ │ │ ├── error.inl │ │ │ │ ├── float4x4_t.inl │ │ │ │ ├── handlealloc.inl │ │ │ │ ├── hash.inl │ │ │ │ ├── math.inl │ │ │ │ ├── mpscqueue.inl │ │ │ │ ├── mutex.inl │ │ │ │ ├── pixelformat.inl │ │ │ │ ├── readerwriter.inl │ │ │ │ ├── ringbuffer.inl │ │ │ │ ├── rng.inl │ │ │ │ ├── simd128_langext.inl │ │ │ │ ├── simd128_neon.inl │ │ │ │ ├── simd128_ref.inl │ │ │ │ ├── simd128_sse.inl │ │ │ │ ├── simd128_swizzle.inl │ │ │ │ ├── simd256_avx.inl │ │ │ │ ├── simd256_ref.inl │ │ │ │ ├── simd_ni.inl │ │ │ │ ├── sort.inl │ │ │ │ ├── spscqueue.inl │ │ │ │ ├── string.inl │ │ │ │ └── uint32_t.inl │ │ │ ├── macros.h │ │ │ ├── maputil.h │ │ │ ├── math.h │ │ │ ├── mpscqueue.h │ │ │ ├── mutex.h │ │ │ ├── os.h │ │ │ ├── pixelformat.h │ │ │ ├── platform.h │ │ │ ├── process.h │ │ │ ├── readerwriter.h │ │ │ ├── ringbuffer.h │ │ │ ├── rng.h │ │ │ ├── semaphore.h │ │ │ ├── settings.h │ │ │ ├── simd_t.h │ │ │ ├── sort.h │ │ │ ├── spscqueue.h │ │ │ ├── string.h │ │ │ ├── thread.h │ │ │ ├── timer.h │ │ │ ├── uint32_t.h │ │ │ └── url.h │ │ ├── compat │ │ │ ├── freebsd │ │ │ │ ├── alloca.h │ │ │ │ ├── dirent.h │ │ │ │ ├── malloc.h │ │ │ │ └── signal.h │ │ │ ├── ios │ │ │ │ └── malloc.h │ │ │ ├── mingw │ │ │ │ ├── alloca.h │ │ │ │ ├── dirent.h │ │ │ │ ├── sal.h │ │ │ │ ├── salieri.h │ │ │ │ ├── specstrings_strict.h │ │ │ │ └── specstrings_undef.h │ │ │ ├── msvc │ │ │ │ ├── alloca.h │ │ │ │ ├── dirent.h │ │ │ │ ├── inttypes.h │ │ │ │ ├── pre1600 │ │ │ │ │ └── stdint.h │ │ │ │ └── stdbool.h │ │ │ └── osx │ │ │ │ └── malloc.h │ │ └── tinystl │ │ │ ├── LICENSE │ │ │ ├── allocator.h │ │ │ ├── buffer.h │ │ │ ├── hash.h │ │ │ ├── hash_base.h │ │ │ ├── new.h │ │ │ ├── stddef.h │ │ │ ├── string.h │ │ │ ├── traits.h │ │ │ ├── unordered_map.h │ │ │ ├── unordered_set.h │ │ │ └── vector.h │ └── src │ │ ├── allocator.cpp │ │ ├── amalgamated.cpp │ │ ├── bx.cpp │ │ ├── bx_p.h │ │ ├── commandline.cpp │ │ ├── crtnone.cpp │ │ ├── debug.cpp │ │ ├── dtoa.cpp │ │ ├── easing.cpp │ │ ├── file.cpp │ │ ├── filepath.cpp │ │ ├── hash.cpp │ │ ├── math.cpp │ │ ├── mutex.cpp │ │ ├── os.cpp │ │ ├── process.cpp │ │ ├── semaphore.cpp │ │ ├── settings.cpp │ │ ├── sort.cpp │ │ ├── string.cpp │ │ ├── thread.cpp │ │ ├── timer.cpp │ │ └── url.cpp ├── cgltf.c ├── cgltf.h ├── eigen │ ├── COPYING.BSD │ ├── COPYING.GPL │ ├── COPYING.LGPL │ ├── COPYING.MINPACK │ ├── COPYING.MPL2 │ ├── COPYING.README │ ├── Eigen │ │ ├── Cholesky │ │ ├── CholmodSupport │ │ ├── Core │ │ ├── Dense │ │ ├── Eigen │ │ ├── Eigenvalues │ │ ├── Geometry │ │ ├── Householder │ │ ├── IterativeLinearSolvers │ │ ├── Jacobi │ │ ├── LU │ │ ├── MetisSupport │ │ ├── OrderingMethods │ │ ├── PaStiXSupport │ │ ├── PardisoSupport │ │ ├── QR │ │ ├── QtAlignedMalloc │ │ ├── SPQRSupport │ │ ├── SVD │ │ ├── Sparse │ │ ├── SparseCholesky │ │ ├── SparseCore │ │ ├── SparseLU │ │ ├── SparseQR │ │ ├── StdDeque │ │ ├── StdList │ │ ├── StdVector │ │ ├── SuperLUSupport │ │ ├── UmfPackSupport │ │ └── src │ │ │ ├── Cholesky │ │ │ ├── LDLT.h │ │ │ ├── LLT.h │ │ │ └── LLT_LAPACKE.h │ │ │ ├── CholmodSupport │ │ │ └── CholmodSupport.h │ │ │ ├── Core │ │ │ ├── Array.h │ │ │ ├── ArrayBase.h │ │ │ ├── ArrayWrapper.h │ │ │ ├── Assign.h │ │ │ ├── AssignEvaluator.h │ │ │ ├── Assign_MKL.h │ │ │ ├── BandMatrix.h │ │ │ ├── Block.h │ │ │ ├── BooleanRedux.h │ │ │ ├── CommaInitializer.h │ │ │ ├── ConditionEstimator.h │ │ │ ├── CoreEvaluators.h │ │ │ ├── CoreIterators.h │ │ │ ├── CwiseBinaryOp.h │ │ │ ├── CwiseNullaryOp.h │ │ │ ├── CwiseTernaryOp.h │ │ │ ├── CwiseUnaryOp.h │ │ │ ├── CwiseUnaryView.h │ │ │ ├── DenseBase.h │ │ │ ├── DenseCoeffsBase.h │ │ │ ├── DenseStorage.h │ │ │ ├── Diagonal.h │ │ │ ├── DiagonalMatrix.h │ │ │ ├── DiagonalProduct.h │ │ │ ├── Dot.h │ │ │ ├── EigenBase.h │ │ │ ├── ForceAlignedAccess.h │ │ │ ├── Fuzzy.h │ │ │ ├── GeneralProduct.h │ │ │ ├── GenericPacketMath.h │ │ │ ├── GlobalFunctions.h │ │ │ ├── IO.h │ │ │ ├── Inverse.h │ │ │ ├── Map.h │ │ │ ├── MapBase.h │ │ │ ├── MathFunctions.h │ │ │ ├── MathFunctionsImpl.h │ │ │ ├── Matrix.h │ │ │ ├── MatrixBase.h │ │ │ ├── NestByValue.h │ │ │ ├── NoAlias.h │ │ │ ├── NumTraits.h │ │ │ ├── PermutationMatrix.h │ │ │ ├── PlainObjectBase.h │ │ │ ├── Product.h │ │ │ ├── ProductEvaluators.h │ │ │ ├── Random.h │ │ │ ├── Redux.h │ │ │ ├── Ref.h │ │ │ ├── Replicate.h │ │ │ ├── ReturnByValue.h │ │ │ ├── Reverse.h │ │ │ ├── Select.h │ │ │ ├── SelfAdjointView.h │ │ │ ├── SelfCwiseBinaryOp.h │ │ │ ├── Solve.h │ │ │ ├── SolveTriangular.h │ │ │ ├── SolverBase.h │ │ │ ├── StableNorm.h │ │ │ ├── Stride.h │ │ │ ├── Swap.h │ │ │ ├── Transpose.h │ │ │ ├── Transpositions.h │ │ │ ├── TriangularMatrix.h │ │ │ ├── VectorBlock.h │ │ │ ├── VectorwiseOp.h │ │ │ ├── Visitor.h │ │ │ ├── arch │ │ │ │ ├── AVX │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ ├── PacketMath.h │ │ │ │ │ └── TypeCasting.h │ │ │ │ ├── AVX512 │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ └── PacketMath.h │ │ │ │ ├── AltiVec │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ └── PacketMath.h │ │ │ │ ├── CUDA │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── Half.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ ├── PacketMath.h │ │ │ │ │ ├── PacketMathHalf.h │ │ │ │ │ └── TypeCasting.h │ │ │ │ ├── Default │ │ │ │ │ ├── ConjHelper.h │ │ │ │ │ └── Settings.h │ │ │ │ ├── NEON │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ └── PacketMath.h │ │ │ │ ├── SSE │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ ├── PacketMath.h │ │ │ │ │ └── TypeCasting.h │ │ │ │ └── ZVector │ │ │ │ │ ├── Complex.h │ │ │ │ │ ├── MathFunctions.h │ │ │ │ │ └── PacketMath.h │ │ │ ├── functors │ │ │ │ ├── AssignmentFunctors.h │ │ │ │ ├── BinaryFunctors.h │ │ │ │ ├── NullaryFunctors.h │ │ │ │ ├── StlFunctors.h │ │ │ │ ├── TernaryFunctors.h │ │ │ │ └── UnaryFunctors.h │ │ │ ├── products │ │ │ │ ├── GeneralBlockPanelKernel.h │ │ │ │ ├── GeneralMatrixMatrix.h │ │ │ │ ├── GeneralMatrixMatrixTriangular.h │ │ │ │ ├── GeneralMatrixMatrixTriangular_BLAS.h │ │ │ │ ├── GeneralMatrixMatrix_BLAS.h │ │ │ │ ├── GeneralMatrixVector.h │ │ │ │ ├── GeneralMatrixVector_BLAS.h │ │ │ │ ├── Parallelizer.h │ │ │ │ ├── SelfadjointMatrixMatrix.h │ │ │ │ ├── SelfadjointMatrixMatrix_BLAS.h │ │ │ │ ├── SelfadjointMatrixVector.h │ │ │ │ ├── SelfadjointMatrixVector_BLAS.h │ │ │ │ ├── SelfadjointProduct.h │ │ │ │ ├── SelfadjointRank2Update.h │ │ │ │ ├── TriangularMatrixMatrix.h │ │ │ │ ├── TriangularMatrixMatrix_BLAS.h │ │ │ │ ├── TriangularMatrixVector.h │ │ │ │ ├── TriangularMatrixVector_BLAS.h │ │ │ │ ├── TriangularSolverMatrix.h │ │ │ │ ├── TriangularSolverMatrix_BLAS.h │ │ │ │ └── TriangularSolverVector.h │ │ │ └── util │ │ │ │ ├── BlasUtil.h │ │ │ │ ├── Constants.h │ │ │ │ ├── DisableStupidWarnings.h │ │ │ │ ├── ForwardDeclarations.h │ │ │ │ ├── MKL_support.h │ │ │ │ ├── Macros.h │ │ │ │ ├── Memory.h │ │ │ │ ├── Meta.h │ │ │ │ ├── NonMPL2.h │ │ │ │ ├── ReenableStupidWarnings.h │ │ │ │ ├── StaticAssert.h │ │ │ │ └── XprHelper.h │ │ │ ├── Eigenvalues │ │ │ ├── ComplexEigenSolver.h │ │ │ ├── ComplexSchur.h │ │ │ ├── ComplexSchur_LAPACKE.h │ │ │ ├── EigenSolver.h │ │ │ ├── GeneralizedEigenSolver.h │ │ │ ├── GeneralizedSelfAdjointEigenSolver.h │ │ │ ├── HessenbergDecomposition.h │ │ │ ├── MatrixBaseEigenvalues.h │ │ │ ├── RealQZ.h │ │ │ ├── RealSchur.h │ │ │ ├── RealSchur_LAPACKE.h │ │ │ ├── SelfAdjointEigenSolver.h │ │ │ ├── SelfAdjointEigenSolver_LAPACKE.h │ │ │ └── Tridiagonalization.h │ │ │ ├── Geometry │ │ │ ├── AlignedBox.h │ │ │ ├── AngleAxis.h │ │ │ ├── EulerAngles.h │ │ │ ├── Homogeneous.h │ │ │ ├── Hyperplane.h │ │ │ ├── OrthoMethods.h │ │ │ ├── ParametrizedLine.h │ │ │ ├── Quaternion.h │ │ │ ├── Rotation2D.h │ │ │ ├── RotationBase.h │ │ │ ├── Scaling.h │ │ │ ├── Transform.h │ │ │ ├── Translation.h │ │ │ ├── Umeyama.h │ │ │ └── arch │ │ │ │ └── Geometry_SSE.h │ │ │ ├── Householder │ │ │ ├── BlockHouseholder.h │ │ │ ├── Householder.h │ │ │ └── HouseholderSequence.h │ │ │ ├── IterativeLinearSolvers │ │ │ ├── BasicPreconditioners.h │ │ │ ├── BiCGSTAB.h │ │ │ ├── ConjugateGradient.h │ │ │ ├── IncompleteCholesky.h │ │ │ ├── IncompleteLUT.h │ │ │ ├── IterativeSolverBase.h │ │ │ ├── LeastSquareConjugateGradient.h │ │ │ └── SolveWithGuess.h │ │ │ ├── Jacobi │ │ │ └── Jacobi.h │ │ │ ├── LU │ │ │ ├── Determinant.h │ │ │ ├── FullPivLU.h │ │ │ ├── InverseImpl.h │ │ │ ├── PartialPivLU.h │ │ │ ├── PartialPivLU_LAPACKE.h │ │ │ └── arch │ │ │ │ └── Inverse_SSE.h │ │ │ ├── MetisSupport │ │ │ └── MetisSupport.h │ │ │ ├── OrderingMethods │ │ │ ├── Amd.h │ │ │ ├── Eigen_Colamd.h │ │ │ └── Ordering.h │ │ │ ├── PaStiXSupport │ │ │ └── PaStiXSupport.h │ │ │ ├── PardisoSupport │ │ │ └── PardisoSupport.h │ │ │ ├── QR │ │ │ ├── ColPivHouseholderQR.h │ │ │ ├── ColPivHouseholderQR_LAPACKE.h │ │ │ ├── CompleteOrthogonalDecomposition.h │ │ │ ├── FullPivHouseholderQR.h │ │ │ ├── HouseholderQR.h │ │ │ └── HouseholderQR_LAPACKE.h │ │ │ ├── SPQRSupport │ │ │ └── SuiteSparseQRSupport.h │ │ │ ├── SVD │ │ │ ├── BDCSVD.h │ │ │ ├── JacobiSVD.h │ │ │ ├── JacobiSVD_LAPACKE.h │ │ │ ├── SVDBase.h │ │ │ └── UpperBidiagonalization.h │ │ │ ├── SparseCholesky │ │ │ ├── SimplicialCholesky.h │ │ │ └── SimplicialCholesky_impl.h │ │ │ ├── SparseCore │ │ │ ├── AmbiVector.h │ │ │ ├── CompressedStorage.h │ │ │ ├── ConservativeSparseSparseProduct.h │ │ │ ├── MappedSparseMatrix.h │ │ │ ├── SparseAssign.h │ │ │ ├── SparseBlock.h │ │ │ ├── SparseColEtree.h │ │ │ ├── SparseCompressedBase.h │ │ │ ├── SparseCwiseBinaryOp.h │ │ │ ├── SparseCwiseUnaryOp.h │ │ │ ├── SparseDenseProduct.h │ │ │ ├── SparseDiagonalProduct.h │ │ │ ├── SparseDot.h │ │ │ ├── SparseFuzzy.h │ │ │ ├── SparseMap.h │ │ │ ├── SparseMatrix.h │ │ │ ├── SparseMatrixBase.h │ │ │ ├── SparsePermutation.h │ │ │ ├── SparseProduct.h │ │ │ ├── SparseRedux.h │ │ │ ├── SparseRef.h │ │ │ ├── SparseSelfAdjointView.h │ │ │ ├── SparseSolverBase.h │ │ │ ├── SparseSparseProductWithPruning.h │ │ │ ├── SparseTranspose.h │ │ │ ├── SparseTriangularView.h │ │ │ ├── SparseUtil.h │ │ │ ├── SparseVector.h │ │ │ ├── SparseView.h │ │ │ └── TriangularSolver.h │ │ │ ├── SparseLU │ │ │ ├── SparseLU.h │ │ │ ├── SparseLUImpl.h │ │ │ ├── SparseLU_Memory.h │ │ │ ├── SparseLU_Structs.h │ │ │ ├── SparseLU_SupernodalMatrix.h │ │ │ ├── SparseLU_Utils.h │ │ │ ├── SparseLU_column_bmod.h │ │ │ ├── SparseLU_column_dfs.h │ │ │ ├── SparseLU_copy_to_ucol.h │ │ │ ├── SparseLU_gemm_kernel.h │ │ │ ├── SparseLU_heap_relax_snode.h │ │ │ ├── SparseLU_kernel_bmod.h │ │ │ ├── SparseLU_panel_bmod.h │ │ │ ├── SparseLU_panel_dfs.h │ │ │ ├── SparseLU_pivotL.h │ │ │ ├── SparseLU_pruneL.h │ │ │ └── SparseLU_relax_snode.h │ │ │ ├── SparseQR │ │ │ └── SparseQR.h │ │ │ ├── StlSupport │ │ │ ├── StdDeque.h │ │ │ ├── StdList.h │ │ │ ├── StdVector.h │ │ │ └── details.h │ │ │ ├── SuperLUSupport │ │ │ └── SuperLUSupport.h │ │ │ ├── UmfPackSupport │ │ │ └── UmfPackSupport.h │ │ │ ├── misc │ │ │ ├── Image.h │ │ │ ├── Kernel.h │ │ │ ├── RealSvd2x2.h │ │ │ ├── blas.h │ │ │ ├── lapack.h │ │ │ ├── lapacke.h │ │ │ └── lapacke_mangling.h │ │ │ └── plugins │ │ │ ├── ArrayCwiseBinaryOps.h │ │ │ ├── ArrayCwiseUnaryOps.h │ │ │ ├── BlockMethods.h │ │ │ ├── CommonCwiseBinaryOps.h │ │ │ ├── CommonCwiseUnaryOps.h │ │ │ ├── MatrixCwiseBinaryOps.h │ │ │ └── MatrixCwiseUnaryOps.h │ └── unsupported │ │ └── Eigen │ │ ├── SparseExtra │ │ └── src │ │ └── SparseExtra │ │ ├── BlockOfDynamicSparseMatrix.h │ │ ├── DynamicSparseMatrix.h │ │ ├── MarketIO.h │ │ └── RandomSetter.h ├── embree3 │ ├── rtcore.h │ ├── rtcore_buffer.h │ ├── rtcore_builder.h │ ├── rtcore_common.h │ ├── rtcore_device.h │ ├── rtcore_geometry.h │ ├── rtcore_ray.h │ ├── rtcore_scene.h │ └── rtcore_version.h ├── enkiTS │ ├── LockLessMultiReadPipe.h │ ├── TaskScheduler.cpp │ ├── TaskScheduler.h │ ├── TaskScheduler_c.cpp │ └── TaskScheduler_c.h ├── fonts │ ├── Roboto-Regular.h │ └── fontawesome-webfont.h ├── glfw │ ├── LICENSE.md │ ├── include │ │ └── GLFW │ │ │ ├── glfw3.h │ │ │ └── glfw3native.h │ └── src │ │ ├── cocoa_init.m │ │ ├── cocoa_joystick.h │ │ ├── cocoa_joystick.m │ │ ├── cocoa_monitor.m │ │ ├── cocoa_platform.h │ │ ├── cocoa_time.c │ │ ├── cocoa_window.m │ │ ├── context.c │ │ ├── egl_context.c │ │ ├── egl_context.h │ │ ├── glx_context.c │ │ ├── glx_context.h │ │ ├── init.c │ │ ├── input.c │ │ ├── internal.h │ │ ├── linux_joystick.c │ │ ├── linux_joystick.h │ │ ├── mappings.h │ │ ├── monitor.c │ │ ├── nsgl_context.h │ │ ├── nsgl_context.m │ │ ├── null_init.c │ │ ├── null_joystick.c │ │ ├── null_joystick.h │ │ ├── null_monitor.c │ │ ├── null_platform.h │ │ ├── null_window.c │ │ ├── osmesa_context.c │ │ ├── osmesa_context.h │ │ ├── posix_thread.c │ │ ├── posix_thread.h │ │ ├── posix_time.c │ │ ├── posix_time.h │ │ ├── vulkan.c │ │ ├── wgl_context.c │ │ ├── wgl_context.h │ │ ├── win32_init.c │ │ ├── win32_joystick.c │ │ ├── win32_joystick.h │ │ ├── win32_monitor.c │ │ ├── win32_platform.h │ │ ├── win32_thread.c │ │ ├── win32_time.c │ │ ├── win32_window.c │ │ ├── window.c │ │ ├── wl_init.c │ │ ├── wl_monitor.c │ │ ├── wl_platform.h │ │ ├── wl_window.c │ │ ├── x11_init.c │ │ ├── x11_monitor.c │ │ ├── x11_platform.h │ │ ├── x11_window.c │ │ ├── xkb_unicode.c │ │ └── xkb_unicode.h ├── imgui │ ├── LICENSE.txt │ ├── imconfig.h │ ├── imgui.cpp │ ├── imgui.h │ ├── imgui_draw.cpp │ ├── imgui_internal.h │ ├── imgui_widgets.cpp │ ├── imstb_rectpack.h │ ├── imstb_textedit.h │ └── imstb_truetype.h ├── libigl │ ├── LICENSE.GPL │ ├── LICENSE.MPL2 │ └── include │ │ └── igl │ │ ├── ARAPEnergyType.h │ │ ├── C_STR.h │ │ ├── EPS.cpp │ │ ├── EPS.h │ │ ├── IndexComparison.h │ │ ├── LinSpaced.h │ │ ├── PI.h │ │ ├── STR.h │ │ ├── Singular_Value_Decomposition_Givens_QR_Factorization_Kernel.hpp │ │ ├── Singular_Value_Decomposition_Jacobi_Conjugation_Kernel.hpp │ │ ├── Singular_Value_Decomposition_Kernel_Declarations.hpp │ │ ├── Singular_Value_Decomposition_Main_Kernel_Body.hpp │ │ ├── Singular_Value_Decomposition_Preamble.hpp │ │ ├── SortableRow.h │ │ ├── adjacency_matrix.cpp │ │ ├── adjacency_matrix.h │ │ ├── arap.cpp │ │ ├── arap.h │ │ ├── arap_linear_block.cpp │ │ ├── arap_linear_block.h │ │ ├── arap_rhs.cpp │ │ ├── arap_rhs.h │ │ ├── boundary_facets.cpp │ │ ├── boundary_facets.h │ │ ├── boundary_loop.cpp │ │ ├── boundary_loop.h │ │ ├── cat.cpp │ │ ├── cat.h │ │ ├── colon.cpp │ │ ├── colon.h │ │ ├── columnize.cpp │ │ ├── columnize.h │ │ ├── cotmatrix.cpp │ │ ├── cotmatrix.h │ │ ├── cotmatrix_entries.cpp │ │ ├── cotmatrix_entries.h │ │ ├── covariance_scatter_matrix.cpp │ │ ├── covariance_scatter_matrix.h │ │ ├── cross.cpp │ │ ├── cross.h │ │ ├── cumsum.cpp │ │ ├── cumsum.h │ │ ├── diag.cpp │ │ ├── diag.h │ │ ├── dihedral_angles.cpp │ │ ├── dihedral_angles.h │ │ ├── doublearea.cpp │ │ ├── doublearea.h │ │ ├── edge_lengths.cpp │ │ ├── edge_lengths.h │ │ ├── edges.cpp │ │ ├── edges.h │ │ ├── face_areas.cpp │ │ ├── face_areas.h │ │ ├── face_occurrences.cpp │ │ ├── face_occurrences.h │ │ ├── find.cpp │ │ ├── find.h │ │ ├── fit_rotations.cpp │ │ ├── fit_rotations.h │ │ ├── for_each.h │ │ ├── get_seconds.cpp │ │ ├── get_seconds.h │ │ ├── group_sum_matrix.cpp │ │ ├── group_sum_matrix.h │ │ ├── harmonic.cpp │ │ ├── harmonic.h │ │ ├── igl_inline.h │ │ ├── invert_diag.cpp │ │ ├── invert_diag.h │ │ ├── is_border_vertex.cpp │ │ ├── is_border_vertex.h │ │ ├── is_symmetric.cpp │ │ ├── is_symmetric.h │ │ ├── isdiag.cpp │ │ ├── isdiag.h │ │ ├── list_to_matrix.cpp │ │ ├── list_to_matrix.h │ │ ├── lscm.cpp │ │ ├── lscm.h │ │ ├── map_vertices_to_circle.cpp │ │ ├── map_vertices_to_circle.h │ │ ├── massmatrix.cpp │ │ ├── massmatrix.h │ │ ├── matlab_format.cpp │ │ ├── matlab_format.h │ │ ├── matrix_to_list.cpp │ │ ├── matrix_to_list.h │ │ ├── max_size.cpp │ │ ├── max_size.h │ │ ├── min_quad_with_fixed.cpp │ │ ├── min_quad_with_fixed.h │ │ ├── min_size.cpp │ │ ├── min_size.h │ │ ├── mode.cpp │ │ ├── mode.h │ │ ├── normalize_row_sums.cpp │ │ ├── normalize_row_sums.h │ │ ├── oriented_facets.cpp │ │ ├── oriented_facets.h │ │ ├── parallel_for.h │ │ ├── polar_dec.cpp │ │ ├── polar_dec.h │ │ ├── polar_svd.cpp │ │ ├── polar_svd.h │ │ ├── polar_svd3x3.cpp │ │ ├── polar_svd3x3.h │ │ ├── project_isometrically_to_plane.cpp │ │ ├── project_isometrically_to_plane.h │ │ ├── redux.h │ │ ├── reorder.cpp │ │ ├── reorder.h │ │ ├── repdiag.cpp │ │ ├── repdiag.h │ │ ├── repmat.cpp │ │ ├── repmat.h │ │ ├── slice.cpp │ │ ├── slice.h │ │ ├── sort.cpp │ │ ├── sort.h │ │ ├── sortrows.cpp │ │ ├── sortrows.h │ │ ├── sparse.cpp │ │ ├── sparse.h │ │ ├── speye.cpp │ │ ├── speye.h │ │ ├── squared_edge_lengths.cpp │ │ ├── squared_edge_lengths.h │ │ ├── sum.cpp │ │ ├── sum.h │ │ ├── svd3x3.cpp │ │ ├── svd3x3.h │ │ ├── triangle_triangle_adjacency.cpp │ │ ├── triangle_triangle_adjacency.h │ │ ├── unique_edge_map.cpp │ │ ├── unique_edge_map.h │ │ ├── unique_rows.cpp │ │ ├── unique_rows.h │ │ ├── unique_simplices.cpp │ │ ├── unique_simplices.h │ │ ├── vector_area_matrix.cpp │ │ ├── vector_area_matrix.h │ │ ├── verbose.h │ │ ├── vertex_triangle_adjacency.cpp │ │ ├── vertex_triangle_adjacency.h │ │ ├── volume.cpp │ │ └── volume.h ├── mimalloc │ ├── LICENSE │ ├── include │ │ ├── mimalloc-atomic.h │ │ ├── mimalloc-internal-tld.h │ │ ├── mimalloc-internal.h │ │ ├── mimalloc-new-delete.h │ │ ├── mimalloc-override.h │ │ ├── mimalloc-types.h │ │ └── mimalloc.h │ └── src │ │ ├── alloc-aligned.c │ │ ├── alloc-override-osx.c │ │ ├── alloc-override.c │ │ ├── alloc-posix.c │ │ ├── alloc.c │ │ ├── arena.c │ │ ├── bitmap.inc.c │ │ ├── heap.c │ │ ├── init.c │ │ ├── options.c │ │ ├── os.c │ │ ├── page-queue.c │ │ ├── page.c │ │ ├── random.c │ │ ├── region.c │ │ ├── segment.c │ │ ├── static.c │ │ └── stats.c ├── nativefiledialog │ ├── LICENSE │ ├── common.h │ ├── include │ │ └── nfd.h │ ├── nfd_cocoa.m │ ├── nfd_common.c │ ├── nfd_common.h │ ├── nfd_gtk.c │ ├── nfd_win.cpp │ ├── nfd_zenity.c │ └── simple_exec.h ├── objzero │ ├── objzero.c │ └── objzero.h ├── oidn │ └── include │ │ └── OpenImageDenoise │ │ ├── oidn.h │ │ ├── oidn.hpp │ │ └── version.h ├── stb_image.c ├── stb_image.h ├── stb_image_resize.c ├── stb_image_resize.h ├── stb_image_write.c ├── stb_image_write.h ├── stl_reader.h ├── tiny_obj_loader.cpp └── tiny_obj_loader.h ├── viewer ├── shaders.lua ├── shaders │ ├── fs_blit.sc │ ├── fs_color.sc │ ├── fs_gui.sc │ ├── fs_material.sc │ ├── fs_wireframe.sc │ ├── shared.h │ ├── varying.def.sc │ ├── vs_blit.sc │ ├── vs_color.sc │ ├── vs_gui.sc │ ├── vs_model.sc │ └── vs_wireframe.sc ├── shaders_bin │ ├── d3d11 │ │ ├── fs_blit.h │ │ ├── fs_color.h │ │ ├── fs_gui.h │ │ ├── fs_material.h │ │ ├── fs_wireframe.h │ │ ├── vs_blit.h │ │ ├── vs_color.h │ │ ├── vs_gui.h │ │ ├── vs_model.h │ │ └── vs_wireframe.h │ ├── gl │ │ ├── fs_blit.h │ │ ├── fs_color.h │ │ ├── fs_gui.h │ │ ├── fs_material.h │ │ ├── fs_wireframe.h │ │ ├── vs_blit.h │ │ ├── vs_color.h │ │ ├── vs_gui.h │ │ ├── vs_model.h │ │ └── vs_wireframe.h │ ├── shaders.h │ └── vk │ │ ├── fs_blit.h │ │ ├── fs_color.h │ │ ├── fs_gui.h │ │ ├── fs_material.h │ │ ├── fs_wireframe.h │ │ ├── vs_blit.h │ │ ├── vs_color.h │ │ ├── vs_gui.h │ │ ├── vs_model.h │ │ └── vs_wireframe.h ├── viewer.cpp ├── viewer.h ├── viewer_atlas.cpp ├── viewer_bake.cpp ├── viewer_gui.cpp └── viewer_model.cpp ├── xatlas.natvis └── xatlas ├── xatlas.cpp ├── xatlas.h └── xatlas_c.h /.appveyor.yml: -------------------------------------------------------------------------------- 1 | os: 2 | - Visual Studio 2022 3 | 4 | environment: 5 | matrix: 6 | - ACTION: vs2015 7 | - ACTION: vs2017 8 | - ACTION: vs2019 9 | - ACTION: vs2022 10 | 11 | platform: 12 | - Win32 13 | - x64 14 | 15 | configuration: 16 | - Release 17 | 18 | install: 19 | - bin\premake5.exe %ACTION% 20 | 21 | build: 22 | project: build\$(ACTION)\xatlas.sln 23 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: [push, pull_request, workflow_dispatch] 4 | 5 | jobs: 6 | Linux: 7 | runs-on: ubuntu-latest 8 | strategy: 9 | matrix: 10 | compiler: [gcc, clang] 11 | steps: 12 | - uses: actions/checkout@v2 13 | - name: Install packages 14 | run: | 15 | sudo apt-get update -qq 16 | sudo apt-get install libgl1-mesa-dev libgtk-3-dev xorg-dev 17 | - name: Install premake 18 | run: | 19 | wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha13/premake-5.0.0-alpha13-linux.tar.gz -O premake.tar.gz 20 | tar -xf premake.tar.gz 21 | - name: Run premake 22 | run: | 23 | ./premake5 --cc=${{matrix.compiler}} gmake 24 | - name: Build 25 | run: | 26 | cd build/gmake_${{matrix.compiler}} 27 | make 28 | 29 | Windows: 30 | runs-on: windows-latest 31 | strategy: 32 | matrix: 33 | platform: [Win32, x64] 34 | steps: 35 | - uses: actions/checkout@v2 36 | - name: Run premake 37 | shell: powershell 38 | run: | 39 | .\bin\premake5.exe vs2019 40 | - name: Setup MSBuild 41 | uses: microsoft/setup-msbuild@v1 42 | - name: Build 43 | shell: cmd 44 | run: | 45 | msbuild build\vs2019\xatlas.sln /p:Configuration=Release /p:Platform="${{matrix.platform}}" /verbosity:minimal 46 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018-2020 Jonathan Young 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /bin/premake.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | premake5.exe --file=../premake5.lua gmake 3 | premake5.exe --file=../premake5.lua --cc=clang gmake 4 | premake5.exe --file=../premake5.lua vs2015 5 | premake5.exe --file=../premake5.lua vs2017 6 | premake5.exe --file=../premake5.lua vs2019 7 | premake5.exe --file=../premake5.lua vs2022 8 | pause 9 | -------------------------------------------------------------------------------- /bin/premake5.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpcy/xatlas/f700c7790aaa030e794b52ba7791a05c085faf0c/bin/premake5.exe -------------------------------------------------------------------------------- /bin/shaderc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpcy/xatlas/f700c7790aaa030e794b52ba7791a05c085faf0c/bin/shaderc -------------------------------------------------------------------------------- /bin/shaderc.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpcy/xatlas/f700c7790aaa030e794b52ba7791a05c085faf0c/bin/shaderc.exe -------------------------------------------------------------------------------- /models/cube.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.79 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Cube 4 | v 1.000000 -1.000000 -1.000000 5 | v 1.000000 -1.000000 1.000000 6 | v -1.000000 -1.000000 1.000000 7 | v -1.000000 -1.000000 -1.000000 8 | v 1.000000 1.000000 -0.999999 9 | v 0.999999 1.000000 1.000001 10 | v -1.000000 1.000000 1.000000 11 | v -1.000000 1.000000 -1.000000 12 | vt 1.000000 0.000000 13 | vt 0.000000 1.000000 14 | vt 0.000000 0.000000 15 | vt 1.000000 0.000000 16 | vt 0.000000 1.000000 17 | vt 0.000000 0.000000 18 | vt 1.000000 0.000000 19 | vt 0.000000 1.000000 20 | vt 1.000000 0.000000 21 | vt 0.000000 1.000000 22 | vt 0.000000 0.000000 23 | vt 0.000000 0.000000 24 | vt 1.000000 1.000000 25 | vt 1.000000 0.000000 26 | vt 0.000000 1.000000 27 | vt 1.000000 1.000000 28 | vt 1.000000 1.000000 29 | vt 1.000000 1.000000 30 | vt 1.000000 0.000000 31 | vt 1.000000 1.000000 32 | vn 0.0000 -1.0000 0.0000 33 | vn 0.0000 1.0000 0.0000 34 | vn 1.0000 -0.0000 0.0000 35 | vn 0.0000 -0.0000 1.0000 36 | vn -1.0000 -0.0000 -0.0000 37 | vn 0.0000 0.0000 -1.0000 38 | s off 39 | f 2/1/1 4/2/1 1/3/1 40 | f 8/4/2 6/5/2 5/6/2 41 | f 5/7/3 2/8/3 1/3/3 42 | f 6/9/4 3/10/4 2/11/4 43 | f 3/12/5 8/13/5 4/2/5 44 | f 1/14/6 8/15/6 5/6/6 45 | f 2/1/1 3/16/1 4/2/1 46 | f 8/4/2 7/17/2 6/5/2 47 | f 5/7/3 6/18/3 2/8/3 48 | f 6/9/4 7/17/4 3/10/4 49 | f 3/12/5 7/19/5 8/13/5 50 | f 1/14/6 4/20/6 8/15/6 51 | -------------------------------------------------------------------------------- /models/degenerate_edge.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.79 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Plane 4 | v -1.000000 0.000000 1.000000 5 | v -1.000000 0.000000 1.000000 6 | v -1.000000 0.000000 -1.000000 7 | v 1.000000 0.000000 -1.000000 8 | vn 0.0000 1.0000 0.0000 9 | vn 0.0000 0.0000 1.0000 10 | s off 11 | f 1//1 4//1 3//1 12 | f 1//2 1//2 4//2 13 | -------------------------------------------------------------------------------- /models/double_sided.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.79 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Plane.001 4 | v -1.000000 0.000000 1.000000 5 | v 1.000000 0.000000 1.000000 6 | v -1.000000 0.000000 -1.000000 7 | v 1.000000 0.000000 -1.000000 8 | v -1.000000 0.000000 1.000000 9 | v 1.000000 0.000000 1.000000 10 | v -1.000000 0.000000 -1.000000 11 | v 1.000000 0.000000 -1.000000 12 | vn 0.0000 -1.0000 0.0000 13 | vn 0.0000 1.0000 0.0000 14 | usemtl None 15 | s off 16 | f 3//1 2//1 1//1 17 | f 6//2 7//2 5//2 18 | f 3//1 4//1 2//1 19 | f 6//2 8//2 7//2 20 | -------------------------------------------------------------------------------- /models/duplicate_edge.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.79 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Plane 4 | v -1.000000 0.000000 1.000000 5 | v 1.000000 0.000000 1.000000 6 | v 1.000000 0.000000 -1.000000 7 | v -1.000000 0.000000 1.000000 8 | v -1.000000 1.000000 -1.000000 9 | v 1.000000 0.000000 -1.000000 10 | vn 0.0000 1.0000 0.0000 11 | vn 0.4082 0.8165 0.4082 12 | s off 13 | f 2//1 3//1 1//1 14 | f 4//2 6//2 5//2 15 | -------------------------------------------------------------------------------- /models/gazebo.txt: -------------------------------------------------------------------------------- 1 | https://opengameart.org/content/gazebo-0 2 | https://creativecommons.org/publicdomain/zero/1.0/ 3 | -------------------------------------------------------------------------------- /models/zero_area_face.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.79 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Plane 4 | v -1.700000 0.000000 -1.000000 5 | v -1.000000 0.000000 -1.000000 6 | v 1.000000 0.000000 -1.000000 7 | vn 0.0000 0.0000 1.0000 8 | s off 9 | f 2//1 1//1 3//1 10 | -------------------------------------------------------------------------------- /models/zero_length_edge.obj: -------------------------------------------------------------------------------- 1 | # Blender v2.79 (sub 0) OBJ File: '' 2 | # www.blender.org 3 | o Plane 4 | v -1.000000 0.000000 1.000000 5 | v -1.000000 0.000000 1.000000 6 | v -1.000000 0.000000 -1.000000 7 | v 1.000000 0.000000 -1.000000 8 | vn 0.0000 1.0000 0.0000 9 | vn 0.0000 0.0000 1.0000 10 | s off 11 | f 1//1 4//1 3//1 12 | f 1//2 2//2 4//2 13 | -------------------------------------------------------------------------------- /source/examples/example.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpcy/xatlas/f700c7790aaa030e794b52ba7791a05c085faf0c/source/examples/example.cpp -------------------------------------------------------------------------------- /source/thirdparty/IconFontCppHeaders/licence.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 Juliette Foucaut and Doug Binks 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /source/thirdparty/OpenFBX/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Mikulas Florek 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/dxsdk/include/pix3_win.h: -------------------------------------------------------------------------------- 1 | /*==========================================================================; 2 | * 3 | * Copyright (C) Microsoft Corporation. All Rights Reserved. 4 | * 5 | * File: PIX3_win.h 6 | * Content: PIX include file 7 | * Don't include this file directly - use pix3.h 8 | * 9 | ****************************************************************************/ 10 | 11 | #pragma once 12 | 13 | #ifndef _PIX3_H_ 14 | #error "Don't include this file directly - use pix3.h" 15 | #endif 16 | 17 | #ifndef _PIX3_WIN_H_ 18 | #define _PIX3_WIN_H_ 19 | 20 | struct PIXEventsBlockInfo 21 | { 22 | }; 23 | 24 | struct PIXEventsThreadInfo 25 | { 26 | PIXEventsBlockInfo* block; 27 | UINT64* biasedLimit; 28 | UINT64* destination; 29 | UINT64* limit; 30 | UINT64 id; 31 | }; 32 | 33 | // The following defines denote the different metadata values that have been used 34 | // by tools to denote how to parse pix marker event data. The first two values 35 | // are legacy values. 36 | #define WINPIX_EVENT_UNICODE_VERSION 0 37 | #define WINPIX_EVENT_ANSI_VERSION 1 38 | #define WINPIX_EVENT_PIX3BLOB_VERSION 2 39 | 40 | #define D3D12_EVENT_METADATA WINPIX_EVENT_PIX3BLOB_VERSION 41 | 42 | __forceinline UINT64 PIXGetTimestampCounter() 43 | { 44 | LARGE_INTEGER time = {}; 45 | QueryPerformanceCounter(&time); 46 | return time.QuadPart; 47 | } 48 | 49 | #define PIXSetCPUMarkerOnContext(context, metadata, ...) MakeCPUSetMarkerForContext(metadata, context, __VA_ARGS__) 50 | #define PIXBeginCPUEventOnContext(context, metadata, ...) MakeCPUBeginEventForContext(metadata, context, __VA_ARGS__) 51 | #define PIXEndCPUEventOnContext(context) MakeCPUEndEventForContext(context) 52 | 53 | #endif //_PIX3_WIN_H_ 54 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/dxsdk/include/winapifamily.h: -------------------------------------------------------------------------------- 1 | /** 2 | * This file is part of the mingw-w64 runtime package. 3 | * No warranty is given; refer to the file DISCLAIMER within this package. 4 | */ 5 | 6 | #ifndef _INC_WINAPIFAMILY 7 | #define _INC_WINAPIFAMILY 8 | 9 | #define WINAPI_PARTITION_DESKTOP 0x1 10 | #define WINAPI_PARTITION_APP 0x2 11 | 12 | #define WINAPI_FAMILY_APP WINAPI_PARTITION_APP 13 | #define WINAPI_FAMILY_DESKTOP_APP (WINAPI_PARTITION_DESKTOP \ 14 | | WINAPI_PARTITION_APP) 15 | 16 | /* WINAPI_FAMILY can be either desktop + App, or App. */ 17 | #ifndef WINAPI_FAMILY 18 | #define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP 19 | #endif 20 | 21 | #define WINAPI_FAMILY_PARTITION(v) ((WINAPI_FAMILY & v) == v) 22 | #define WINAPI_FAMILY_ONE_PARTITION(vset, v) ((WINAPI_FAMILY & vset) == v) 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/GLES2/gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 21 | * 22 | * Adopters may modify khrplatform.h and this file to suit their platform. 23 | * Please contribute modifications back to Khronos as pull requests on the 24 | * public github repository: 25 | * https://github.com/KhronosGroup/OpenGL-Registry 26 | */ 27 | 28 | #include 29 | 30 | #ifndef GL_APICALL 31 | #define GL_APICALL KHRONOS_APICALL 32 | #endif 33 | 34 | #ifndef GL_APIENTRY 35 | #define GL_APIENTRY KHRONOS_APIENTRY 36 | #endif 37 | 38 | #endif /* __gl2platform_h_ */ 39 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/GLES3/gl3ext.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl3ext_h_ 2 | #define __gl3ext_h_ 3 | 4 | /* $Revision: 17809 $ on $Date:: 2012-05-14 08:03:36 -0700 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* OpenGL ES 3 Extensions 12 | * 13 | * After an OES extension's interactions with OpenGl ES 3.0 have been documented, 14 | * its tokens and function definitions should be added to this file in a manner 15 | * that does not conflict with gl2ext.h or gl3.h. 16 | * 17 | * Tokens and function definitions for extensions that have become standard 18 | * features in OpenGL ES 3.0 will not be added to this file. 19 | * 20 | * Applications using OpenGL-ES-2-only extensions should include gl2ext.h 21 | */ 22 | 23 | #endif /* __gl3ext_h_ */ 24 | 25 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/GLES3/gl3platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl3platform_h_ 2 | #define __gl3platform_h_ 3 | 4 | /* 5 | ** Copyright (c) 2017 The Khronos Group Inc. 6 | ** 7 | ** Licensed under the Apache License, Version 2.0 (the "License"); 8 | ** you may not use this file except in compliance with the License. 9 | ** You may obtain a copy of the License at 10 | ** 11 | ** http://www.apache.org/licenses/LICENSE-2.0 12 | ** 13 | ** Unless required by applicable law or agreed to in writing, software 14 | ** distributed under the License is distributed on an "AS IS" BASIS, 15 | ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 16 | ** See the License for the specific language governing permissions and 17 | ** limitations under the License. 18 | */ 19 | 20 | /* Platform-specific types and definitions for OpenGL ES 3.X gl3.h 21 | * 22 | * Adopters may modify khrplatform.h and this file to suit their platform. 23 | * Please contribute modifications back to Khronos as pull requests on the 24 | * public github repository: 25 | * https://github.com/KhronosGroup/OpenGL-Registry 26 | */ 27 | 28 | #include 29 | 30 | #ifndef GL_APICALL 31 | #define GL_APICALL KHRONOS_APICALL 32 | #endif 33 | 34 | #ifndef GL_APIENTRY 35 | #define GL_APIENTRY KHRONOS_APIENTRY 36 | #endif 37 | 38 | #endif /* __gl3platform_h_ */ 39 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/gl/GRemedyGLExtensions.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpcy/xatlas/f700c7790aaa030e794b52ba7791a05c085faf0c/source/thirdparty/bgfx/3rdparty/khronos/gl/GRemedyGLExtensions.h -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_H_ 2 | #define VULKAN_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | #include "vk_platform.h" 11 | #include "vulkan_core.h" 12 | 13 | #ifdef VK_USE_PLATFORM_ANDROID_KHR 14 | #include "vulkan_android.h" 15 | #endif 16 | 17 | #ifdef VK_USE_PLATFORM_FUCHSIA 18 | #include 19 | #include "vulkan_fuchsia.h" 20 | #endif 21 | 22 | #ifdef VK_USE_PLATFORM_IOS_MVK 23 | #include "vulkan_ios.h" 24 | #endif 25 | 26 | 27 | #ifdef VK_USE_PLATFORM_MACOS_MVK 28 | #include "vulkan_macos.h" 29 | #endif 30 | 31 | #ifdef VK_USE_PLATFORM_METAL_EXT 32 | #include "vulkan_metal.h" 33 | #endif 34 | 35 | #ifdef VK_USE_PLATFORM_VI_NN 36 | #include "vulkan_vi.h" 37 | #endif 38 | 39 | 40 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR 41 | #include 42 | #include "vulkan_wayland.h" 43 | #endif 44 | 45 | 46 | #ifdef VK_USE_PLATFORM_WIN32_KHR 47 | #include 48 | #include "vulkan_win32.h" 49 | #endif 50 | 51 | 52 | #ifdef VK_USE_PLATFORM_XCB_KHR 53 | #include 54 | #include "vulkan_xcb.h" 55 | #endif 56 | 57 | 58 | #ifdef VK_USE_PLATFORM_XLIB_KHR 59 | #include 60 | #include "vulkan_xlib.h" 61 | #endif 62 | 63 | 64 | #ifdef VK_USE_PLATFORM_XLIB_XRANDR_EXT 65 | #include 66 | #include 67 | #include "vulkan_xlib_xrandr.h" 68 | #endif 69 | 70 | 71 | #ifdef VK_USE_PLATFORM_GGP 72 | #include 73 | #include "vulkan_ggp.h" 74 | #endif 75 | 76 | 77 | #ifdef VK_ENABLE_BETA_EXTENSIONS 78 | #include "vulkan_beta.h" 79 | #endif 80 | 81 | #endif // VULKAN_H_ 82 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan_fuchsia.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_FUCHSIA_H_ 2 | #define VULKAN_FUCHSIA_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_FUCHSIA_imagepipe_surface 1 23 | #define VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION 1 24 | #define VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME "VK_FUCHSIA_imagepipe_surface" 25 | typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; 26 | typedef struct VkImagePipeSurfaceCreateInfoFUCHSIA { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkImagePipeSurfaceCreateFlagsFUCHSIA flags; 30 | zx_handle_t imagePipeHandle; 31 | } VkImagePipeSurfaceCreateInfoFUCHSIA; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateImagePipeSurfaceFUCHSIA)(VkInstance instance, const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateImagePipeSurfaceFUCHSIA( 37 | VkInstance instance, 38 | const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan_ios.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_IOS_H_ 2 | #define VULKAN_IOS_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_MVK_ios_surface 1 23 | #define VK_MVK_IOS_SURFACE_SPEC_VERSION 2 24 | #define VK_MVK_IOS_SURFACE_EXTENSION_NAME "VK_MVK_ios_surface" 25 | typedef VkFlags VkIOSSurfaceCreateFlagsMVK; 26 | typedef struct VkIOSSurfaceCreateInfoMVK { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkIOSSurfaceCreateFlagsMVK flags; 30 | const void* pView; 31 | } VkIOSSurfaceCreateInfoMVK; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateIOSSurfaceMVK)(VkInstance instance, const VkIOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateIOSSurfaceMVK( 37 | VkInstance instance, 38 | const VkIOSSurfaceCreateInfoMVK* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan_macos.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_MACOS_H_ 2 | #define VULKAN_MACOS_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_MVK_macos_surface 1 23 | #define VK_MVK_MACOS_SURFACE_SPEC_VERSION 2 24 | #define VK_MVK_MACOS_SURFACE_EXTENSION_NAME "VK_MVK_macos_surface" 25 | typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; 26 | typedef struct VkMacOSSurfaceCreateInfoMVK { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkMacOSSurfaceCreateFlagsMVK flags; 30 | const void* pView; 31 | } VkMacOSSurfaceCreateInfoMVK; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateMacOSSurfaceMVK)(VkInstance instance, const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateMacOSSurfaceMVK( 37 | VkInstance instance, 38 | const VkMacOSSurfaceCreateInfoMVK* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan_metal.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_METAL_H_ 2 | #define VULKAN_METAL_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_EXT_metal_surface 1 23 | 24 | #ifdef __OBJC__ 25 | @class CAMetalLayer; 26 | #else 27 | typedef void CAMetalLayer; 28 | #endif 29 | 30 | #define VK_EXT_METAL_SURFACE_SPEC_VERSION 1 31 | #define VK_EXT_METAL_SURFACE_EXTENSION_NAME "VK_EXT_metal_surface" 32 | typedef VkFlags VkMetalSurfaceCreateFlagsEXT; 33 | typedef struct VkMetalSurfaceCreateInfoEXT { 34 | VkStructureType sType; 35 | const void* pNext; 36 | VkMetalSurfaceCreateFlagsEXT flags; 37 | const CAMetalLayer* pLayer; 38 | } VkMetalSurfaceCreateInfoEXT; 39 | 40 | typedef VkResult (VKAPI_PTR *PFN_vkCreateMetalSurfaceEXT)(VkInstance instance, const VkMetalSurfaceCreateInfoEXT* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 41 | 42 | #ifndef VK_NO_PROTOTYPES 43 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateMetalSurfaceEXT( 44 | VkInstance instance, 45 | const VkMetalSurfaceCreateInfoEXT* pCreateInfo, 46 | const VkAllocationCallbacks* pAllocator, 47 | VkSurfaceKHR* pSurface); 48 | #endif 49 | 50 | #ifdef __cplusplus 51 | } 52 | #endif 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan_vi.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_VI_H_ 2 | #define VULKAN_VI_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_NN_vi_surface 1 23 | #define VK_NN_VI_SURFACE_SPEC_VERSION 1 24 | #define VK_NN_VI_SURFACE_EXTENSION_NAME "VK_NN_vi_surface" 25 | typedef VkFlags VkViSurfaceCreateFlagsNN; 26 | typedef struct VkViSurfaceCreateInfoNN { 27 | VkStructureType sType; 28 | const void* pNext; 29 | VkViSurfaceCreateFlagsNN flags; 30 | void* window; 31 | } VkViSurfaceCreateInfoNN; 32 | 33 | typedef VkResult (VKAPI_PTR *PFN_vkCreateViSurfaceNN)(VkInstance instance, const VkViSurfaceCreateInfoNN* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 34 | 35 | #ifndef VK_NO_PROTOTYPES 36 | VKAPI_ATTR VkResult VKAPI_CALL vkCreateViSurfaceNN( 37 | VkInstance instance, 38 | const VkViSurfaceCreateInfoNN* pCreateInfo, 39 | const VkAllocationCallbacks* pAllocator, 40 | VkSurfaceKHR* pSurface); 41 | #endif 42 | 43 | #ifdef __cplusplus 44 | } 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/3rdparty/khronos/vulkan-local/vulkan_xlib_xrandr.h: -------------------------------------------------------------------------------- 1 | #ifndef VULKAN_XLIB_XRANDR_H_ 2 | #define VULKAN_XLIB_XRANDR_H_ 1 3 | 4 | /* 5 | ** Copyright (c) 2015-2020 The Khronos Group Inc. 6 | ** 7 | ** SPDX-License-Identifier: Apache-2.0 8 | */ 9 | 10 | /* 11 | ** This header is generated from the Khronos Vulkan XML API Registry. 12 | ** 13 | */ 14 | 15 | 16 | #ifdef __cplusplus 17 | extern "C" { 18 | #endif 19 | 20 | 21 | 22 | #define VK_EXT_acquire_xlib_display 1 23 | #define VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION 1 24 | #define VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME "VK_EXT_acquire_xlib_display" 25 | typedef VkResult (VKAPI_PTR *PFN_vkAcquireXlibDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display); 26 | typedef VkResult (VKAPI_PTR *PFN_vkGetRandROutputDisplayEXT)(VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay); 27 | 28 | #ifndef VK_NO_PROTOTYPES 29 | VKAPI_ATTR VkResult VKAPI_CALL vkAcquireXlibDisplayEXT( 30 | VkPhysicalDevice physicalDevice, 31 | Display* dpy, 32 | VkDisplayKHR display); 33 | 34 | VKAPI_ATTR VkResult VKAPI_CALL vkGetRandROutputDisplayEXT( 35 | VkPhysicalDevice physicalDevice, 36 | Display* dpy, 37 | RROutput rrOutput, 38 | VkDisplayKHR* pDisplay); 39 | #endif 40 | 41 | #ifdef __cplusplus 42 | } 43 | #endif 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010-2020 Branimir Karadzic 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 17 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 18 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 21 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 22 | OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/amalgamated.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx.cpp" 7 | #include "debug_renderdoc.cpp" 8 | #include "dxgi.cpp" 9 | #include "glcontext_egl.cpp" 10 | #include "glcontext_glx.cpp" 11 | #include "glcontext_wgl.cpp" 12 | #include "glcontext_html5.cpp" 13 | #include "nvapi.cpp" 14 | #include "renderer_d3d11.cpp" 15 | #include "renderer_d3d12.cpp" 16 | #include "renderer_d3d9.cpp" 17 | #include "renderer_gl.cpp" 18 | #include "renderer_gnm.cpp" 19 | #include "renderer_noop.cpp" 20 | #include "renderer_nvn.cpp" 21 | #include "renderer_vk.cpp" 22 | #include "renderer_webgpu.cpp" 23 | #include "shader_dx9bc.cpp" 24 | #include "shader_dxbc.cpp" 25 | #include "shader_spirv.cpp" 26 | #include "topology.cpp" 27 | #include "vertexlayout.cpp" 28 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/amalgamated.mm: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "amalgamated.cpp" 7 | #include "glcontext_eagl.mm" 8 | #include "glcontext_nsgl.mm" 9 | #include "renderer_mtl.mm" 10 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/debug_renderdoc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_RENDERDOC_H_HEADER_GUARD 7 | #define BGFX_RENDERDOC_H_HEADER_GUARD 8 | 9 | namespace bgfx 10 | { 11 | void* loadRenderDoc(); 12 | void unloadRenderDoc(void*); 13 | void renderDocTriggerCapture(); 14 | 15 | } // namespace bgfx 16 | 17 | #endif // BGFX_RENDERDOC_H_HEADER_GUARD 18 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/emscripten.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_EMSCRIPTEN_H_HEADER_GUARD 7 | #define BGFX_EMSCRIPTEN_H_HEADER_GUARD 8 | 9 | #if BX_PLATFORM_EMSCRIPTEN 10 | 11 | # include 12 | # include 13 | 14 | # define _EMSCRIPTEN_CHECK(_check, _call) \ 15 | BX_MACRO_BLOCK_BEGIN \ 16 | EMSCRIPTEN_RESULT __result__ = _call; \ 17 | _check(EMSCRIPTEN_RESULT_SUCCESS == __result__, #_call " FAILED 0x%08x\n", (uint32_t)__result__); \ 18 | BX_UNUSED(__result__); \ 19 | BX_MACRO_BLOCK_END 20 | 21 | # if BGFX_CONFIG_DEBUG 22 | # define EMSCRIPTEN_CHECK(_call) _EMSCRIPTEN_CHECK(BX_ASSERT, _call) 23 | # else 24 | # define EMSCRIPTEN_CHECK(_call) _call 25 | # endif // BGFX_CONFIG_DEBUG 26 | 27 | # ifndef HTML5_TARGET_CANVAS_SELECTOR 28 | # define HTML5_TARGET_CANVAS_SELECTOR "#canvas" 29 | # endif // HTML5_TARGET_CANVAS_SELECTOR 30 | 31 | #endif // BX_PLATFORM_EMSCRIPTEN 32 | 33 | #endif // BGFX_EMSCRIPTEN_H_HEADER_GUARD 34 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear0.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragColor = bgfx_clear_color[0]; 13 | } 14 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear1.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | } 15 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear2.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | gl_FragData[2] = bgfx_clear_color[2]; 15 | } 16 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear3.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | gl_FragData[2] = bgfx_clear_color[2]; 15 | gl_FragData[3] = bgfx_clear_color[3]; 16 | } 17 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear4.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | gl_FragData[2] = bgfx_clear_color[2]; 15 | gl_FragData[3] = bgfx_clear_color[3]; 16 | gl_FragData[4] = bgfx_clear_color[4]; 17 | } 18 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear5.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | gl_FragData[2] = bgfx_clear_color[2]; 15 | gl_FragData[3] = bgfx_clear_color[3]; 16 | gl_FragData[4] = bgfx_clear_color[4]; 17 | gl_FragData[5] = bgfx_clear_color[5]; 18 | } 19 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear6.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | gl_FragData[2] = bgfx_clear_color[2]; 15 | gl_FragData[3] = bgfx_clear_color[3]; 16 | gl_FragData[4] = bgfx_clear_color[4]; 17 | gl_FragData[5] = bgfx_clear_color[5]; 18 | gl_FragData[6] = bgfx_clear_color[6]; 19 | } 20 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_clear7.sc: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_shader.sh" 7 | 8 | uniform vec4 bgfx_clear_color[8]; 9 | 10 | void main() 11 | { 12 | gl_FragData[0] = bgfx_clear_color[0]; 13 | gl_FragData[1] = bgfx_clear_color[1]; 14 | gl_FragData[2] = bgfx_clear_color[2]; 15 | gl_FragData[3] = bgfx_clear_color[3]; 16 | gl_FragData[4] = bgfx_clear_color[4]; 17 | gl_FragData[5] = bgfx_clear_color[5]; 18 | gl_FragData[6] = bgfx_clear_color[6]; 19 | gl_FragData[7] = bgfx_clear_color[7]; 20 | } 21 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/fs_debugfont.sc: -------------------------------------------------------------------------------- 1 | $input v_color0, v_color1, v_texcoord0 2 | 3 | /* 4 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 5 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 6 | */ 7 | 8 | #include "bgfx_shader.sh" 9 | 10 | SAMPLER2D(s_texColor, 0); 11 | 12 | void main() 13 | { 14 | vec4 color = mix(v_color1, v_color0, texture2D(s_texColor, v_texcoord0).xxxx); 15 | if (color.w < 1.0/255.0) 16 | { 17 | discard; 18 | } 19 | gl_FragColor = color; 20 | } 21 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/glcontext_eagl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_GLCONTEXT_EAGL_H_HEADER_GUARD 7 | #define BGFX_GLCONTEXT_EAGL_H_HEADER_GUARD 8 | 9 | #if BX_PLATFORM_IOS 10 | 11 | namespace bgfx { namespace gl 12 | { 13 | struct SwapChainGL; 14 | 15 | struct GlContext 16 | { 17 | GlContext() 18 | : m_current(0) 19 | , m_context(0) 20 | , m_fbo(0) 21 | , m_colorRbo(0) 22 | , m_depthStencilRbo(0) 23 | { 24 | } 25 | 26 | void create(uint32_t _width, uint32_t _height); 27 | void destroy(); 28 | void resize(uint32_t _width, uint32_t _height, uint32_t _flags); 29 | 30 | uint64_t getCaps() const; 31 | SwapChainGL* createSwapChain(void* _nwh); 32 | void destroySwapChain(SwapChainGL* _swapChain); 33 | void swap(SwapChainGL* _swapChain = NULL); 34 | void makeCurrent(SwapChainGL* _swapChain = NULL); 35 | 36 | void import(); 37 | 38 | GLuint getFbo() 39 | { 40 | return m_fbo; 41 | } 42 | 43 | bool isValid() const 44 | { 45 | return 0 != m_context; 46 | } 47 | 48 | SwapChainGL* m_current; 49 | void* m_context; 50 | 51 | GLuint m_fbo; 52 | GLuint m_colorRbo; 53 | GLuint m_depthStencilRbo; 54 | }; 55 | } /* namespace gl */ } // namespace bgfx 56 | 57 | #endif // BX_PLATFORM_IOS 58 | 59 | #endif // BGFX_GLCONTEXT_EAGL_H_HEADER_GUARD 60 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/glcontext_egl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_GLCONTEXT_EGL_H_HEADER_GUARD 7 | #define BGFX_GLCONTEXT_EGL_H_HEADER_GUARD 8 | 9 | #if BGFX_USE_EGL 10 | 11 | #include 12 | #include 13 | #if defined(Success) 14 | // X11 defines Success 15 | # undef Success 16 | #endif // defined(Success) 17 | 18 | namespace bgfx { namespace gl 19 | { 20 | struct SwapChainGL; 21 | 22 | struct GlContext 23 | { 24 | GlContext() 25 | : m_current(NULL) 26 | , m_context(NULL) 27 | , m_display(NULL) 28 | , m_surface(NULL) 29 | { 30 | } 31 | 32 | void create(uint32_t _width, uint32_t _height); 33 | void destroy(); 34 | void resize(uint32_t _width, uint32_t _height, uint32_t _flags); 35 | 36 | uint64_t getCaps() const; 37 | SwapChainGL* createSwapChain(void* _nwh); 38 | void destroySwapChain(SwapChainGL* _swapChain); 39 | void swap(SwapChainGL* _swapChain = NULL); 40 | void makeCurrent(SwapChainGL* _swapChain = NULL); 41 | 42 | void import(); 43 | 44 | bool isValid() const 45 | { 46 | return NULL != m_context; 47 | } 48 | 49 | void* m_eglLibrary; 50 | SwapChainGL* m_current; 51 | EGLConfig m_config; 52 | EGLContext m_context; 53 | EGLDisplay m_display; 54 | EGLSurface m_surface; 55 | }; 56 | } /* namespace gl */ } // namespace bgfx 57 | 58 | #endif // BGFX_USE_EGL 59 | 60 | #endif // BGFX_GLCONTEXT_EGL_H_HEADER_GUARD 61 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/glcontext_glx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_GLCONTEXT_GLX_H_HEADER_GUARD 7 | #define BGFX_GLCONTEXT_GLX_H_HEADER_GUARD 8 | 9 | #if BGFX_USE_GLX 10 | 11 | # include 12 | # define GLX_GLXEXT_LEGACY 13 | # include 14 | 15 | namespace bgfx { namespace gl 16 | { 17 | struct SwapChainGL; 18 | 19 | struct GlContext 20 | { 21 | GlContext() 22 | : m_current(NULL) 23 | , m_context(0) 24 | , m_visualInfo(NULL) 25 | , m_display(NULL) 26 | { 27 | } 28 | 29 | void create(uint32_t _width, uint32_t _height); 30 | void destroy(); 31 | void resize(uint32_t _width, uint32_t _height, uint32_t _flags); 32 | 33 | uint64_t getCaps() const; 34 | SwapChainGL* createSwapChain(void* _nwh); 35 | void destroySwapChain(SwapChainGL* _swapChain); 36 | void swap(SwapChainGL* _swapChain = NULL); 37 | void makeCurrent(SwapChainGL* _swapChain = NULL); 38 | 39 | void import(); 40 | 41 | bool isValid() const 42 | { 43 | return 0 != m_context; 44 | } 45 | 46 | SwapChainGL* m_current; 47 | GLXContext m_context; 48 | XVisualInfo* m_visualInfo; 49 | ::Display* m_display; 50 | }; 51 | } /* namespace gl */ } // namespace bgfx 52 | 53 | #endif // BGFX_USE_GLX 54 | 55 | #endif // BGFX_GLCONTEXT_GLX_H_HEADER_GUARD 56 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/glcontext_html5.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_GLCONTEXT_HTML5_H_HEADER_GUARD 7 | #define BGFX_GLCONTEXT_HTML5_H_HEADER_GUARD 8 | 9 | #if BGFX_USE_HTML5 10 | 11 | namespace bgfx { namespace gl 12 | { 13 | struct SwapChainGL; 14 | 15 | struct GlContext 16 | { 17 | GlContext() 18 | : m_current(NULL) 19 | , m_primary(NULL) 20 | { 21 | } 22 | 23 | void create(uint32_t _width, uint32_t _height); 24 | void destroy(); 25 | void resize(uint32_t _width, uint32_t _height, uint32_t _flags); 26 | 27 | uint64_t getCaps() const; 28 | SwapChainGL* createSwapChain(void* _nwh); 29 | void destroySwapChain(SwapChainGL* _swapChain); 30 | void swap(SwapChainGL* _swapChain = NULL); 31 | void makeCurrent(SwapChainGL* _swapChain = NULL); 32 | 33 | void import(int webGLVersion); 34 | 35 | bool isValid() const 36 | { 37 | return NULL != m_primary; 38 | } 39 | 40 | SwapChainGL* m_current; 41 | SwapChainGL* m_primary; 42 | }; 43 | } /* namespace gl */ } // namespace bgfx 44 | 45 | #endif // BGFX_USE_HTML5 46 | 47 | #endif // BGFX_GLCONTEXT_HTML5_H_HEADER_GUARD 48 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/glcontext_nsgl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD 7 | #define BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD 8 | 9 | #if BX_PLATFORM_OSX 10 | 11 | namespace bgfx { namespace gl 12 | { 13 | struct SwapChainGL; 14 | 15 | struct GlContext 16 | { 17 | GlContext() 18 | : m_context(NULL) 19 | , m_view(NULL) 20 | { 21 | } 22 | 23 | void create(uint32_t _width, uint32_t _height); 24 | void destroy(); 25 | void resize(uint32_t _width, uint32_t _height, uint32_t _flags); 26 | 27 | uint64_t getCaps() const; 28 | SwapChainGL* createSwapChain(void* _nwh); 29 | void destroySwapChain(SwapChainGL* _swapChain); 30 | void swap(SwapChainGL* _swapChain = NULL); 31 | void makeCurrent(SwapChainGL* _swapChain = NULL); 32 | 33 | void import(); 34 | 35 | bool isValid() const 36 | { 37 | return NULL != m_context; 38 | } 39 | 40 | void* m_context; 41 | void* m_view; 42 | }; 43 | } /* namespace gl */ } // namespace bgfx 44 | 45 | #endif // BX_PLATFORM_OSX 46 | 47 | #endif // BGFX_GLCONTEXT_NSGL_H_HEADER_GUARD 48 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/renderer_gnm.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_p.h" 7 | 8 | namespace bgfx 9 | { 10 | 11 | #define BGFX_DECLARE_EMBEDDED_SHADER(_name) \ 12 | extern const uint8_t* BX_CONCATENATE(_name, _pssl); \ 13 | extern const uint32_t BX_CONCATENATE(_name, _pssl_size); \ 14 | static const uint8_t BX_CONCATENATE(_name, _int_pssl)[] = { 0 }; \ 15 | const uint8_t* BX_CONCATENATE(_name, _pssl) = &BX_CONCATENATE(_name, _int_pssl)[0]; \ 16 | const uint32_t BX_CONCATENATE(_name, _pssl_size) = 1 17 | 18 | BGFX_DECLARE_EMBEDDED_SHADER(vs_debugfont); 19 | BGFX_DECLARE_EMBEDDED_SHADER(fs_debugfont); 20 | BGFX_DECLARE_EMBEDDED_SHADER(vs_clear); 21 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear0); 22 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear1); 23 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear2); 24 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear3); 25 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear4); 26 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear5); 27 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear6); 28 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear7); 29 | 30 | #undef BGFX_DECLARE_EMBEDDED_SHADER 31 | 32 | } // namespace bgfx 33 | 34 | namespace bgfx { namespace gnm 35 | { 36 | RendererContextI* rendererCreate(const Init& _init) 37 | { 38 | BX_UNUSED(_init); 39 | return NULL; 40 | } 41 | 42 | void rendererDestroy() 43 | { 44 | } 45 | } /* namespace gnm */ } // namespace bgfx 46 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/renderer_nvn.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bgfx_p.h" 7 | 8 | namespace bgfx 9 | { 10 | 11 | #define BGFX_DECLARE_EMBEDDED_SHADER(_name) \ 12 | extern const uint8_t* BX_CONCATENATE(_name, _nvn); \ 13 | extern const uint32_t BX_CONCATENATE(_name, _nvn_size); \ 14 | static const uint8_t BX_CONCATENATE(_name, _int_nvn)[] = { 0 }; \ 15 | const uint8_t* BX_CONCATENATE(_name, _nvn) = &BX_CONCATENATE(_name, _int_nvn)[0]; \ 16 | const uint32_t BX_CONCATENATE(_name, _nvn_size) = 1 17 | 18 | BGFX_DECLARE_EMBEDDED_SHADER(vs_debugfont); 19 | BGFX_DECLARE_EMBEDDED_SHADER(fs_debugfont); 20 | BGFX_DECLARE_EMBEDDED_SHADER(vs_clear); 21 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear0); 22 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear1); 23 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear2); 24 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear3); 25 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear4); 26 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear5); 27 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear6); 28 | BGFX_DECLARE_EMBEDDED_SHADER(fs_clear7); 29 | 30 | #undef BGFX_DECLARE_EMBEDDED_SHADER 31 | 32 | } // namespace bgfx 33 | 34 | namespace bgfx { namespace nvn 35 | { 36 | RendererContextI* rendererCreate(const Init& _init) 37 | { 38 | BX_UNUSED(_init); 39 | return NULL; 40 | } 41 | 42 | void rendererDestroy() 43 | { 44 | } 45 | } /* namespace nvn */ } // namespace bgfx 46 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/shader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_SHADER_H 7 | #define BGFX_SHADER_H 8 | 9 | #include 10 | 11 | namespace bgfx 12 | { 13 | /// 14 | void disassemble(bx::WriterI* _writer, bx::ReaderSeekerI* _reader, bx::Error* _err = NULL); 15 | 16 | /// 17 | void disassemble(bx::WriterI* _writer, const void* _data, uint32_t _size, bx::Error* _err = NULL); 18 | 19 | } // namespace bgfx 20 | 21 | #endif // BGFX_SHADER_H 22 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 v_color0 : COLOR0 = vec4(1.0, 0.0, 0.0, 1.0); 2 | vec4 v_color1 : COLOR1 = vec4(0.0, 1.0, 0.0, 1.0); 3 | vec2 v_texcoord0 : TEXCOORD0 = vec2(0.0, 0.0); 4 | vec3 v_normal : TEXCOORD1 = vec3(0.0, 1.0, 0.0); 5 | 6 | vec3 a_position : POSITION; 7 | vec3 a_normal : NORMAL0; 8 | vec4 a_color0 : COLOR0; 9 | vec4 a_color1 : COLOR1; 10 | vec2 a_texcoord0 : TEXCOORD0; 11 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/version.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | /* 7 | * 8 | * AUTO GENERATED! DO NOT EDIT! 9 | * 10 | */ 11 | 12 | #define BGFX_REV_NUMBER 7238 13 | #define BGFX_REV_SHA1 "8065659e90a2673dd2ac4b12f193604a631833e3" 14 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/vertexlayout.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BGFX_VERTEXDECL_H_HEADER_GUARD 7 | #define BGFX_VERTEXDECL_H_HEADER_GUARD 8 | 9 | #include 10 | #include 11 | 12 | namespace bgfx 13 | { 14 | /// 15 | void initAttribTypeSizeTable(RendererType::Enum _type); 16 | 17 | /// Returns attribute name. 18 | const char* getAttribName(Attrib::Enum _attr); 19 | 20 | /// 21 | const char* getAttribNameShort(Attrib::Enum _attr); 22 | 23 | /// 24 | Attrib::Enum idToAttrib(uint16_t id); 25 | 26 | /// 27 | uint16_t attribToId(Attrib::Enum _attr); 28 | 29 | /// 30 | AttribType::Enum idToAttribType(uint16_t id); 31 | 32 | /// 33 | int32_t write(bx::WriterI* _writer, const bgfx::VertexLayout& _layout, bx::Error* _err = NULL); 34 | 35 | /// 36 | int32_t read(bx::ReaderI* _reader, bgfx::VertexLayout& _layout, bx::Error* _err = NULL); 37 | 38 | /// 39 | uint32_t weldVertices(void* _output, const VertexLayout& _layout, const void* _data, uint32_t _num, bool _index32, float _epsilon, bx::AllocatorI* _allocator); 40 | 41 | } // namespace bgfx 42 | 43 | #endif // BGFX_VERTEXDECL_H_HEADER_GUARD 44 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/vs_clear.sc: -------------------------------------------------------------------------------- 1 | $input a_position 2 | 3 | /* 4 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 5 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 6 | */ 7 | 8 | #include "bgfx_shader.sh" 9 | 10 | uniform vec4 bgfx_clear_depth; 11 | 12 | void main() 13 | { 14 | gl_Position = vec4(a_position.xy, bgfx_clear_depth.x, 1.0); 15 | } 16 | -------------------------------------------------------------------------------- /source/thirdparty/bgfx/src/vs_debugfont.sc: -------------------------------------------------------------------------------- 1 | $input a_position, a_color0, a_color1, a_texcoord0 2 | $output v_color0, v_color1, v_texcoord0 3 | 4 | /* 5 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 6 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 7 | */ 8 | 9 | #include "bgfx_shader.sh" 10 | 11 | void main() 12 | { 13 | gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0) ); 14 | v_texcoord0 = a_texcoord0; 15 | v_color0 = a_color0; 16 | v_color1 = a_color1; 17 | } 18 | -------------------------------------------------------------------------------- /source/thirdparty/bimg/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010-2020 Branimir Karadzic 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 17 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 18 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 21 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 22 | OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /source/thirdparty/bimg/include/bimg/decode.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BIMG_DECODE_H_HEADER_GUARD 7 | #define BIMG_DECODE_H_HEADER_GUARD 8 | 9 | #include "bimg.h" 10 | 11 | namespace bimg 12 | { 13 | /// 14 | ImageContainer* imageParse( 15 | bx::AllocatorI* _allocator 16 | , const void* _data 17 | , uint32_t _size 18 | , TextureFormat::Enum _dstFormat = TextureFormat::Count 19 | , bx::Error* _err = NULL 20 | ); 21 | 22 | } // namespace bimg 23 | 24 | #endif // BIMG_DECODE_H_HEADER_GUARD 25 | -------------------------------------------------------------------------------- /source/thirdparty/bimg/src/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BIMG_CONFIG_H_HEADER_GUARD 7 | #define BIMG_CONFIG_H_HEADER_GUARD 8 | 9 | #include 10 | 11 | #ifndef BIMG_DECODE_ENABLE 12 | # define BIMG_DECODE_ENABLE 1 13 | #endif // BIMG_DECODE_ENABLE 14 | 15 | #ifndef BIMG_DECODE_BC1 16 | # define BIMG_DECODE_BC1 BIMG_DECODE_ENABLE 17 | #endif // BIMG_DECODE_BC1 18 | 19 | #ifndef BIMG_DECODE_BC2 20 | # define BIMG_DECODE_BC2 BIMG_DECODE_ENABLE 21 | #endif // BIMG_DECODE_BC2 22 | 23 | #ifndef BIMG_DECODE_BC3 24 | # define BIMG_DECODE_BC3 BIMG_DECODE_ENABLE 25 | #endif // BIMG_DECODE_BC3 26 | 27 | #ifndef BIMG_DECODE_BC4 28 | # define BIMG_DECODE_BC4 BIMG_DECODE_ENABLE 29 | #endif // BIMG_DECODE_BC4 30 | 31 | #ifndef BIMG_DECODE_BC5 32 | # define BIMG_DECODE_BC5 BIMG_DECODE_ENABLE 33 | #endif // BIMG_DECODE_BC5 34 | 35 | #ifndef BIMG_DECODE_BC6 36 | # define BIMG_DECODE_BC6 BIMG_DECODE_ENABLE 37 | #endif // BIMG_DECODE_BC6 38 | 39 | #ifndef BIMG_DECODE_BC7 40 | # define BIMG_DECODE_BC7 BIMG_DECODE_ENABLE 41 | #endif // BIMG_DECODE_BC7 42 | 43 | #ifndef BIMG_DECODE_ATC 44 | # define BIMG_DECODE_ATC BIMG_DECODE_ENABLE 45 | #endif // BIMG_DECODE_ATC 46 | 47 | #ifndef BIMG_DECODE_ASTC 48 | # define BIMG_DECODE_ASTC BIMG_DECODE_ENABLE 49 | #endif // BIMG_DECODE_ASTC 50 | 51 | #ifndef BIMG_DECODE_ETC1 52 | # define BIMG_DECODE_ETC1 BIMG_DECODE_ENABLE 53 | #endif // BIMG_DECODE_ETC1 54 | 55 | #ifndef BIMG_DECODE_ETC2 56 | # define BIMG_DECODE_ETC2 BIMG_DECODE_ENABLE 57 | #endif // BIMG_DECODE_ETC2 58 | 59 | #endif // BIMG_CONFIG_H_HEADER_GUARD 60 | -------------------------------------------------------------------------------- /source/thirdparty/bimg/src/image_gnf.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bimg#license-bsd-2-clause 4 | */ 5 | 6 | #include "bimg_p.h" 7 | 8 | namespace bimg 9 | { 10 | bool imageParseGnf(ImageContainer& _imageContainer, bx::ReaderSeekerI* _reader, bx::Error* _err) 11 | { 12 | BX_UNUSED(_imageContainer, _reader, _err); 13 | BX_ERROR_SET(_err, BIMG_ERROR, "GNF: not supported."); 14 | return false; 15 | } 16 | 17 | ImageContainer* imageParseGnf(bx::AllocatorI* _allocator, const void* _src, uint32_t _size, bx::Error* _err) 18 | { 19 | BX_UNUSED(_allocator); 20 | 21 | bx::MemoryReader reader(_src, _size); 22 | 23 | uint32_t magic; 24 | bx::read(&reader, magic); 25 | 26 | ImageContainer imageContainer; 27 | if (BIMG_CHUNK_MAGIC_GNF != magic 28 | || !imageParseGnf(imageContainer, &reader, _err) ) 29 | { 30 | return NULL; 31 | } 32 | 33 | BX_ERROR_SET(_err, BIMG_ERROR, "GNF: not supported."); 34 | return NULL; 35 | } 36 | 37 | } // namespace bimg 38 | -------------------------------------------------------------------------------- /source/thirdparty/bx/3rdparty/ini/README.md: -------------------------------------------------------------------------------- 1 | https://github.com/mattiasgustavsson/libs/ 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2010-2020 Branimir Karadzic 2 | 3 | Redistribution and use in source and binary forms, with or without modification, 4 | are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright notice, this 7 | list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 14 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 | IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 17 | INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 18 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 | OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 21 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 22 | OF THE POSSIBILITY OF SUCH DAMAGE. 23 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_CONFIG_H_HEADER_GUARD 7 | #define BX_CONFIG_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | #ifndef BX_CONFIG_ALLOCATOR_DEBUG 12 | # define BX_CONFIG_ALLOCATOR_DEBUG 0 13 | #endif // BX_CONFIG_DEBUG_ALLOC 14 | 15 | #ifndef BX_CONFIG_SUPPORTS_THREADING 16 | # define BX_CONFIG_SUPPORTS_THREADING !(0 \ 17 | || BX_PLATFORM_EMSCRIPTEN \ 18 | ) 19 | #endif // BX_CONFIG_SUPPORTS_THREADING 20 | 21 | #endif // BX_CONFIG_H_HEADER_GUARD 22 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/cpu.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_CPU_H_HEADER_GUARD 7 | #define BX_CPU_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | void readBarrier(); 15 | 16 | /// 17 | void writeBarrier(); 18 | 19 | /// 20 | void readWriteBarrier(); 21 | 22 | /// 23 | void memoryBarrier(); 24 | 25 | /// 26 | template 27 | Ty atomicFetchAndAdd(volatile Ty* _ptr, Ty _value); 28 | 29 | /// 30 | template 31 | Ty atomicAddAndFetch(volatile Ty* _ptr, Ty _value); 32 | 33 | /// 34 | template 35 | Ty atomicFetchAndSub(volatile Ty* _ptr, Ty _value); 36 | 37 | /// 38 | template 39 | Ty atomicSubAndFetch(volatile Ty* _ptr, Ty _value); 40 | 41 | /// 42 | template 43 | Ty atomicCompareAndSwap(volatile Ty* _ptr, Ty _old, Ty _new); 44 | 45 | /// 46 | template 47 | Ty atomicFetchTestAndAdd(volatile Ty* _ptr, Ty _test, Ty _value); 48 | 49 | /// 50 | template 51 | Ty atomicFetchTestAndSub(volatile Ty* _ptr, Ty _test, Ty _value); 52 | 53 | /// 54 | template 55 | Ty atomicFetchAndAddsat(volatile Ty* _ptr, Ty _value, Ty _max); 56 | 57 | /// 58 | template 59 | Ty atomicFetchAndSubsat(volatile Ty* _ptr, Ty _value, Ty _min); 60 | 61 | /// 62 | void* atomicExchangePtr(void** _ptr, void* _new); 63 | 64 | } // namespace bx 65 | 66 | #include "inline/cpu.inl" 67 | 68 | #endif // BX_CPU_H_HEADER_GUARD 69 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/debug.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_DEBUG_H_HEADER_GUARD 7 | #define BX_DEBUG_H_HEADER_GUARD 8 | 9 | #include "string.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | void debugBreak(); 15 | 16 | /// 17 | void debugOutput(const char* _out); 18 | 19 | /// 20 | void debugOutput(const StringView& _str); 21 | 22 | /// 23 | void debugPrintfVargs(const char* _format, va_list _argList); 24 | 25 | /// 26 | void debugPrintf(const char* _format, ...); 27 | 28 | /// 29 | void debugPrintfData(const void* _data, uint32_t _size, const char* _format, ...); 30 | 31 | /// 32 | struct WriterI* getDebugOut(); 33 | 34 | } // namespace bx 35 | 36 | #endif // BX_DEBUG_H_HEADER_GUARD 37 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/endian.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_ENDIAN_H_HEADER_GUARD 7 | #define BX_ENDIAN_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | int16_t endianSwap(int16_t _in); 15 | 16 | /// 17 | uint16_t endianSwap(uint16_t _in); 18 | 19 | /// 20 | int32_t endianSwap(int32_t _in); 21 | 22 | /// 23 | uint32_t endianSwap(uint32_t _in); 24 | 25 | /// 26 | int64_t endianSwap(int64_t _in); 27 | 28 | /// 29 | uint64_t endianSwap(uint64_t _in); 30 | 31 | /// Input argument is encoded as little endian, convert it if neccessary 32 | /// depending on host CPU endianess. 33 | template 34 | Ty toLittleEndian(const Ty _in); 35 | 36 | /// Input argument is encoded as big endian, convert it if neccessary 37 | /// depending on host CPU endianess. 38 | template 39 | Ty toBigEndian(const Ty _in); 40 | 41 | /// If _littleEndian is true, converts input argument to from little endian 42 | /// to host CPU endiness. 43 | template 44 | Ty toHostEndian(const Ty _in, bool _fromLittleEndian); 45 | 46 | } // namespace bx 47 | 48 | #include "inline/endian.inl" 49 | 50 | #endif // BX_ENDIAN_H_HEADER_GUARD 51 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/float4x4_t.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_FLOAT4X4_H_HEADER_GUARD 7 | #define BX_FLOAT4X4_H_HEADER_GUARD 8 | 9 | #include "simd_t.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | BX_ALIGN_DECL_16(struct) float4x4_t 15 | { 16 | simd128_t col[4]; 17 | }; 18 | 19 | /// 20 | simd128_t simd_mul_xyz1(simd128_t _a, const float4x4_t* _b); 21 | 22 | /// 23 | simd128_t simd_mul(simd128_t _a, const float4x4_t* _b); 24 | 25 | /// Multiplies two matrices 26 | void float4x4_mul(float4x4_t* _result, const float4x4_t* _a, const float4x4_t* _b); 27 | 28 | /// Multiplies two 3x4 affine matrices (i.e. "model" or "world" matrices). 29 | /// This function is a micro-optimized version of float4x4_mul() in the case 30 | /// when the last row of the both input matrices are (0, 0, 0, 1). 31 | void model4x4_mul(float4x4_t* _result, const float4x4_t* _a, const float4x4_t* _b); 32 | 33 | /// Multiplies a 3x4 affine matrix with a general 4x4 matrix. 34 | /// This function is a micro-optimized version of float4x4_mul() in the case 35 | /// when the last row of the _model input matrix is (0, 0, 0, 1). 36 | void model4x4_mul_viewproj4x4(float4x4_t* _result, const float4x4_t* _model, const float4x4_t* _viewProj); 37 | 38 | /// 39 | void float4x4_transpose(float4x4_t* _result, const float4x4_t* _mtx); 40 | 41 | /// 42 | void float4x4_inverse(float4x4_t* _result, const float4x4_t* _a); 43 | 44 | } // namespace bx 45 | 46 | #include "inline/float4x4_t.inl" 47 | 48 | #endif // BX_FLOAT4X4_H_HEADER_GUARD 49 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/inline/error.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_ERROR_H_HEADER_GUARD 7 | # error "Must be included from bx/error!" 8 | #endif // BX_ERROR_H_HEADER_GUARD 9 | 10 | namespace bx 11 | { 12 | inline Error::Error() 13 | : m_code(0) 14 | { 15 | } 16 | 17 | inline void Error::reset() 18 | { 19 | m_code = 0; 20 | m_msg.clear(); 21 | } 22 | 23 | inline void Error::setError(ErrorResult _errorResult, const StringView& _msg) 24 | { 25 | BX_ASSERT(0 != _errorResult.code, "Invalid ErrorResult passed to setError!"); 26 | 27 | if (!isOk() ) 28 | { 29 | return; 30 | } 31 | 32 | m_code = _errorResult.code; 33 | m_msg = _msg; 34 | } 35 | 36 | inline bool Error::isOk() const 37 | { 38 | return 0 == m_code; 39 | } 40 | 41 | inline ErrorResult Error::get() const 42 | { 43 | ErrorResult result = { m_code }; 44 | return result; 45 | } 46 | 47 | inline const StringView& Error::getMessage() const 48 | { 49 | return m_msg; 50 | } 51 | 52 | inline bool Error::operator==(const ErrorResult& _rhs) const 53 | { 54 | return _rhs.code == m_code; 55 | } 56 | 57 | inline bool Error::operator!=(const ErrorResult& _rhs) const 58 | { 59 | return _rhs.code != m_code; 60 | } 61 | 62 | inline ErrorScope::ErrorScope(Error* _err) 63 | : m_err(_err) 64 | { 65 | BX_ASSERT(NULL != _err, "_err can't be NULL"); 66 | } 67 | 68 | inline ErrorScope::~ErrorScope() 69 | { 70 | BX_ASSERT(m_err->isOk(), "Error: %d", m_err->get().code); 71 | } 72 | 73 | } // namespace bx 74 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/inline/mpscqueue.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_MPSCQUEUE_H_HEADER_GUARD 7 | # error "Must be included from bx/mpscqueue.h!" 8 | #endif // BX_MPSCQUEUE_H_HEADER_GUARD 9 | 10 | namespace bx 11 | { 12 | template 13 | inline MpScUnboundedQueueT::MpScUnboundedQueueT(AllocatorI* _allocator) 14 | : m_queue(_allocator) 15 | { 16 | } 17 | 18 | template 19 | inline MpScUnboundedQueueT::~MpScUnboundedQueueT() 20 | { 21 | } 22 | 23 | template 24 | inline void MpScUnboundedQueueT::push(Ty* _ptr) 25 | { 26 | MutexScope lock(m_write); 27 | m_queue.push(_ptr); 28 | } 29 | 30 | template 31 | inline Ty* MpScUnboundedQueueT::peek() 32 | { 33 | return m_queue.peek(); 34 | } 35 | 36 | template 37 | inline Ty* MpScUnboundedQueueT::pop() 38 | { 39 | return m_queue.pop(); 40 | } 41 | 42 | template 43 | inline MpScUnboundedBlockingQueue::MpScUnboundedBlockingQueue(AllocatorI* _allocator) 44 | : m_queue(_allocator) 45 | { 46 | } 47 | 48 | template 49 | inline MpScUnboundedBlockingQueue::~MpScUnboundedBlockingQueue() 50 | { 51 | } 52 | 53 | template 54 | inline void MpScUnboundedBlockingQueue::push(Ty* _ptr) 55 | { 56 | m_queue.push(_ptr); 57 | m_sem.post(); 58 | } 59 | 60 | template 61 | inline Ty* MpScUnboundedBlockingQueue::pop() 62 | { 63 | m_sem.wait(); 64 | return m_queue.pop(); 65 | } 66 | 67 | } // namespace bx 68 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/inline/mutex.inl: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_MUTEX_H_HEADER_GUARD 7 | # error "Must be included from bx/mutex.h!" 8 | #endif // BX_MUTEX_H_HEADER_GUARD 9 | 10 | namespace bx 11 | { 12 | inline MutexScope::MutexScope(Mutex& _mutex) 13 | : m_mutex(_mutex) 14 | { 15 | m_mutex.lock(); 16 | } 17 | 18 | inline MutexScope::~MutexScope() 19 | { 20 | m_mutex.unlock(); 21 | } 22 | 23 | } // namespace bx 24 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/maputil.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_MAPUTIL_H_HEADER_GUARD 7 | #define BX_MAPUTIL_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | template 14 | typename MapType::iterator mapInsertOrUpdate(MapType& _map, const typename MapType::key_type& _key, const typename MapType::mapped_type& _value) 15 | { 16 | typename MapType::iterator it = _map.lower_bound(_key); 17 | if (it != _map.end() 18 | && !_map.key_comp()(_key, it->first) ) 19 | { 20 | it->second = _value; 21 | return it; 22 | } 23 | 24 | typename MapType::value_type pair(_key, _value); 25 | return _map.insert(it, pair); 26 | } 27 | 28 | template 29 | bool mapRemove(MapType& _map, const typename MapType::value_type::first_type& _first) 30 | { 31 | typename MapType::const_iterator it = _map.find(_first); 32 | if (it != _map.end() ) 33 | { 34 | _map.erase(it); 35 | return true; 36 | } 37 | 38 | return false; 39 | } 40 | 41 | template 42 | bool mapRemove(MapType& _map, const typename MapType::value_type::second_type& _second) 43 | { 44 | for (typename MapType::const_iterator it = _map.begin(), itEnd = _map.end(); it != itEnd; ++it) 45 | { 46 | if (it->second == _second) 47 | { 48 | _map.erase(it); 49 | return true; 50 | } 51 | } 52 | 53 | return false; 54 | } 55 | 56 | } // namespace bx 57 | 58 | #endif // BX_MAPUTIL_H_HEADER_GUARD 59 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/mpscqueue.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_MPSCQUEUE_H_HEADER_GUARD 7 | #define BX_MPSCQUEUE_H_HEADER_GUARD 8 | 9 | #include "allocator.h" 10 | #include "mutex.h" 11 | #include "spscqueue.h" 12 | 13 | namespace bx 14 | { 15 | /// 16 | template 17 | class MpScUnboundedQueueT 18 | { 19 | BX_CLASS(MpScUnboundedQueueT 20 | , NO_COPY 21 | , NO_ASSIGNMENT 22 | ); 23 | 24 | public: 25 | /// 26 | MpScUnboundedQueueT(AllocatorI* _allocator); 27 | 28 | /// 29 | ~MpScUnboundedQueueT(); 30 | 31 | /// 32 | void push(Ty* _ptr); // producer only 33 | 34 | /// 35 | Ty* peek(); // consumer only 36 | 37 | /// 38 | Ty* pop(); // consumer only 39 | 40 | private: 41 | Mutex m_write; 42 | SpScUnboundedQueueT m_queue; 43 | }; 44 | 45 | /// 46 | template 47 | class MpScUnboundedBlockingQueue 48 | { 49 | BX_CLASS(MpScUnboundedBlockingQueue 50 | , NO_COPY 51 | , NO_ASSIGNMENT 52 | ); 53 | 54 | public: 55 | /// 56 | MpScUnboundedBlockingQueue(AllocatorI* _allocator); 57 | 58 | /// 59 | ~MpScUnboundedBlockingQueue(); 60 | 61 | /// 62 | void push(Ty* _ptr); // producer only 63 | 64 | /// 65 | Ty* pop(); // consumer only 66 | 67 | private: 68 | MpScUnboundedQueueT m_queue; 69 | Semaphore m_sem; 70 | }; 71 | 72 | } // namespace bx 73 | 74 | #include "inline/mpscqueue.inl" 75 | 76 | #endif // BX_MPSCQUEUE_H_HEADER_GUARD 77 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/mutex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_MUTEX_H_HEADER_GUARD 7 | #define BX_MUTEX_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | class Mutex 15 | { 16 | BX_CLASS(Mutex 17 | , NO_COPY 18 | , NO_ASSIGNMENT 19 | ); 20 | 21 | public: 22 | /// 23 | Mutex(); 24 | 25 | /// 26 | ~Mutex(); 27 | 28 | /// 29 | void lock(); 30 | 31 | /// 32 | void unlock(); 33 | 34 | private: 35 | BX_ALIGN_DECL(16, uint8_t) m_internal[64]; 36 | }; 37 | 38 | /// 39 | class MutexScope 40 | { 41 | BX_CLASS(MutexScope 42 | , NO_DEFAULT_CTOR 43 | , NO_COPY 44 | , NO_ASSIGNMENT 45 | ); 46 | 47 | public: 48 | /// 49 | MutexScope(Mutex& _mutex); 50 | 51 | /// 52 | ~MutexScope(); 53 | 54 | private: 55 | Mutex& m_mutex; 56 | }; 57 | 58 | } // namespace bx 59 | 60 | #include "inline/mutex.inl" 61 | 62 | #endif // BX_MUTEX_H_HEADER_GUARD 63 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/os.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_OS_H_HEADER_GUARD 7 | #define BX_OS_H_HEADER_GUARD 8 | 9 | #include "debug.h" 10 | #include "filepath.h" 11 | 12 | #if BX_PLATFORM_OSX 13 | # define BX_DL_EXT "dylib" 14 | #elif BX_PLATFORM_WINDOWS 15 | # define BX_DL_EXT "dll" 16 | #else 17 | # define BX_DL_EXT "so" 18 | #endif // 19 | 20 | namespace bx 21 | { 22 | /// 23 | void sleep(uint32_t _ms); 24 | 25 | /// 26 | void yield(); 27 | 28 | /// 29 | uint32_t getTid(); 30 | 31 | /// 32 | size_t getProcessMemoryUsed(); 33 | 34 | /// 35 | void* dlopen(const FilePath& _filePath); 36 | 37 | /// 38 | void dlclose(void* _handle); 39 | 40 | /// 41 | void* dlsym(void* _handle, const StringView& _symbol); 42 | 43 | /// 44 | bool getEnv(char* _out, uint32_t* _inOutSize, const StringView& _name); 45 | 46 | /// 47 | void setEnv(const StringView& _name, const StringView& _value); 48 | 49 | /// 50 | int chdir(const char* _path); 51 | 52 | /// 53 | void* exec(const char* const* _argv); 54 | 55 | } // namespace bx 56 | 57 | #endif // BX_OS_H_HEADER_GUARD 58 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/process.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_PROCESS_H_HEADER_GUARD 7 | #define BX_PROCESS_H_HEADER_GUARD 8 | 9 | #include "readerwriter.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | class ProcessReader 15 | : public ProcessOpenI 16 | , public CloserI 17 | , public ReaderI 18 | { 19 | public: 20 | /// 21 | ProcessReader(); 22 | 23 | /// 24 | ~ProcessReader(); 25 | 26 | /// 27 | virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) override; 28 | 29 | /// 30 | virtual void close() override; 31 | 32 | /// 33 | virtual int32_t read(void* _data, int32_t _size, Error* _err) override; 34 | 35 | /// 36 | int32_t getExitCode() const; 37 | 38 | private: 39 | void* m_file; 40 | int32_t m_exitCode; 41 | }; 42 | 43 | /// 44 | class ProcessWriter 45 | : public ProcessOpenI 46 | , public CloserI 47 | , public WriterI 48 | { 49 | public: 50 | /// 51 | ProcessWriter(); 52 | 53 | /// 54 | ~ProcessWriter(); 55 | 56 | /// 57 | virtual bool open(const FilePath& _filePath, const StringView& _args, Error* _err) override; 58 | 59 | /// 60 | virtual void close() override; 61 | 62 | /// 63 | virtual int32_t write(const void* _data, int32_t _size, Error* _err) override; 64 | 65 | /// 66 | int32_t getExitCode() const; 67 | 68 | private: 69 | void* m_file; 70 | int32_t m_exitCode; 71 | }; 72 | 73 | } // namespace bx 74 | 75 | #endif // BX_PROCESS_H_HEADER_GUARD 76 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/semaphore.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_SEM_H_HEADER_GUARD 7 | #define BX_SEM_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | class Semaphore 15 | { 16 | BX_CLASS(Semaphore 17 | , NO_COPY 18 | , NO_ASSIGNMENT 19 | ); 20 | 21 | public: 22 | /// 23 | Semaphore(); 24 | 25 | /// 26 | ~Semaphore(); 27 | 28 | /// 29 | void post(uint32_t _count = 1); 30 | 31 | /// 32 | bool wait(int32_t _msecs = -1); 33 | 34 | private: 35 | BX_ALIGN_DECL(16, uint8_t) m_internal[128]; 36 | }; 37 | 38 | } // namespace bx 39 | 40 | #endif // BX_SEM_H_HEADER_GUARD 41 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/settings.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_SETTINGS_H_HEADER_GUARD 7 | #define BX_SETTINGS_H_HEADER_GUARD 8 | 9 | #include "allocator.h" 10 | #include "readerwriter.h" 11 | #include "string.h" 12 | 13 | namespace bx 14 | { 15 | /// 16 | class Settings 17 | { 18 | public: 19 | /// 20 | Settings(AllocatorI* _allocator, const void* _data = NULL, uint32_t _len = 0); 21 | 22 | /// 23 | ~Settings(); 24 | 25 | /// 26 | void clear(); 27 | 28 | /// 29 | void load(const void* _data, uint32_t _len); 30 | 31 | /// 32 | StringView get(const StringView& _name) const; 33 | 34 | /// 35 | void set(const StringView& _name, const StringView& _value = ""); 36 | 37 | /// 38 | void remove(const StringView& _name) const; 39 | 40 | /// 41 | int32_t read(ReaderSeekerI* _reader, Error* _err); 42 | 43 | /// 44 | int32_t write(WriterI* _writer, Error* _err) const; 45 | 46 | private: 47 | Settings(); 48 | 49 | AllocatorI* m_allocator; 50 | void* m_ini; 51 | }; 52 | 53 | /// 54 | int32_t read(ReaderSeekerI* _reader, Settings& _settings, Error* _err = NULL); 55 | 56 | /// 57 | int32_t write(WriterI* _writer, const Settings& _settings, Error* _err = NULL); 58 | 59 | } // namespace bx 60 | 61 | #endif // BX_SETTINGS_H_HEADER_GUARD 62 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/sort.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_SORT_H_HEADER_GUARD 7 | #define BX_SORT_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | typedef int32_t (*ComparisonFn)(const void* _lhs, const void* _rhs); 15 | 16 | /// 17 | void quickSort( 18 | void* _data 19 | , uint32_t _num 20 | , uint32_t _stride 21 | , const ComparisonFn _fn 22 | ); 23 | 24 | /// 25 | void radixSort( 26 | uint32_t* _keys 27 | , uint32_t* _tempKeys 28 | , uint32_t _size 29 | ); 30 | 31 | /// 32 | template 33 | void radixSort( 34 | uint32_t* _keys 35 | , uint32_t* _tempKeys 36 | , Ty* _values 37 | , Ty* _tempValues 38 | , uint32_t _size 39 | ); 40 | 41 | /// 42 | void radixSort( 43 | uint64_t* _keys 44 | , uint64_t* _tempKeys 45 | , uint32_t _size 46 | ); 47 | 48 | /// 49 | template 50 | void radixSort( 51 | uint64_t* _keys 52 | , uint64_t* _tempKeys 53 | , Ty* _values 54 | , Ty* _tempValues 55 | , uint32_t _size 56 | ); 57 | 58 | } // namespace bx 59 | 60 | #include "inline/sort.inl" 61 | 62 | #endif // BX_SORT_H_HEADER_GUARD 63 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/timer.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_TIMER_H_HEADER_GUARD 7 | #define BX_TIMER_H_HEADER_GUARD 8 | 9 | #include "bx.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | int64_t getHPCounter(); 15 | 16 | /// 17 | int64_t getHPFrequency(); 18 | 19 | } // namespace bx 20 | 21 | #endif // BX_TIMER_H_HEADER_GUARD 22 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/bx/url.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #ifndef BX_URL_H_HEADER_GUARD 7 | #define BX_URL_H_HEADER_GUARD 8 | 9 | #include "string.h" 10 | 11 | namespace bx 12 | { 13 | /// 14 | class UrlView 15 | { 16 | public: 17 | enum Enum 18 | { 19 | Scheme, 20 | UserName, 21 | Password, 22 | Host, 23 | Port, 24 | Path, 25 | Query, 26 | Fragment, 27 | 28 | Count 29 | }; 30 | 31 | /// 32 | UrlView(); 33 | 34 | /// 35 | void clear(); 36 | 37 | /// 38 | bool parse(const StringView& _url); 39 | 40 | /// 41 | const StringView& get(Enum _token) const; 42 | 43 | private: 44 | StringView m_tokens[Count]; 45 | }; 46 | 47 | /// 48 | void urlEncode(char* _out, uint32_t _max, const StringView& _str); 49 | 50 | } // namespace bx 51 | 52 | #endif // BX_URL_H_HEADER_GUARD 53 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/freebsd/alloca.h: -------------------------------------------------------------------------------- 1 | #if defined(__GLIBC__) 2 | # include_next 3 | #else 4 | # include 5 | #endif 6 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/freebsd/dirent.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/freebsd/malloc.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/freebsd/signal.h: -------------------------------------------------------------------------------- 1 | #if defined(__GLIBC__) 2 | # include_next 3 | #else 4 | # include 5 | #endif 6 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/ios/malloc.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/mingw/alloca.h: -------------------------------------------------------------------------------- 1 | #ifndef MINGW32_ALLOCA_H_HEADER_GUARD 2 | #define MINGW32_ALLOCA_H_HEADER_GUARD 3 | 4 | #include 5 | 6 | #endif // MINGW32_ALLOCA_H_HEADER_GUARD 7 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/mingw/dirent.h: -------------------------------------------------------------------------------- 1 | // BK - MinGW dirent is super broken, using MSVC compatibility one... 2 | #ifndef _DIRENT_H_ 3 | # define _DIRENT_H_ 4 | # include "../msvc/dirent.h" 5 | #endif // _DIRENT_H_ 6 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/mingw/sal.h: -------------------------------------------------------------------------------- 1 | #include "salieri.h" 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/mingw/specstrings_strict.h: -------------------------------------------------------------------------------- 1 | #define __reserved 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/mingw/specstrings_undef.h: -------------------------------------------------------------------------------- 1 | #undef __reserved 2 | 3 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/msvc/alloca.h: -------------------------------------------------------------------------------- 1 | #include 2 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/compat/osx/malloc.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/tinystl/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2012 Matthew Endsley 2 | All rights reserved 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted providing that the following conditions 6 | are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 | IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 17 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 21 | STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 22 | IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 23 | POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /source/thirdparty/bx/include/tinystl/stddef.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright 2012 Matthew Endsley 3 | * All rights reserved 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted providing that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 14 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 18 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 22 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 23 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | * POSSIBILITY OF SUCH DAMAGE. 25 | */ 26 | 27 | #ifndef TINYSTL_STDDEF_H 28 | #define TINYSTL_STDDEF_H 29 | 30 | #if defined(_WIN64) 31 | typedef long long unsigned int size_t; 32 | #elif defined(_WIN32) 33 | typedef unsigned int size_t; 34 | #elif defined (__linux__) && defined(__SIZE_TYPE__) 35 | typedef __SIZE_TYPE__ size_t; 36 | #else 37 | # include 38 | #endif 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /source/thirdparty/bx/src/amalgamated.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #include "allocator.cpp" 7 | #include "bx.cpp" 8 | #include "commandline.cpp" 9 | #include "crtnone.cpp" 10 | #include "debug.cpp" 11 | #include "dtoa.cpp" 12 | #include "easing.cpp" 13 | #include "file.cpp" 14 | #include "filepath.cpp" 15 | #include "hash.cpp" 16 | #include "math.cpp" 17 | #include "mutex.cpp" 18 | #include "os.cpp" 19 | #include "process.cpp" 20 | #include "semaphore.cpp" 21 | #include "settings.cpp" 22 | #include "sort.cpp" 23 | #include "string.cpp" 24 | #include "thread.cpp" 25 | #include "timer.cpp" 26 | #include "url.cpp" 27 | -------------------------------------------------------------------------------- /source/thirdparty/bx/src/easing.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bx_p.h" 7 | #include 8 | 9 | namespace bx 10 | { 11 | static const EaseFn s_easeFunc[] = 12 | { 13 | easeLinear, 14 | easeStep, 15 | easeSmoothStep, 16 | easeInQuad, 17 | easeOutQuad, 18 | easeInOutQuad, 19 | easeOutInQuad, 20 | easeInCubic, 21 | easeOutCubic, 22 | easeInOutCubic, 23 | easeOutInCubic, 24 | easeInQuart, 25 | easeOutQuart, 26 | easeInOutQuart, 27 | easeOutInQuart, 28 | easeInQuint, 29 | easeOutQuint, 30 | easeInOutQuint, 31 | easeOutInQuint, 32 | easeInSine, 33 | easeOutSine, 34 | easeInOutSine, 35 | easeOutInSine, 36 | easeInExpo, 37 | easeOutExpo, 38 | easeInOutExpo, 39 | easeOutInExpo, 40 | easeInCirc, 41 | easeOutCirc, 42 | easeInOutCirc, 43 | easeOutInCirc, 44 | easeInElastic, 45 | easeOutElastic, 46 | easeInOutElastic, 47 | easeOutInElastic, 48 | easeInBack, 49 | easeOutBack, 50 | easeInOutBack, 51 | easeOutInBack, 52 | easeInBounce, 53 | easeOutBounce, 54 | easeInOutBounce, 55 | easeOutInBounce, 56 | }; 57 | BX_STATIC_ASSERT(BX_COUNTOF(s_easeFunc) == Easing::Count); 58 | 59 | EaseFn getEaseFunc(Easing::Enum _enum) 60 | { 61 | return s_easeFunc[_enum]; 62 | } 63 | 64 | } // namespace bx 65 | -------------------------------------------------------------------------------- /source/thirdparty/bx/src/sort.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010-2020 Branimir Karadzic. All rights reserved. 3 | * License: https://github.com/bkaradzic/bx#license-bsd-2-clause 4 | */ 5 | 6 | #include "bx_p.h" 7 | #include 8 | 9 | namespace bx 10 | { 11 | static void quickSortR(void* _pivot, void* _data, uint32_t _num, uint32_t _stride, const ComparisonFn _fn) 12 | { 13 | if (2 > _num) 14 | { 15 | return; 16 | } 17 | 18 | memCopy(_pivot, _data, _stride); 19 | 20 | uint8_t* data = (uint8_t*)_data; 21 | 22 | uint32_t ll = 0; 23 | uint32_t gg = 1; 24 | 25 | for (uint32_t ii = 1; ii < _num;) 26 | { 27 | int32_t result = _fn(&data[ii*_stride], _pivot); 28 | if (0 > result) 29 | { 30 | swap(&data[ll*_stride], &data[ii*_stride], _stride); 31 | ++ll; 32 | } 33 | else if (0 == result) 34 | { 35 | swap(&data[gg*_stride], &data[ii*_stride], _stride); 36 | ++gg; 37 | ++ii; 38 | } 39 | else 40 | { 41 | ++ii; 42 | } 43 | } 44 | 45 | quickSortR(_pivot, &data[0 ], ll, _stride, _fn); 46 | quickSortR(_pivot, &data[gg*_stride], _num-gg, _stride, _fn); 47 | } 48 | 49 | void quickSort(void* _data, uint32_t _num, uint32_t _stride, const ComparisonFn _fn) 50 | { 51 | uint8_t* pivot = (uint8_t*)alloca(_stride); 52 | quickSortR(pivot, _data, _num, _stride, _fn); 53 | } 54 | 55 | } // namespace bx 56 | 57 | -------------------------------------------------------------------------------- /source/thirdparty/cgltf.c: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #pragma warning(push) 3 | #pragma warning(disable : 4244) 4 | #endif 5 | #define CGLTF_IMPLEMENTATION 6 | #include "cgltf.h" 7 | #ifdef _MSC_VER 8 | #pragma warning(pop) 9 | #endif 10 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/COPYING.BSD: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2011, Intel Corporation. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of Intel Corporation nor the names of its contributors may 13 | be used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 17 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 20 | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 23 | ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ -------------------------------------------------------------------------------- /source/thirdparty/eigen/COPYING.README: -------------------------------------------------------------------------------- 1 | Eigen is primarily MPL2 licensed. See COPYING.MPL2 and these links: 2 | http://www.mozilla.org/MPL/2.0/ 3 | http://www.mozilla.org/MPL/2.0/FAQ.html 4 | 5 | Some files contain third-party code under BSD or LGPL licenses, whence the other 6 | COPYING.* files here. 7 | 8 | All the LGPL code is either LGPL 2.1-only, or LGPL 2.1-or-later. 9 | For this reason, the COPYING.LGPL file contains the LGPL 2.1 text. 10 | 11 | If you want to guarantee that the Eigen code that you are #including is licensed 12 | under the MPL2 and possibly more permissive licenses (like BSD), #define this 13 | preprocessor symbol: 14 | EIGEN_MPL2_ONLY 15 | For example, with most compilers, you could add this to your project CXXFLAGS: 16 | -DEIGEN_MPL2_ONLY 17 | This will cause a compilation error to be generated if you #include any code that is 18 | LGPL licensed. 19 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/Cholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_CHOLESKY_MODULE_H 9 | #define EIGEN_CHOLESKY_MODULE_H 10 | 11 | #include "Core" 12 | #include "Jacobi" 13 | 14 | #include "src/Core/util/DisableStupidWarnings.h" 15 | 16 | /** \defgroup Cholesky_Module Cholesky module 17 | * 18 | * 19 | * 20 | * This module provides two variants of the Cholesky decomposition for selfadjoint (hermitian) matrices. 21 | * Those decompositions are also accessible via the following methods: 22 | * - MatrixBase::llt() 23 | * - MatrixBase::ldlt() 24 | * - SelfAdjointView::llt() 25 | * - SelfAdjointView::ldlt() 26 | * 27 | * \code 28 | * #include 29 | * \endcode 30 | */ 31 | 32 | #include "src/Cholesky/LLT.h" 33 | #include "src/Cholesky/LDLT.h" 34 | #ifdef EIGEN_USE_LAPACKE 35 | #ifdef EIGEN_USE_MKL 36 | #include "mkl_lapacke.h" 37 | #else 38 | #include "src/misc/lapacke.h" 39 | #endif 40 | #include "src/Cholesky/LLT_LAPACKE.h" 41 | #endif 42 | 43 | #include "src/Core/util/ReenableStupidWarnings.h" 44 | 45 | #endif // EIGEN_CHOLESKY_MODULE_H 46 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 47 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/Dense: -------------------------------------------------------------------------------- 1 | #include "Core" 2 | #include "LU" 3 | #include "Cholesky" 4 | #include "QR" 5 | #include "SVD" 6 | #include "Geometry" 7 | #include "Eigenvalues" 8 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/Eigen: -------------------------------------------------------------------------------- 1 | #include "Dense" 2 | #include "Sparse" 3 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/Householder: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_HOUSEHOLDER_MODULE_H 9 | #define EIGEN_HOUSEHOLDER_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Householder_Module Householder module 16 | * This module provides Householder transformations. 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | */ 22 | 23 | #include "src/Householder/Householder.h" 24 | #include "src/Householder/HouseholderSequence.h" 25 | #include "src/Householder/BlockHouseholder.h" 26 | 27 | #include "src/Core/util/ReenableStupidWarnings.h" 28 | 29 | #endif // EIGEN_HOUSEHOLDER_MODULE_H 30 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 31 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/Jacobi: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_JACOBI_MODULE_H 9 | #define EIGEN_JACOBI_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup Jacobi_Module Jacobi module 16 | * This module provides Jacobi and Givens rotations. 17 | * 18 | * \code 19 | * #include 20 | * \endcode 21 | * 22 | * In addition to listed classes, it defines the two following MatrixBase methods to apply a Jacobi or Givens rotation: 23 | * - MatrixBase::applyOnTheLeft() 24 | * - MatrixBase::applyOnTheRight(). 25 | */ 26 | 27 | #include "src/Jacobi/Jacobi.h" 28 | 29 | #include "src/Core/util/ReenableStupidWarnings.h" 30 | 31 | #endif // EIGEN_JACOBI_MODULE_H 32 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 33 | 34 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/LU: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_LU_MODULE_H 9 | #define EIGEN_LU_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup LU_Module LU module 16 | * This module includes %LU decomposition and related notions such as matrix inversion and determinant. 17 | * This module defines the following MatrixBase methods: 18 | * - MatrixBase::inverse() 19 | * - MatrixBase::determinant() 20 | * 21 | * \code 22 | * #include 23 | * \endcode 24 | */ 25 | 26 | #include "src/misc/Kernel.h" 27 | #include "src/misc/Image.h" 28 | #include "src/LU/FullPivLU.h" 29 | #include "src/LU/PartialPivLU.h" 30 | #ifdef EIGEN_USE_LAPACKE 31 | #ifdef EIGEN_USE_MKL 32 | #include "mkl_lapacke.h" 33 | #else 34 | #include "src/misc/lapacke.h" 35 | #endif 36 | #include "src/LU/PartialPivLU_LAPACKE.h" 37 | #endif 38 | #include "src/LU/Determinant.h" 39 | #include "src/LU/InverseImpl.h" 40 | 41 | // Use the SSE optimized version whenever possible. At the moment the 42 | // SSE version doesn't compile when AVX is enabled 43 | #if defined EIGEN_VECTORIZE_SSE && !defined EIGEN_VECTORIZE_AVX 44 | #include "src/LU/arch/Inverse_SSE.h" 45 | #endif 46 | 47 | #include "src/Core/util/ReenableStupidWarnings.h" 48 | 49 | #endif // EIGEN_LU_MODULE_H 50 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 51 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/MetisSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_METISSUPPORT_MODULE_H 9 | #define EIGEN_METISSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | 20 | /** \ingroup Support_modules 21 | * \defgroup MetisSupport_Module MetisSupport module 22 | * 23 | * \code 24 | * #include 25 | * \endcode 26 | * This module defines an interface to the METIS reordering package (http://glaros.dtc.umn.edu/gkhome/views/metis). 27 | * It can be used just as any other built-in method as explained in \link OrderingMethods_Module here. \endlink 28 | */ 29 | 30 | 31 | #include "src/MetisSupport/MetisSupport.h" 32 | 33 | #include "src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_METISSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/PardisoSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_PARDISOSUPPORT_MODULE_H 9 | #define EIGEN_PARDISOSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include 16 | 17 | /** \ingroup Support_modules 18 | * \defgroup PardisoSupport_Module PardisoSupport module 19 | * 20 | * This module brings support for the Intel(R) MKL PARDISO direct sparse solvers. 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * In order to use this module, the MKL headers must be accessible from the include paths, and your binary must be linked to the MKL library and its dependencies. 27 | * See this \ref TopicUsingIntelMKL "page" for more information on MKL-Eigen integration. 28 | * 29 | */ 30 | 31 | #include "src/PardisoSupport/PardisoSupport.h" 32 | 33 | #include "src/Core/util/ReenableStupidWarnings.h" 34 | 35 | #endif // EIGEN_PARDISOSUPPORT_MODULE_H 36 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/QR: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_QR_MODULE_H 9 | #define EIGEN_QR_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "Cholesky" 16 | #include "Jacobi" 17 | #include "Householder" 18 | 19 | /** \defgroup QR_Module QR module 20 | * 21 | * 22 | * 23 | * This module provides various QR decompositions 24 | * This module also provides some MatrixBase methods, including: 25 | * - MatrixBase::householderQr() 26 | * - MatrixBase::colPivHouseholderQr() 27 | * - MatrixBase::fullPivHouseholderQr() 28 | * 29 | * \code 30 | * #include 31 | * \endcode 32 | */ 33 | 34 | #include "src/QR/HouseholderQR.h" 35 | #include "src/QR/FullPivHouseholderQR.h" 36 | #include "src/QR/ColPivHouseholderQR.h" 37 | #include "src/QR/CompleteOrthogonalDecomposition.h" 38 | #ifdef EIGEN_USE_LAPACKE 39 | #ifdef EIGEN_USE_MKL 40 | #include "mkl_lapacke.h" 41 | #else 42 | #include "src/misc/lapacke.h" 43 | #endif 44 | #include "src/QR/HouseholderQR_LAPACKE.h" 45 | #include "src/QR/ColPivHouseholderQR_LAPACKE.h" 46 | #endif 47 | 48 | #include "src/Core/util/ReenableStupidWarnings.h" 49 | 50 | #endif // EIGEN_QR_MODULE_H 51 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 52 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/QtAlignedMalloc: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_QTMALLOC_MODULE_H 9 | #define EIGEN_QTMALLOC_MODULE_H 10 | 11 | #include "Core" 12 | 13 | #if (!EIGEN_MALLOC_ALREADY_ALIGNED) 14 | 15 | #include "src/Core/util/DisableStupidWarnings.h" 16 | 17 | void *qMalloc(std::size_t size) 18 | { 19 | return Eigen::internal::aligned_malloc(size); 20 | } 21 | 22 | void qFree(void *ptr) 23 | { 24 | Eigen::internal::aligned_free(ptr); 25 | } 26 | 27 | void *qRealloc(void *ptr, std::size_t size) 28 | { 29 | void* newPtr = Eigen::internal::aligned_malloc(size); 30 | std::memcpy(newPtr, ptr, size); 31 | Eigen::internal::aligned_free(ptr); 32 | return newPtr; 33 | } 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif 38 | 39 | #endif // EIGEN_QTMALLOC_MODULE_H 40 | /* vim: set filetype=cpp et sw=2 ts=2 ai: */ 41 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/SPQRSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPQRSUPPORT_MODULE_H 9 | #define EIGEN_SPQRSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | #include "SuiteSparseQR.hpp" 16 | 17 | /** \ingroup Support_modules 18 | * \defgroup SPQRSupport_Module SuiteSparseQR module 19 | * 20 | * This module provides an interface to the SPQR library, which is part of the suitesparse package. 21 | * 22 | * \code 23 | * #include 24 | * \endcode 25 | * 26 | * In order to use this module, the SPQR headers must be accessible from the include paths, and your binary must be linked to the SPQR library and its dependencies (Cholmod, AMD, COLAMD,...). 27 | * For a cmake based project, you can use our FindSPQR.cmake and FindCholmod.Cmake modules 28 | * 29 | */ 30 | 31 | #include "src/CholmodSupport/CholmodSupport.h" 32 | #include "src/SPQRSupport/SuiteSparseQRSupport.h" 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/Sparse: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSE_MODULE_H 9 | #define EIGEN_SPARSE_MODULE_H 10 | 11 | /** \defgroup Sparse_Module Sparse meta-module 12 | * 13 | * Meta-module including all related modules: 14 | * - \ref SparseCore_Module 15 | * - \ref OrderingMethods_Module 16 | * - \ref SparseCholesky_Module 17 | * - \ref SparseLU_Module 18 | * - \ref SparseQR_Module 19 | * - \ref IterativeLinearSolvers_Module 20 | * 21 | \code 22 | #include 23 | \endcode 24 | */ 25 | 26 | #include "SparseCore" 27 | #include "OrderingMethods" 28 | #ifndef EIGEN_MPL2_ONLY 29 | #include "SparseCholesky" 30 | #endif 31 | #include "SparseLU" 32 | #include "SparseQR" 33 | #include "IterativeLinearSolvers" 34 | 35 | #endif // EIGEN_SPARSE_MODULE_H 36 | 37 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/SparseCholesky: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2013 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSECHOLESKY_MODULE_H 11 | #define EIGEN_SPARSECHOLESKY_MODULE_H 12 | 13 | #include "SparseCore" 14 | #include "OrderingMethods" 15 | 16 | #include "src/Core/util/DisableStupidWarnings.h" 17 | 18 | /** 19 | * \defgroup SparseCholesky_Module SparseCholesky module 20 | * 21 | * This module currently provides two variants of the direct sparse Cholesky decomposition for selfadjoint (hermitian) matrices. 22 | * Those decompositions are accessible via the following classes: 23 | * - SimplicialLLt, 24 | * - SimplicialLDLt 25 | * 26 | * Such problems can also be solved using the ConjugateGradient solver from the IterativeLinearSolvers module. 27 | * 28 | * \code 29 | * #include 30 | * \endcode 31 | */ 32 | 33 | #ifdef EIGEN_MPL2_ONLY 34 | #error The SparseCholesky module has nothing to offer in MPL2 only mode 35 | #endif 36 | 37 | #include "src/SparseCholesky/SimplicialCholesky.h" 38 | 39 | #ifndef EIGEN_MPL2_ONLY 40 | #include "src/SparseCholesky/SimplicialCholesky_impl.h" 41 | #endif 42 | 43 | #include "src/Core/util/ReenableStupidWarnings.h" 44 | 45 | #endif // EIGEN_SPARSECHOLESKY_MODULE_H 46 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/SparseQR: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_SPARSEQR_MODULE_H 9 | #define EIGEN_SPARSEQR_MODULE_H 10 | 11 | #include "SparseCore" 12 | #include "OrderingMethods" 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | /** \defgroup SparseQR_Module SparseQR module 16 | * \brief Provides QR decomposition for sparse matrices 17 | * 18 | * This module provides a simplicial version of the left-looking Sparse QR decomposition. 19 | * The columns of the input matrix should be reordered to limit the fill-in during the 20 | * decomposition. Built-in methods (COLAMD, AMD) or external methods (METIS) can be used to this end. 21 | * See the \link OrderingMethods_Module OrderingMethods\endlink module for the list 22 | * of built-in and external ordering methods. 23 | * 24 | * \code 25 | * #include 26 | * \endcode 27 | * 28 | * 29 | */ 30 | 31 | #include "OrderingMethods" 32 | #include "src/SparseCore/SparseColEtree.h" 33 | #include "src/SparseQR/SparseQR.h" 34 | 35 | #include "src/Core/util/ReenableStupidWarnings.h" 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/StdDeque: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDDEQUE_MODULE_H 12 | #define EIGEN_STDDEQUE_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_DEQUE_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdDeque.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDDEQUE_MODULE_H 28 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/StdList: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Hauke Heibel 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_STDLIST_MODULE_H 11 | #define EIGEN_STDLIST_MODULE_H 12 | 13 | #include "Core" 14 | #include 15 | 16 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ 17 | 18 | #define EIGEN_DEFINE_STL_LIST_SPECIALIZATION(...) 19 | 20 | #else 21 | 22 | #include "src/StlSupport/StdList.h" 23 | 24 | #endif 25 | 26 | #endif // EIGEN_STDLIST_MODULE_H 27 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/StdVector: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2009 Gael Guennebaud 5 | // Copyright (C) 2009 Hauke Heibel 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_STDVECTOR_MODULE_H 12 | #define EIGEN_STDVECTOR_MODULE_H 13 | 14 | #include "Core" 15 | #include 16 | 17 | #if EIGEN_COMP_MSVC && EIGEN_OS_WIN64 && (EIGEN_MAX_STATIC_ALIGN_BYTES<=16) /* MSVC auto aligns up to 16 bytes in 64 bit builds */ 18 | 19 | #define EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION(...) 20 | 21 | #else 22 | 23 | #include "src/StlSupport/StdVector.h" 24 | 25 | #endif 26 | 27 | #endif // EIGEN_STDVECTOR_MODULE_H 28 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/UmfPackSupport: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // This Source Code Form is subject to the terms of the Mozilla 5 | // Public License v. 2.0. If a copy of the MPL was not distributed 6 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 7 | 8 | #ifndef EIGEN_UMFPACKSUPPORT_MODULE_H 9 | #define EIGEN_UMFPACKSUPPORT_MODULE_H 10 | 11 | #include "SparseCore" 12 | 13 | #include "src/Core/util/DisableStupidWarnings.h" 14 | 15 | extern "C" { 16 | #include 17 | } 18 | 19 | /** \ingroup Support_modules 20 | * \defgroup UmfPackSupport_Module UmfPackSupport module 21 | * 22 | * This module provides an interface to the UmfPack library which is part of the suitesparse package. 23 | * It provides the following factorization class: 24 | * - class UmfPackLU: a multifrontal sequential LU factorization. 25 | * 26 | * \code 27 | * #include 28 | * \endcode 29 | * 30 | * In order to use this module, the umfpack headers must be accessible from the include paths, and your binary must be linked to the umfpack library and its dependencies. 31 | * The dependencies depend on how umfpack has been compiled. 32 | * For a cmake based project, you can use our FindUmfPack.cmake module to help you in this task. 33 | * 34 | */ 35 | 36 | #include "src/UmfPackSupport/UmfPackSupport.h" 37 | 38 | #include "src/Core/util/ReenableStupidWarnings.h" 39 | 40 | #endif // EIGEN_UMFPACKSUPPORT_MODULE_H 41 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/Core/DiagonalProduct.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008 Gael Guennebaud 5 | // Copyright (C) 2007-2009 Benoit Jacob 6 | // 7 | // This Source Code Form is subject to the terms of the Mozilla 8 | // Public License v. 2.0. If a copy of the MPL was not distributed 9 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 10 | 11 | #ifndef EIGEN_DIAGONALPRODUCT_H 12 | #define EIGEN_DIAGONALPRODUCT_H 13 | 14 | namespace Eigen { 15 | 16 | /** \returns the diagonal matrix product of \c *this by the diagonal matrix \a diagonal. 17 | */ 18 | template 19 | template 20 | inline const Product 21 | MatrixBase::operator*(const DiagonalBase &a_diagonal) const 22 | { 23 | return Product(derived(),a_diagonal.derived()); 24 | } 25 | 26 | } // end namespace Eigen 27 | 28 | #endif // EIGEN_DIAGONALPRODUCT_H 29 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/Core/arch/AVX/TypeCasting.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2015 Benoit Steiner 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TYPE_CASTING_AVX_H 11 | #define EIGEN_TYPE_CASTING_AVX_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | // For now we use SSE to handle integers, so we can't use AVX instructions to cast 18 | // from int to float 19 | template <> 20 | struct type_casting_traits { 21 | enum { 22 | VectorizedCast = 0, 23 | SrcCoeffRatio = 1, 24 | TgtCoeffRatio = 1 25 | }; 26 | }; 27 | 28 | template <> 29 | struct type_casting_traits { 30 | enum { 31 | VectorizedCast = 0, 32 | SrcCoeffRatio = 1, 33 | TgtCoeffRatio = 1 34 | }; 35 | }; 36 | 37 | 38 | 39 | template<> EIGEN_STRONG_INLINE Packet8i pcast(const Packet8f& a) { 40 | return _mm256_cvtps_epi32(a); 41 | } 42 | 43 | template<> EIGEN_STRONG_INLINE Packet8f pcast(const Packet8i& a) { 44 | return _mm256_cvtepi32_ps(a); 45 | } 46 | 47 | } // end namespace internal 48 | 49 | } // end namespace Eigen 50 | 51 | #endif // EIGEN_TYPE_CASTING_AVX_H 52 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/Core/functors/TernaryFunctors.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2016 Eugene Brevdo 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_TERNARY_FUNCTORS_H 11 | #define EIGEN_TERNARY_FUNCTORS_H 12 | 13 | namespace Eigen { 14 | 15 | namespace internal { 16 | 17 | //---------- associative ternary functors ---------- 18 | 19 | 20 | 21 | } // end namespace internal 22 | 23 | } // end namespace Eigen 24 | 25 | #endif // EIGEN_TERNARY_FUNCTORS_H 26 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/Core/util/NonMPL2.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_MPL2_ONLY 2 | #error Including non-MPL2 code in EIGEN_MPL2_ONLY mode 3 | #endif 4 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/Core/util/ReenableStupidWarnings.h: -------------------------------------------------------------------------------- 1 | #ifdef EIGEN_WARNINGS_DISABLED 2 | #undef EIGEN_WARNINGS_DISABLED 3 | 4 | #ifndef EIGEN_PERMANENTLY_DISABLE_STUPID_WARNINGS 5 | #ifdef _MSC_VER 6 | #pragma warning( pop ) 7 | #elif defined __INTEL_COMPILER 8 | #pragma warning pop 9 | #elif defined __clang__ 10 | #pragma clang diagnostic pop 11 | #elif defined __GNUC__ && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) 12 | #pragma GCC diagnostic pop 13 | #endif 14 | 15 | #if defined __NVCC__ 16 | // Don't reenable the diagnostic messages, as it turns out these messages need 17 | // to be disabled at the point of the template instantiation (i.e the user code) 18 | // otherwise they'll be triggered by nvcc. 19 | // #pragma diag_default code_is_unreachable 20 | // #pragma diag_default initialization_not_reachable 21 | // #pragma diag_default 2651 22 | // #pragma diag_default 2653 23 | #endif 24 | 25 | #endif 26 | 27 | #endif // EIGEN_WARNINGS_DISABLED 28 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/SparseCore/SparseFuzzy.h: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2014 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_FUZZY_H 11 | #define EIGEN_SPARSE_FUZZY_H 12 | 13 | namespace Eigen { 14 | 15 | template 16 | template 17 | bool SparseMatrixBase::isApprox(const SparseMatrixBase& other, const RealScalar &prec) const 18 | { 19 | const typename internal::nested_eval::type actualA(derived()); 20 | typename internal::conditional::type, 22 | const PlainObject>::type actualB(other.derived()); 23 | 24 | return (actualA - actualB).squaredNorm() <= prec * prec * numext::mini(actualA.squaredNorm(), actualB.squaredNorm()); 25 | } 26 | 27 | } // end namespace Eigen 28 | 29 | #endif // EIGEN_SPARSE_FUZZY_H 30 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/Eigen/src/misc/lapacke_mangling.h: -------------------------------------------------------------------------------- 1 | #ifndef LAPACK_HEADER_INCLUDED 2 | #define LAPACK_HEADER_INCLUDED 3 | 4 | #ifndef LAPACK_GLOBAL 5 | #if defined(LAPACK_GLOBAL_PATTERN_LC) || defined(ADD_) 6 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 7 | #elif defined(LAPACK_GLOBAL_PATTERN_UC) || defined(UPPER) 8 | #define LAPACK_GLOBAL(lcname,UCNAME) UCNAME 9 | #elif defined(LAPACK_GLOBAL_PATTERN_MC) || defined(NOCHANGE) 10 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname 11 | #else 12 | #define LAPACK_GLOBAL(lcname,UCNAME) lcname##_ 13 | #endif 14 | #endif 15 | 16 | #endif 17 | 18 | -------------------------------------------------------------------------------- /source/thirdparty/eigen/unsupported/Eigen/SparseExtra: -------------------------------------------------------------------------------- 1 | // This file is part of Eigen, a lightweight C++ template library 2 | // for linear algebra. 3 | // 4 | // Copyright (C) 2008-2009 Gael Guennebaud 5 | // 6 | // This Source Code Form is subject to the terms of the Mozilla 7 | // Public License v. 2.0. If a copy of the MPL was not distributed 8 | // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. 9 | 10 | #ifndef EIGEN_SPARSE_EXTRA_MODULE_H 11 | #define EIGEN_SPARSE_EXTRA_MODULE_H 12 | 13 | #include "../../Eigen/Sparse" 14 | 15 | #include "../../Eigen/src/Core/util/DisableStupidWarnings.h" 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | 25 | #ifdef EIGEN_GOOGLEHASH_SUPPORT 26 | #include 27 | #endif 28 | 29 | /** 30 | * \defgroup SparseExtra_Module SparseExtra module 31 | * 32 | * This module contains some experimental features extending the sparse module. 33 | * 34 | * \code 35 | * #include 36 | * \endcode 37 | */ 38 | 39 | 40 | #include "src/SparseExtra/DynamicSparseMatrix.h" 41 | #include "src/SparseExtra/BlockOfDynamicSparseMatrix.h" 42 | #include "src/SparseExtra/RandomSetter.h" 43 | 44 | #include "src/SparseExtra/MarketIO.h" 45 | 46 | #if !defined(_WIN32) 47 | #include 48 | #include "src/SparseExtra/MatrixMarketIterator.h" 49 | #endif 50 | 51 | #include "../../Eigen/src/Core/util/ReenableStupidWarnings.h" 52 | 53 | #endif // EIGEN_SPARSE_EXTRA_MODULE_H 54 | -------------------------------------------------------------------------------- /source/thirdparty/embree3/rtcore.h: -------------------------------------------------------------------------------- 1 | // ======================================================================== // 2 | // Copyright 2009-2018 Intel Corporation // 3 | // // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); // 5 | // you may not use this file except in compliance with the License. // 6 | // You may obtain a copy of the License at // 7 | // // 8 | // http://www.apache.org/licenses/LICENSE-2.0 // 9 | // // 10 | // Unless required by applicable law or agreed to in writing, software // 11 | // distributed under the License is distributed on an "AS IS" BASIS, // 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // 13 | // See the License for the specific language governing permissions and // 14 | // limitations under the License. // 15 | // ======================================================================== // 16 | 17 | #pragma once 18 | 19 | #include "rtcore_version.h" 20 | #include "rtcore_common.h" 21 | #include "rtcore_device.h" 22 | #include "rtcore_buffer.h" 23 | #include "rtcore_ray.h" 24 | #include "rtcore_geometry.h" 25 | #include "rtcore_scene.h" 26 | #include "rtcore_builder.h" 27 | -------------------------------------------------------------------------------- /source/thirdparty/glfw/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002-2006 Marcus Geelnard 2 | 3 | Copyright (c) 2006-2019 Camilla Löwy 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would 16 | be appreciated but is not required. 17 | 18 | 2. Altered source versions must be plainly marked as such, and must not 19 | be misrepresented as being the original software. 20 | 21 | 3. This notice may not be removed or altered from any source 22 | distribution. 23 | 24 | -------------------------------------------------------------------------------- /source/thirdparty/glfw/src/null_joystick.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2006-2017 Camilla Löwy 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | #define _GLFW_PLATFORM_JOYSTICK_STATE struct { int dummyJoystick; } 28 | #define _GLFW_PLATFORM_LIBRARY_JOYSTICK_STATE struct { int dummyLibraryJoystick; } 29 | 30 | #define _GLFW_PLATFORM_MAPPING_NAME "" 31 | 32 | -------------------------------------------------------------------------------- /source/thirdparty/glfw/src/posix_time.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 POSIX - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2002-2006 Marcus Geelnard 5 | // Copyright (c) 2006-2017 Camilla Löwy 6 | // 7 | // This software is provided 'as-is', without any express or implied 8 | // warranty. In no event will the authors be held liable for any damages 9 | // arising from the use of this software. 10 | // 11 | // Permission is granted to anyone to use this software for any purpose, 12 | // including commercial applications, and to alter it and redistribute it 13 | // freely, subject to the following restrictions: 14 | // 15 | // 1. The origin of this software must not be misrepresented; you must not 16 | // claim that you wrote the original software. If you use this software 17 | // in a product, an acknowledgment in the product documentation would 18 | // be appreciated but is not required. 19 | // 20 | // 2. Altered source versions must be plainly marked as such, and must not 21 | // be misrepresented as being the original software. 22 | // 23 | // 3. This notice may not be removed or altered from any source 24 | // distribution. 25 | // 26 | //======================================================================== 27 | 28 | #define _GLFW_PLATFORM_LIBRARY_TIMER_STATE _GLFWtimerPOSIX posix 29 | 30 | #include 31 | 32 | 33 | // POSIX-specific global timer data 34 | // 35 | typedef struct _GLFWtimerPOSIX 36 | { 37 | GLFWbool monotonic; 38 | uint64_t frequency; 39 | 40 | } _GLFWtimerPOSIX; 41 | 42 | 43 | void _glfwInitTimerPOSIX(void); 44 | 45 | -------------------------------------------------------------------------------- /source/thirdparty/glfw/src/xkb_unicode.h: -------------------------------------------------------------------------------- 1 | //======================================================================== 2 | // GLFW 3.4 Linux - www.glfw.org 3 | //------------------------------------------------------------------------ 4 | // Copyright (c) 2014 Jonas Ådahl 5 | // 6 | // This software is provided 'as-is', without any express or implied 7 | // warranty. In no event will the authors be held liable for any damages 8 | // arising from the use of this software. 9 | // 10 | // Permission is granted to anyone to use this software for any purpose, 11 | // including commercial applications, and to alter it and redistribute it 12 | // freely, subject to the following restrictions: 13 | // 14 | // 1. The origin of this software must not be misrepresented; you must not 15 | // claim that you wrote the original software. If you use this software 16 | // in a product, an acknowledgment in the product documentation would 17 | // be appreciated but is not required. 18 | // 19 | // 2. Altered source versions must be plainly marked as such, and must not 20 | // be misrepresented as being the original software. 21 | // 22 | // 3. This notice may not be removed or altered from any source 23 | // distribution. 24 | // 25 | //======================================================================== 26 | 27 | long _glfwKeySym2Unicode(unsigned int keysym); 28 | 29 | -------------------------------------------------------------------------------- /source/thirdparty/imgui/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014-2020 Omar Cornut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/ARAPEnergyType.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_ARAPENERGYTYPE_H 9 | #define IGL_ARAPENERGYTYPE_H 10 | namespace igl 11 | { 12 | // ARAP_ENERGY_TYPE_SPOKES "As-rigid-as-possible Surface Modeling" by [Sorkine and 13 | // Alexa 2007], rotations defined at vertices affecting incident edges, 14 | // default 15 | // ARAP_ENERGY_TYPE_SPOKES-AND-RIMS Adapted version of "As-rigid-as-possible Surface 16 | // Modeling" by [Sorkine and Alexa 2007] presented in section 4.2 of or 17 | // "A simple geometric model for elastic deformation" by [Chao et al. 18 | // 2010], rotations defined at vertices affecting incident edges and 19 | // opposite edges 20 | // ARAP_ENERGY_TYPE_ELEMENTS "A local-global approach to mesh parameterization" by 21 | // [Liu et al. 2010] or "A simple geometric model for elastic 22 | // deformation" by [Chao et al. 2010], rotations defined at elements 23 | // (triangles or tets) 24 | // ARAP_ENERGY_TYPE_DEFAULT Choose one automatically: spokes and rims 25 | // for surfaces, elements for planar meshes and tets (not fully 26 | // supported) 27 | enum ARAPEnergyType 28 | { 29 | ARAP_ENERGY_TYPE_SPOKES = 0, 30 | ARAP_ENERGY_TYPE_SPOKES_AND_RIMS = 1, 31 | ARAP_ENERGY_TYPE_ELEMENTS = 2, 32 | ARAP_ENERGY_TYPE_DEFAULT = 3, 33 | NUM_ARAP_ENERGY_TYPES = 4 34 | }; 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/C_STR.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_C_STR_H 9 | #define IGL_C_STR_H 10 | // http://stackoverflow.com/a/2433143/148668 11 | // Suppose you have a function: 12 | // void func(const char * c); 13 | // Then you can write: 14 | // func(C_STR("foo"<<1<<"bar")); 15 | #include 16 | #include 17 | #define C_STR(X) static_cast(std::ostringstream().flush() << X).str().c_str() 18 | #endif 19 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/EPS.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "EPS.h" 9 | 10 | template <> IGL_INLINE float igl::EPS() 11 | { 12 | return igl::FLOAT_EPS; 13 | } 14 | template <> IGL_INLINE double igl::EPS() 15 | { 16 | return igl::DOUBLE_EPS; 17 | } 18 | 19 | template <> IGL_INLINE float igl::EPS_SQ() 20 | { 21 | return igl::FLOAT_EPS_SQ; 22 | } 23 | template <> IGL_INLINE double igl::EPS_SQ() 24 | { 25 | return igl::DOUBLE_EPS_SQ; 26 | } 27 | 28 | #ifdef IGL_STATIC_LIBRARY 29 | // Explicit template instantiation 30 | #endif 31 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/EPS.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_EPS_H 9 | #define IGL_EPS_H 10 | #include "igl_inline.h" 11 | namespace igl 12 | { 13 | // Define a standard value for double epsilon 14 | const double DOUBLE_EPS = 1.0e-14; 15 | const double DOUBLE_EPS_SQ = 1.0e-28; 16 | const float FLOAT_EPS = 1.0e-7; 17 | const float FLOAT_EPS_SQ = 1.0e-14; 18 | // Function returning EPS for corresponding type 19 | template IGL_INLINE S_type EPS(); 20 | template IGL_INLINE S_type EPS_SQ(); 21 | // Template specializations for float and double 22 | template <> IGL_INLINE float EPS(); 23 | template <> IGL_INLINE double EPS(); 24 | template <> IGL_INLINE float EPS_SQ(); 25 | template <> IGL_INLINE double EPS_SQ(); 26 | } 27 | 28 | #ifndef IGL_STATIC_LIBRARY 29 | # include "EPS.cpp" 30 | #endif 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/PI.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_PI_H 9 | #define IGL_PI_H 10 | namespace igl 11 | { 12 | // Use standard mathematical constants' M_PI if available 13 | #ifdef M_PI 14 | const double PI = M_PI; 15 | #else 16 | const double PI = 3.1415926535897932384626433832795; 17 | #endif 18 | } 19 | #endif 20 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/STR.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_STR_H 9 | #define IGL_STR_H 10 | // http://stackoverflow.com/a/2433143/148668 11 | #include 12 | #include 13 | // Suppose you have a function: 14 | // void func(std::string c); 15 | // Then you can write: 16 | // func(STR("foo"<<1<<"bar")); 17 | #define STR(X) static_cast(std::ostringstream().flush() << X).str() 18 | #endif 19 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/adjacency_matrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_ADJACENCY_MATRIX_H 9 | #define IGL_ADJACENCY_MATRIX_H 10 | #include "igl_inline.h" 11 | 12 | #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 13 | #include 14 | #include 15 | 16 | namespace igl 17 | { 18 | // Constructs the graph adjacency matrix of a given mesh (V,F) 19 | // Templates: 20 | // T should be a eigen sparse matrix primitive type like int or double 21 | // Inputs: 22 | // F #F by dim list of mesh simplices 23 | // Outputs: 24 | // A max(F) by max(F) cotangent matrix, each row i corresponding to V(i,:) 25 | // 26 | // Example: 27 | // // Mesh in (V,F) 28 | // Eigen::SparseMatrix A; 29 | // adjacency_matrix(F,A); 30 | // // sum each row 31 | // SparseVector Asum; 32 | // sum(A,1,Asum); 33 | // // Convert row sums into diagonal of sparse matrix 34 | // SparseMatrix Adiag; 35 | // diag(Asum,Adiag); 36 | // // Build uniform laplacian 37 | // SparseMatrix U; 38 | // U = A-Adiag; 39 | // 40 | // See also: edges, cotmatrix, diag 41 | template 42 | IGL_INLINE void adjacency_matrix( 43 | const Eigen::MatrixBase & F, 44 | Eigen::SparseMatrix& A); 45 | } 46 | 47 | #ifndef IGL_STATIC_LIBRARY 48 | # include "adjacency_matrix.cpp" 49 | #endif 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/arap_rhs.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_ARAP_RHS_H 9 | #define IGL_ARAP_RHS_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | namespace igl 17 | { 18 | // ARAP_RHS build right-hand side constructor of global poisson solve for 19 | // various Arap energies 20 | // Inputs: 21 | // V #V by Vdim list of initial domain positions 22 | // F #F by 3 list of triangle indices into V 23 | // dim dimension being used at solve time. For deformation usually dim = 24 | // V.cols(), for surface parameterization V.cols() = 3 and dim = 2 25 | // energy igl::ARAPEnergyType enum value defining which energy is being 26 | // used. See igl::ARAPEnergyType.h for valid options and explanations. 27 | // Outputs: 28 | // K #V*dim by #(F|V)*dim*dim matrix such that: 29 | // b = K * reshape(permute(R,[3 1 2]),size(V|F,1)*size(V,2)*size(V,2),1); 30 | // 31 | // See also: arap_linear_block 32 | IGL_INLINE void arap_rhs( 33 | const Eigen::MatrixXd & V, 34 | const Eigen::MatrixXi & F, 35 | const int dim, 36 | const igl::ARAPEnergyType energy, 37 | Eigen::SparseMatrix& K); 38 | } 39 | #ifndef IGL_STATIC_LIBRARY 40 | #include "arap_rhs.cpp" 41 | #endif 42 | #endif 43 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/columnize.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_COLUMNIZE_H 9 | #define IGL_COLUMNIZE_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | namespace igl 14 | { 15 | // "Columnize" a stack of block matrices. If A = [A1,A2,A3,...,Ak] with each A* 16 | // an m by n block then this produces the column vector whose entries are 17 | // B(j*m*k+i*k+b) = A(i,b*n+j); 18 | // or if A = [A1;A2;...;Ak] then 19 | // B(j*m*k+i*k+b) = A(i+b*m,j); 20 | // 21 | // Templates: 22 | // T should be a eigen matrix primitive type like int or double 23 | // Inputs: 24 | // A m*k by n (dim: 1) or m by n*k (dim: 2) eigen Matrix of type T values 25 | // k number of blocks 26 | // dim dimension in which blocks are stacked 27 | // Output 28 | // B m*n*k eigen vector of type T values, 29 | // 30 | // See also: transpose_blocks 31 | template 32 | IGL_INLINE void columnize( 33 | const Eigen::PlainObjectBase & A, 34 | const int k, 35 | const int dim, 36 | Eigen::PlainObjectBase & B); 37 | } 38 | #ifndef IGL_STATIC_LIBRARY 39 | # include "columnize.cpp" 40 | #endif 41 | #endif 42 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/cotmatrix_entries.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2014 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_COTMATRIX_ENTRIES_H 9 | #define IGL_COTMATRIX_ENTRIES_H 10 | #include "igl_inline.h" 11 | #include 12 | namespace igl 13 | { 14 | // COTMATRIX_ENTRIES compute the cotangents of each angle in mesh (V,F) 15 | // 16 | // Inputs: 17 | // V #V by dim list of rest domain positions 18 | // F #F by {3|4} list of {triangle|tetrahedra} indices into V 19 | // Outputs: 20 | // C #F by 3 list of 1/2*cotangents corresponding angles 21 | // for triangles, columns correspond to edges [1,2],[2,0],[0,1] 22 | // OR 23 | // C #F by 6 list of 1/6*cotangents of dihedral angles*edge lengths 24 | // for tets, columns along edges [1,2],[2,0],[0,1],[3,0],[3,1],[3,2] 25 | // 26 | template 27 | IGL_INLINE void cotmatrix_entries( 28 | const Eigen::MatrixBase& V, 29 | const Eigen::MatrixBase& F, 30 | Eigen::PlainObjectBase& C); 31 | } 32 | 33 | #ifndef IGL_STATIC_LIBRARY 34 | # include "cotmatrix_entries.cpp" 35 | #endif 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/covariance_scatter_matrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_COVARIANCE_SCATTER_MATRIX_H 9 | #define IGL_COVARIANCE_SCATTER_MATRIX_H 10 | 11 | #include "igl_inline.h" 12 | #include "ARAPEnergyType.h" 13 | #include 14 | #include 15 | 16 | namespace igl 17 | { 18 | // Construct the covariance scatter matrix for a given arap energy 19 | // Inputs: 20 | // V #V by Vdim list of initial domain positions 21 | // F #F by 3 list of triangle indices into V 22 | // energy ARAPEnergyType enum value defining which energy is being used. 23 | // See ARAPEnergyType.h for valid options and explanations. 24 | // Outputs: 25 | // CSM dim*#V/#F by dim*#V sparse matrix containing special laplacians along 26 | // the diagonal so that when multiplied by V gives covariance matrix 27 | // elements, can be used to speed up covariance matrix computation 28 | IGL_INLINE void covariance_scatter_matrix( 29 | const Eigen::MatrixXd & V, 30 | const Eigen::MatrixXi & F, 31 | const ARAPEnergyType energy, 32 | Eigen::SparseMatrix& CSM); 33 | } 34 | 35 | #ifndef IGL_STATIC_LIBRARY 36 | #include "covariance_scatter_matrix.cpp" 37 | #endif 38 | #endif 39 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/cross.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_CROSS_H 9 | #define IGL_CROSS_H 10 | #include "igl_inline.h" 11 | #include 12 | namespace igl 13 | { 14 | // Computes out = cross(a,b) 15 | // Inputs: 16 | // a left 3d vector 17 | // b right 3d vector 18 | // Outputs: 19 | // out result 3d vector 20 | IGL_INLINE void cross( const double *a, const double *b, double *out); 21 | // Computes C = cross(A,B,2); 22 | // 23 | // Inputs: 24 | // A #A by 3 list of row-vectors 25 | // B #A by 3 list of row-vectors 26 | // Outputs: 27 | // C #A by 3 list of row-vectors 28 | template < 29 | typename DerivedA, 30 | typename DerivedB, 31 | typename DerivedC> 32 | IGL_INLINE void cross( 33 | const Eigen::PlainObjectBase & A, 34 | const Eigen::PlainObjectBase & B, 35 | Eigen::PlainObjectBase & C); 36 | } 37 | 38 | #ifndef IGL_STATIC_LIBRARY 39 | # include "cross.cpp" 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/cumsum.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_CUMSUM_H 9 | #define IGL_CUMSUM_H 10 | 11 | #include "igl_inline.h" 12 | #include 13 | 14 | namespace igl 15 | { 16 | // Computes a cumulative sum of the columns of X, like matlab's `cumsum`. 17 | // 18 | // Templates: 19 | // DerivedX Type of matrix X 20 | // DerivedY Type of matrix Y 21 | // Inputs: 22 | // X m by n Matrix to be cumulatively summed. 23 | // dim dimension to take cumulative sum (1 or 2) 24 | // Output: 25 | // Y m by n Matrix containing cumulative sum. 26 | // 27 | template 28 | IGL_INLINE void cumsum( 29 | const Eigen::MatrixBase & X, 30 | const int dim, 31 | Eigen::PlainObjectBase & Y); 32 | //template 33 | //IGL_INLINE void cumsum( 34 | // const Eigen::MatrixBase & X, 35 | // Eigen::PlainObjectBase & Y); 36 | } 37 | 38 | #ifndef IGL_STATIC_LIBRARY 39 | # include "cumsum.cpp" 40 | #endif 41 | 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/edges.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_EDGES_H 9 | #define IGL_EDGES_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | 14 | namespace igl 15 | { 16 | // Constructs a list of unique edges represented in a given mesh (V,F) 17 | // 18 | // Inputs: 19 | // F #F by 3 list of mesh faces (must be triangles) 20 | // or 21 | // T #T x 4 matrix of indices of tet corners 22 | // Outputs: 23 | // E #E by 2 list of edges in no particular order 24 | // 25 | // See also: adjacency_matrix 26 | template 27 | IGL_INLINE void edges( 28 | const Eigen::MatrixBase & F, 29 | Eigen::PlainObjectBase & E); 30 | } 31 | 32 | #ifndef IGL_STATIC_LIBRARY 33 | # include "edges.cpp" 34 | #endif 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/face_occurrences.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_FACE_OCCURRENCES 9 | #define IGL_FACE_OCCURRENCES 10 | #include "igl_inline.h" 11 | 12 | #include 13 | namespace igl 14 | { 15 | // Count the occruances of each face (row) in a list of face indices 16 | // (irrespecitive of order) 17 | // Inputs: 18 | // F #F by simplex-size 19 | // Outputs 20 | // C #F list of counts 21 | // Known bug: triangles/tets only (where ignoring order still gives simplex) 22 | template 23 | IGL_INLINE void face_occurrences( 24 | const std::vector > & F, 25 | std::vector & C); 26 | } 27 | 28 | #ifndef IGL_STATIC_LIBRARY 29 | # include "face_occurrences.cpp" 30 | #endif 31 | 32 | #endif 33 | 34 | 35 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/get_seconds.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "get_seconds.h" 9 | #include 10 | IGL_INLINE double igl::get_seconds() 11 | { 12 | return 13 | std::chrono::duration( 14 | std::chrono::system_clock::now().time_since_epoch()).count(); 15 | } 16 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/get_seconds.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_GET_SECONDS_H 9 | #define IGL_GET_SECONDS_H 10 | #include "igl_inline.h" 11 | 12 | namespace igl 13 | { 14 | // Return the current time in seconds since program start 15 | // 16 | // Example: 17 | // const auto & tictoc = []() 18 | // { 19 | // static double t_start = igl::get_seconds(); 20 | // double diff = igl::get_seconds()-t_start; 21 | // t_start += diff; 22 | // return diff; 23 | // }; 24 | // tictoc(); 25 | // ... // part 1 26 | // cout<<"part 1: "< 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "group_sum_matrix.h" 9 | 10 | template 11 | IGL_INLINE void igl::group_sum_matrix( 12 | const Eigen::Matrix & G, 13 | const int k, 14 | Eigen::SparseMatrix& A) 15 | { 16 | // number of vertices 17 | int n = G.rows(); 18 | assert(k > G.maxCoeff()); 19 | 20 | A.resize(k,n); 21 | 22 | // builds A such that A(i,j) = 1 where i corresponds to group i and j 23 | // corresponds to vertex j 24 | 25 | // Loop over vertices 26 | for(int j = 0;j 35 | IGL_INLINE void igl::group_sum_matrix( 36 | const Eigen::Matrix & G, 37 | Eigen::SparseMatrix& A) 38 | { 39 | return group_sum_matrix(G,G.maxCoeff()+1,A); 40 | } 41 | 42 | #ifdef IGL_STATIC_LIBRARY 43 | // Explicit template instantiation 44 | template void igl::group_sum_matrix(Eigen::Matrix const&, int, Eigen::SparseMatrix&); 45 | template void igl::group_sum_matrix(Eigen::Matrix const&, Eigen::SparseMatrix&); 46 | #endif 47 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/group_sum_matrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_GROUP_SUM_MATRIX_H 9 | #define IGL_GROUP_SUM_MATRIX_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace igl 16 | { 17 | // GROUP_SUM_MATRIX Builds a matrix A such that A*V computes the sum of 18 | // vertices in each group specified by G 19 | // 20 | // group_sum_matrix(G,k,A); 21 | // 22 | // Templates: 23 | // T should be a eigen sparse matrix primitive type like int or double 24 | // Inputs: 25 | // G #V list of group indices (0 to k-1) for each vertex, such that vertex i 26 | // is assigned to group G(i) 27 | // k #groups, good choice is max(G)+1 28 | // Outputs: 29 | // A #groups by #V sparse matrix such that A*V = group_sums 30 | // 31 | template 32 | IGL_INLINE void group_sum_matrix( 33 | const Eigen::Matrix & G, 34 | const int k, 35 | Eigen::SparseMatrix& A); 36 | // Wrapper with k = max(G)+1 37 | template 38 | IGL_INLINE void group_sum_matrix( 39 | const Eigen::Matrix & G, 40 | Eigen::SparseMatrix& A); 41 | } 42 | #ifndef IGL_STATIC_LIBRARY 43 | # include "group_sum_matrix.cpp" 44 | #endif 45 | #endif 46 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/igl_inline.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | // This should *NOT* be contained in a IGL_*_H ifdef, since it may be defined 9 | // differently based on when it is included 10 | #ifdef IGL_INLINE 11 | #undef IGL_INLINE 12 | #endif 13 | 14 | #ifndef IGL_STATIC_LIBRARY 15 | # define IGL_INLINE inline 16 | #else 17 | # define IGL_INLINE 18 | #endif 19 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/invert_diag.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "invert_diag.h" 9 | 10 | template 11 | IGL_INLINE void igl::invert_diag( 12 | const Eigen::SparseMatrix& X, 13 | Eigen::SparseMatrix& Y) 14 | { 15 | #ifndef NDEBUG 16 | typename Eigen::SparseVector dX = X.diagonal().sparseView(); 17 | // Check that there are no zeros along the diagonal 18 | assert(dX.nonZeros() == dX.size()); 19 | #endif 20 | // http://www.alecjacobson.com/weblog/?p=2552 21 | if(&Y != &X) 22 | { 23 | Y = X; 24 | } 25 | // Iterate over outside 26 | for(int k=0; k::InnerIterator it (Y,k); it; ++it) 30 | { 31 | if(it.col() == it.row()) 32 | { 33 | T v = it.value(); 34 | assert(v != 0); 35 | v = ((T)1.0)/v; 36 | Y.coeffRef(it.row(),it.col()) = v; 37 | } 38 | } 39 | } 40 | } 41 | 42 | #ifdef IGL_STATIC_LIBRARY 43 | // Explicit template instantiation 44 | template void igl::invert_diag(Eigen::SparseMatrix const&, Eigen::SparseMatrix&); 45 | template void igl::invert_diag(Eigen::SparseMatrix const&, Eigen::SparseMatrix&); 46 | #endif 47 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/invert_diag.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_INVERT_DIAG_H 9 | #define IGL_INVERT_DIAG_H 10 | #include "igl_inline.h" 11 | #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 12 | #include 13 | 14 | namespace igl 15 | { 16 | // Invert the diagonal entries of a matrix (if the matrix is a diagonal 17 | // matrix then this amounts to inverting the matrix) 18 | 19 | // Templates: 20 | // T should be a eigen sparse matrix primitive type like int or double 21 | // Inputs: 22 | // X an m by n sparse matrix 23 | // Outputs: 24 | // Y an m by n sparse matrix 25 | template 26 | IGL_INLINE void invert_diag( 27 | const Eigen::SparseMatrix& X, 28 | Eigen::SparseMatrix& Y); 29 | } 30 | 31 | #ifndef IGL_STATIC_LIBRARY 32 | # include "invert_diag.cpp" 33 | #endif 34 | 35 | #endif 36 | 37 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/is_border_vertex.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_IS_BORDER_VERTEX_H 9 | #define IGL_IS_BORDER_VERTEX_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace igl 16 | { 17 | // Determine vertices on open boundary of a (manifold) mesh with triangle 18 | // faces F 19 | // 20 | // Inputs: 21 | // V #V by dim list of vertex positions 22 | // F #F by 3 list of triangle indices 23 | // Returns #V vector of bools revealing whether vertices are on boundary 24 | // 25 | // Known Bugs: - does not depend on V 26 | // - assumes mesh is edge manifold 27 | // 28 | template 29 | IGL_INLINE std::vector is_border_vertex( 30 | const Eigen::PlainObjectBase &V, 31 | const Eigen::PlainObjectBase &F); 32 | } 33 | 34 | #ifndef IGL_STATIC_LIBRARY 35 | # include "is_border_vertex.cpp" 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/is_symmetric.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_IS_SYMMETRIC_H 9 | #define IGL_IS_SYMMETRIC_H 10 | #include "igl_inline.h" 11 | #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 12 | #include 13 | namespace igl 14 | { 15 | // Returns true if the given matrix is symmetric 16 | // Inputs: 17 | // A m by m matrix 18 | // Returns true if the matrix is square and symmetric 19 | template 20 | IGL_INLINE bool is_symmetric(const Eigen::SparseMatrix& A); 21 | // Inputs: 22 | // epsilon threshold on L1 difference between A and A' 23 | template 24 | IGL_INLINE bool is_symmetric(const Eigen::SparseMatrix& A, const epsilonT epsilon); 25 | template 26 | IGL_INLINE bool is_symmetric( 27 | const Eigen::PlainObjectBase& A); 28 | } 29 | 30 | #ifndef IGL_STATIC_LIBRARY 31 | # include "is_symmetric.cpp" 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/isdiag.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2016 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "isdiag.h" 9 | 10 | template 11 | IGL_INLINE bool igl::isdiag(const Eigen::SparseMatrix & A) 12 | { 13 | // Iterate over outside of A 14 | for(int k=0; k::InnerIterator it (A,k); it; ++it) 18 | { 19 | if(it.row() != it.col() && it.value()!=0) 20 | { 21 | return false; 22 | } 23 | } 24 | } 25 | return true; 26 | } 27 | 28 | 29 | #ifdef IGL_STATIC_LIBRARY 30 | // Explicit template instantiation 31 | template bool igl::isdiag(class Eigen::SparseMatrix const &); 32 | #endif 33 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/isdiag.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2016 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_ISDIAG_H 9 | #define IGL_ISDIAG_H 10 | #include "igl_inline.h" 11 | #include 12 | namespace igl 13 | { 14 | // Determine if a given matrix is diagonal: all non-zeros lie on the 15 | // main diagonal. 16 | // 17 | // Inputs: 18 | // A m by n sparse matrix 19 | // Returns true iff and only if the matrix is diagonal. 20 | template 21 | IGL_INLINE bool isdiag(const Eigen::SparseMatrix & A); 22 | }; 23 | #ifndef IGL_STATIC_LIBRARY 24 | # include "isdiag.cpp" 25 | #endif 26 | #endif 27 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/map_vertices_to_circle.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2014 Stefan Brugger 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | #include "map_vertices_to_circle.h" 10 | #include "PI.h" 11 | 12 | IGL_INLINE void igl::map_vertices_to_circle( 13 | const Eigen::MatrixXd& V, 14 | const Eigen::VectorXi& bnd, 15 | Eigen::MatrixXd& UV) 16 | { 17 | // Get sorted list of boundary vertices 18 | std::vector interior,map_ij; 19 | map_ij.resize(V.rows()); 20 | 21 | std::vector isOnBnd(V.rows(),false); 22 | for (int i = 0; i < bnd.size(); i++) 23 | { 24 | isOnBnd[bnd[i]] = true; 25 | map_ij[bnd[i]] = i; 26 | } 27 | 28 | for (int i = 0; i < (int)isOnBnd.size(); i++) 29 | { 30 | if (!isOnBnd[i]) 31 | { 32 | map_ij[i] = interior.size(); 33 | interior.push_back(i); 34 | } 35 | } 36 | 37 | // Map boundary to unit circle 38 | std::vector len(bnd.size()); 39 | len[0] = 0.; 40 | 41 | for (int i = 1; i < bnd.size(); i++) 42 | { 43 | len[i] = len[i-1] + (V.row(bnd[i-1]) - V.row(bnd[i])).norm(); 44 | } 45 | double total_len = len[len.size()-1] + (V.row(bnd[0]) - V.row(bnd[bnd.size()-1])).norm(); 46 | 47 | UV.resize(bnd.size(),2); 48 | for (int i = 0; i < bnd.size(); i++) 49 | { 50 | double frac = len[i] * 2. * igl::PI / total_len; 51 | UV.row(map_ij[bnd[i]]) << cos(frac), sin(frac); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/map_vertices_to_circle.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2014 Stefan Brugger 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_MAP_VERTICES_TO_CIRCLE_H 9 | #define IGL_MAP_VERTICES_TO_CIRCLE_H 10 | #include "igl_inline.h" 11 | #include "PI.h" 12 | 13 | #include 14 | #include 15 | 16 | namespace igl 17 | { 18 | 19 | // Map the vertices whose indices are in a given boundary loop (bnd) on the 20 | // unit circle with spacing proportional to the original boundary edge 21 | // lengths. 22 | // 23 | // Inputs: 24 | // V #V by dim list of mesh vertex positions 25 | // b #W list of vertex ids 26 | // Outputs: 27 | // UV #W by 2 list of 2D position on the unit circle for the vertices in b 28 | IGL_INLINE void map_vertices_to_circle( 29 | const Eigen::MatrixXd& V, 30 | const Eigen::VectorXi& bnd, 31 | Eigen::MatrixXd& UV); 32 | } 33 | 34 | #ifndef IGL_STATIC_LIBRARY 35 | # include "map_vertices_to_circle.cpp" 36 | #endif 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/max_size.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_MAX_SIZE_H 9 | #define IGL_MAX_SIZE_H 10 | #include "igl_inline.h" 11 | #include 12 | 13 | namespace igl 14 | { 15 | // Determine max size of lists in a vector 16 | // Template: 17 | // T some list type object that implements .size() 18 | // Inputs: 19 | // V vector of list types T 20 | // Returns max .size() found in V, returns -1 if V is empty 21 | template 22 | IGL_INLINE int max_size(const std::vector & V); 23 | } 24 | 25 | #ifndef IGL_STATIC_LIBRARY 26 | # include "max_size.cpp" 27 | #endif 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/min_size.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_MIN_SIZE_H 9 | #define IGL_MIN_SIZE_H 10 | #include "igl_inline.h" 11 | #include 12 | 13 | namespace igl 14 | { 15 | // Determine min size of lists in a vector 16 | // Template: 17 | // T some list type object that implements .size() 18 | // Inputs: 19 | // V vector of list types T 20 | // Returns min .size() found in V, returns -1 if V is empty 21 | template 22 | IGL_INLINE int min_size(const std::vector & V); 23 | } 24 | 25 | 26 | #ifndef IGL_STATIC_LIBRARY 27 | # include "min_size.cpp" 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/mode.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_MODE_H 9 | #define IGL_MODE_H 10 | #include "igl_inline.h" 11 | #include 12 | namespace igl 13 | { 14 | // Takes mode of coefficients in a matrix along a given dension 15 | // 16 | // Templates: 17 | // T should be a eigen matrix primitive type like int or double 18 | // Inputs: 19 | // X m by n original matrix 20 | // d dension along which to take mode, m or n 21 | // Outputs: 22 | // M vector containing mode along dension d, if d==1 then this will be a 23 | // n-long vector if d==2 then this will be a m-long vector 24 | template 25 | IGL_INLINE void mode( 26 | const Eigen::Matrix & X, 27 | const int d, 28 | Eigen::Matrix & M); 29 | } 30 | 31 | #ifndef IGL_STATIC_LIBRARY 32 | # include "mode.cpp" 33 | #endif 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/normalize_row_sums.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "normalize_row_sums.h" 9 | 10 | template 11 | IGL_INLINE void igl::normalize_row_sums( 12 | const Eigen::MatrixBase& A, 13 | Eigen::MatrixBase & B) 14 | { 15 | #ifndef NDEBUG 16 | // loop over rows 17 | for(int i = 0; i < A.rows();i++) 18 | { 19 | typename DerivedB::Scalar sum = A.row(i).sum(); 20 | assert(sum != 0); 21 | } 22 | #endif 23 | B = (A.array().colwise() / A.rowwise().sum().array()).eval(); 24 | } 25 | #ifdef IGL_STATIC_LIBRARY 26 | // Explicit template instantiation 27 | template void igl::normalize_row_sums, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase >&); 28 | template void igl::normalize_row_sums, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase >&); 29 | #endif 30 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/normalize_row_sums.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_NORMALIZE_ROW_SUMS_H 9 | #define IGL_NORMALIZE_ROW_SUMS_H 10 | #include "igl_inline.h" 11 | #include 12 | 13 | namespace igl 14 | { 15 | // Normalize the rows in A so that their sums are each 1 and place the new 16 | // entries in B 17 | // Inputs: 18 | // A #rows by k input matrix 19 | // Outputs: 20 | // B #rows by k input matrix, can be the same as A 21 | // 22 | // Note: This is just calling an Eigen one-liner. 23 | template 24 | IGL_INLINE void normalize_row_sums( 25 | const Eigen::MatrixBase& A, 26 | Eigen::MatrixBase & B); 27 | } 28 | 29 | #ifndef IGL_STATIC_LIBRARY 30 | # include "normalize_row_sums.cpp" 31 | #endif 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/oriented_facets.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2017 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_ORIENTED_FACETS_H 9 | #define IGL_ORIENTED_FACETS_H 10 | #include "igl_inline.h" 11 | #include 12 | namespace igl 13 | { 14 | // ORIENTED_FACETS Determines all "directed 15 | // [facets](https://en.wikipedia.org/wiki/Simplex#Elements)" of a given set 16 | // of simplicial elements. For a manifold triangle mesh, this computes all 17 | // half-edges. For a manifold tetrahedral mesh, this computes all half-faces. 18 | // 19 | // Inputs: 20 | // F #F by simplex_size list of simplices 21 | // Outputs: 22 | // E #E by simplex_size-1 list of facets 23 | // 24 | // Note: this is not the same as igl::edges because this includes every 25 | // directed edge including repeats (meaning interior edges on a surface will 26 | // show up once for each direction and non-manifold edges may appear more than 27 | // once for each direction). 28 | // 29 | // Note: This replaces the deprecated `all_edges` function 30 | template 31 | IGL_INLINE void oriented_facets( 32 | const Eigen::MatrixBase & F, 33 | Eigen::PlainObjectBase & E); 34 | } 35 | 36 | #ifndef IGL_STATIC_LIBRARY 37 | # include "oriented_facets.cpp" 38 | #endif 39 | 40 | #endif 41 | 42 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/polar_svd3x3.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_POLAR_SVD3X3_H 9 | #define IGL_POLAR_SVD3X3_H 10 | #include 11 | #include "igl_inline.h" 12 | namespace igl 13 | { 14 | // Computes the closest rotation to input matrix A using specialized 3x3 SVD 15 | // singular value decomposition (WunderSVD3x3) 16 | // 17 | // Inputs: 18 | // A 3 by 3 matrix to be decomposed 19 | // Outputs: 20 | // R 3 by 3 closest element in SO(3) (closeness in terms of Frobenius 21 | // metric) 22 | // 23 | // This means that det(R) = 1. Technically it's not polar decomposition 24 | // which guarantees positive semidefinite stretch factor (at the cost of 25 | // having det(R) = -1). "• The orthogonal factors U and V will be true 26 | // rotation matrices..." [McAdams, Selle, Tamstorf, Teran, Sefakis 2011] 27 | // 28 | template 29 | IGL_INLINE void polar_svd3x3(const Mat& A, Mat& R); 30 | #ifdef __SSE__ 31 | template 32 | IGL_INLINE void polar_svd3x3_sse(const Eigen::Matrix& A, Eigen::Matrix &R); 33 | #endif 34 | #ifdef __AVX__ 35 | template 36 | IGL_INLINE void polar_svd3x3_avx(const Eigen::Matrix& A, Eigen::Matrix &R); 37 | #endif 38 | } 39 | #ifndef IGL_STATIC_LIBRARY 40 | # include "polar_svd3x3.cpp" 41 | #endif 42 | #endif 43 | 44 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/project_isometrically_to_plane.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2014 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_PROJECT_ISOMETRICALLY_TO_PLANE_H 9 | #define IGL_PROJECT_ISOMETRICALLY_TO_PLANE_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace igl 16 | { 17 | // Project each triangle to the plane 18 | // 19 | // [U,UF,I] = project_isometrically_to_plane(V,F) 20 | // 21 | // Inputs: 22 | // V #V by 3 list of vertex positions 23 | // F #F by 3 list of mesh indices 24 | // Outputs: 25 | // U #F*3 by 2 list of triangle positions 26 | // UF #F by 3 list of mesh indices into U 27 | // I #V by #F such that I(i,j) = 1 implies U(j,:) corresponds to V(i,:) 28 | // 29 | template < 30 | typename DerivedV, 31 | typename DerivedF, 32 | typename DerivedU, 33 | typename DerivedUF, 34 | typename Scalar> 35 | IGL_INLINE void project_isometrically_to_plane( 36 | const Eigen::PlainObjectBase & V, 37 | const Eigen::PlainObjectBase & F, 38 | Eigen::PlainObjectBase & U, 39 | Eigen::PlainObjectBase & UF, 40 | Eigen::SparseMatrix& I); 41 | } 42 | 43 | #ifndef IGL_STATIC_LIBRARY 44 | # include "project_isometrically_to_plane.cpp" 45 | #endif 46 | 47 | #endif 48 | 49 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/reorder.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_REORDER_H 9 | #define IGL_REORDER_H 10 | #include "igl_inline.h" 11 | #include 12 | // For size_t 13 | #include 14 | #include 15 | 16 | namespace igl 17 | { 18 | // Act like matlab's Y = X(I) for std vectors 19 | // where I contains a vector of indices so that after, 20 | // Y[j] = X[I[j]] for index j 21 | // this implies that Y.size() == I.size() 22 | // X and Y are allowed to be the same reference 23 | template< class T > 24 | IGL_INLINE void reorder( 25 | const std::vector & unordered, 26 | std::vector const & index_map, 27 | std::vector & ordered); 28 | } 29 | 30 | #ifndef IGL_STATIC_LIBRARY 31 | # include "reorder.cpp" 32 | #endif 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/repmat.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_REPMAT_H 9 | #define IGL_REPMAT_H 10 | #include "igl_inline.h" 11 | 12 | #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 13 | #include 14 | #include 15 | 16 | namespace igl 17 | { 18 | // At least for Dense matrices this is replaced by `replicate` e.g., dst = src.replicate(n,m); 19 | // http://forum.kde.org/viewtopic.php?f=74&t=90876#p173517 20 | 21 | // Ideally this is a super overloaded function that behaves just like 22 | // matlab's repmat 23 | 24 | // Replicate and tile a matrix 25 | // 26 | // Templates: 27 | // T should be a eigen matrix primitive type like int or double 28 | // Inputs: 29 | // A m by n input matrix 30 | // r number of row-direction copies 31 | // c number of col-direction copies 32 | // Outputs: 33 | // B r*m by c*n output matrix 34 | // 35 | template 36 | IGL_INLINE void repmat( 37 | const Eigen::MatrixBase & A, 38 | const int r, 39 | const int c, 40 | Eigen::PlainObjectBase & B); 41 | template 42 | IGL_INLINE void repmat( 43 | const Eigen::SparseMatrix & A, 44 | const int r, 45 | const int c, 46 | Eigen::SparseMatrix & B); 47 | } 48 | 49 | #ifndef IGL_STATIC_LIBRARY 50 | # include "repmat.cpp" 51 | #endif 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/sortrows.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_SORTROWS_H 9 | #define IGL_SORTROWS_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | namespace igl 15 | { 16 | // Act like matlab's [Y,I] = sortrows(X) 17 | // 18 | // Templates: 19 | // DerivedX derived scalar type, e.g. MatrixXi or MatrixXd 20 | // DerivedI derived integer type, e.g. MatrixXi 21 | // Inputs: 22 | // X m by n matrix whose entries are to be sorted 23 | // ascending sort ascending (true, matlab default) or descending (false) 24 | // Outputs: 25 | // Y m by n matrix whose entries are sorted (**should not** be same 26 | // reference as X) 27 | // I m list of indices so that 28 | // Y = X(I,:); 29 | template 30 | IGL_INLINE void sortrows( 31 | const Eigen::DenseBase& X, 32 | const bool ascending, 33 | Eigen::PlainObjectBase& Y, 34 | Eigen::PlainObjectBase& I); 35 | } 36 | 37 | #ifndef IGL_STATIC_LIBRARY 38 | # include "sortrows.cpp" 39 | #endif 40 | 41 | #endif 42 | 43 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/speye.cpp: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #include "speye.h" 9 | 10 | template 11 | IGL_INLINE void igl::speye(const int m, const int n, Eigen::SparseMatrix & I) 12 | { 13 | // size of diagonal 14 | int d = (m(m,n); 16 | I.reserve(d); 17 | for(int i = 0;i 25 | IGL_INLINE void igl::speye(const int n, Eigen::SparseMatrix & I) 26 | { 27 | return igl::speye(n,n,I); 28 | } 29 | 30 | #ifdef IGL_STATIC_LIBRARY 31 | // Explicit template instantiation 32 | // generated by autoexplicit.sh 33 | template void igl::speye(int, Eigen::SparseMatrix&); 34 | template void igl::speye >(int, int, Eigen::SparseMatrix, 0, int>&); 35 | #endif 36 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/speye.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_SPEYE_H 9 | #define IGL_SPEYE_H 10 | #include "igl_inline.h" 11 | 12 | #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET 13 | #include 14 | 15 | namespace igl 16 | { 17 | // Builds an m by n sparse identity matrix like matlab's speye function 18 | // Templates: 19 | // T should be a eigen sparse matrix primitive type like int or double 20 | // Inputs: 21 | // m number of rows 22 | // n number of cols 23 | // Outputs: 24 | // I m by n sparse matrix with 1's on the main diagonal 25 | template 26 | IGL_INLINE void speye(const int n,const int m, Eigen::SparseMatrix & I); 27 | // Builds an n by n sparse identity matrix like matlab's speye function 28 | // Templates: 29 | // T should be a eigen sparse matrix primitive type like int or double 30 | // Inputs: 31 | // n number of rows and cols 32 | // Outputs: 33 | // I n by n sparse matrix with 1's on the main diagonal 34 | template 35 | IGL_INLINE void speye(const int n, Eigen::SparseMatrix & I); 36 | } 37 | 38 | #ifndef IGL_STATIC_LIBRARY 39 | # include "speye.cpp" 40 | #endif 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/sum.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_SUM_H 9 | #define IGL_SUM_H 10 | #include "igl_inline.h" 11 | #include 12 | 13 | namespace igl 14 | { 15 | // Note: If your looking for dense matrix matlab like sum for eigen matrics 16 | // just use: 17 | // M.colwise().sum() or M.rowwise().sum() 18 | // 19 | 20 | // Sum the columns or rows of a sparse matrix 21 | // Templates: 22 | // T should be a eigen sparse matrix primitive type like int or double 23 | // Inputs: 24 | // X m by n sparse matrix 25 | // dim dimension along which to sum (1 or 2) 26 | // Output: 27 | // S n-long sparse vector (if dim == 1) 28 | // or 29 | // S m-long sparse vector (if dim == 2) 30 | template 31 | IGL_INLINE void sum( 32 | const Eigen::SparseMatrix& X, 33 | const int dim, 34 | Eigen::SparseVector& S); 35 | // Sum is "conducted" in the type of DerivedB::Scalar 36 | template 37 | IGL_INLINE void sum( 38 | const Eigen::SparseMatrix & A, 39 | const int dim, 40 | Eigen::PlainObjectBase& B); 41 | } 42 | 43 | #ifndef IGL_STATIC_LIBRARY 44 | # include "sum.cpp" 45 | #endif 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/svd3x3.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_SVD3X3_H 9 | #define IGL_SVD3X3_H 10 | #include "igl_inline.h" 11 | #include 12 | 13 | namespace igl 14 | { 15 | // Super fast 3x3 SVD according to http://pages.cs.wisc.edu/~sifakis/project_pages/svd.html 16 | // The resulting decomposition is A = U * diag(S[0], S[1], S[2]) * V' 17 | // BEWARE: this SVD algorithm guarantees that det(U) = det(V) = 1, but this 18 | // comes at the cost that 'sigma3' can be negative 19 | // for computing polar decomposition it's great because all we need to do is U*V' 20 | // and the result will automatically have positive determinant 21 | // 22 | // Inputs: 23 | // A 3x3 matrix 24 | // Outputs: 25 | // U 3x3 left singular vectors 26 | // S 3x1 singular values 27 | // V 3x3 right singular vectors 28 | // 29 | // Known bugs: this will not work correctly for double precision. 30 | template 31 | IGL_INLINE void svd3x3( 32 | const Eigen::Matrix& A, 33 | Eigen::Matrix &U, 34 | Eigen::Matrix &S, 35 | Eigen::Matrix&V); 36 | } 37 | #ifndef IGL_STATIC_LIBRARY 38 | # include "svd3x3.cpp" 39 | #endif 40 | #endif 41 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/unique_edge_map.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2015 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_UNIQUE_EDGE_MAP_H 9 | #define IGL_UNIQUE_EDGE_MAP_H 10 | #include "igl_inline.h" 11 | #include 12 | #include 13 | namespace igl 14 | { 15 | // Construct relationships between facet "half"-(or rather "viewed")-edges E 16 | // to unique edges of the mesh seen as a graph. 17 | // 18 | // Inputs: 19 | // F #F by 3 list of simplices 20 | // Outputs: 21 | // E #F*3 by 2 list of all of directed edges 22 | // uE #uE by 2 list of unique undirected edges 23 | // EMAP #F*3 list of indices into uE, mapping each directed edge to unique 24 | // undirected edge 25 | // uE2E #uE list of lists of indices into E of coexisting edges 26 | template < 27 | typename DerivedF, 28 | typename DerivedE, 29 | typename DeriveduE, 30 | typename DerivedEMAP, 31 | typename uE2EType> 32 | IGL_INLINE void unique_edge_map( 33 | const Eigen::MatrixBase & F, 34 | Eigen::PlainObjectBase & E, 35 | Eigen::PlainObjectBase & uE, 36 | Eigen::PlainObjectBase & EMAP, 37 | std::vector > & uE2E); 38 | 39 | } 40 | #ifndef IGL_STATIC_LIBRARY 41 | # include "unique_edge_map.cpp" 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/unique_rows.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2017 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_UNIQUE_ROWS_H 9 | #define IGL_UNIQUE_ROWS_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | namespace igl 15 | { 16 | // Act like matlab's [C,IA,IC] = unique(X,'rows') 17 | // 18 | // Templates: 19 | // DerivedA derived scalar type, e.g. MatrixXi or MatrixXd 20 | // DerivedIA derived integer type, e.g. MatrixXi 21 | // DerivedIC derived integer type, e.g. MatrixXi 22 | // Inputs: 23 | // A m by n matrix whose entries are to unique'd according to rows 24 | // Outputs: 25 | // C #C vector of unique rows in A 26 | // IA #C index vector so that C = A(IA,:); 27 | // IC #A index vector so that A = C(IC,:); 28 | template 29 | IGL_INLINE void unique_rows( 30 | const Eigen::DenseBase& A, 31 | Eigen::PlainObjectBase& C, 32 | Eigen::PlainObjectBase& IA, 33 | Eigen::PlainObjectBase& IC); 34 | 35 | } 36 | 37 | #ifndef IGL_STATIC_LIBRARY 38 | # include "unique_rows.cpp" 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/unique_simplices.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_UNIQUE_SIMPLICES_H 9 | #define IGL_UNIQUE_SIMPLICES_H 10 | #include "igl_inline.h" 11 | #include 12 | namespace igl 13 | { 14 | // Find *combinatorially* unique simplices in F. **Order independent** 15 | // 16 | // Inputs: 17 | // F #F by simplex-size list of simplices 18 | // Outputs: 19 | // FF #FF by simplex-size list of unique simplices in F 20 | // IA #FF index vector so that FF == sort(F(IA,:),2); 21 | // IC #F index vector so that sort(F,2) == FF(IC,:); 22 | template < 23 | typename DerivedF, 24 | typename DerivedFF, 25 | typename DerivedIA, 26 | typename DerivedIC> 27 | IGL_INLINE void unique_simplices( 28 | const Eigen::MatrixBase& F, 29 | Eigen::PlainObjectBase& FF, 30 | Eigen::PlainObjectBase& IA, 31 | Eigen::PlainObjectBase& IC); 32 | template < 33 | typename DerivedF, 34 | typename DerivedFF> 35 | IGL_INLINE void unique_simplices( 36 | const Eigen::MatrixBase& F, 37 | Eigen::PlainObjectBase& FF); 38 | } 39 | 40 | #ifndef IGL_STATIC_LIBRARY 41 | # include "unique_simplices.cpp" 42 | #endif 43 | 44 | #endif 45 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/vector_area_matrix.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2014 Daniele Panozzo 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_VECTOR_AREA_MATRIX_H 9 | #define IGL_VECTOR_AREA_MATRIX_H 10 | #include "igl_inline.h" 11 | 12 | #include 13 | #include 14 | 15 | namespace igl 16 | { 17 | // Constructs the symmetric area matrix A, s.t. [V.col(0)' V.col(1)'] * A * 18 | // [V.col(0); V.col(1)] is the **vector area** of the mesh (V,F). 19 | // 20 | // Templates: 21 | // DerivedV derived type of eigen matrix for V (e.g. derived from 22 | // MatrixXd) 23 | // DerivedF derived type of eigen matrix for F (e.g. derived from 24 | // MatrixXi) 25 | // Scalar scalar type for eigen sparse matrix (e.g. double) 26 | // Inputs: 27 | // F #F by 3 list of mesh faces (must be triangles) 28 | // Outputs: 29 | // A #Vx2 by #Vx2 area matrix 30 | // 31 | template 32 | IGL_INLINE void vector_area_matrix( 33 | const Eigen::PlainObjectBase & F, 34 | Eigen::SparseMatrix& A); 35 | } 36 | 37 | #ifndef IGL_STATIC_LIBRARY 38 | # include "vector_area_matrix.cpp" 39 | #endif 40 | 41 | #endif 42 | -------------------------------------------------------------------------------- /source/thirdparty/libigl/include/igl/verbose.h: -------------------------------------------------------------------------------- 1 | // This file is part of libigl, a simple c++ geometry processing library. 2 | // 3 | // Copyright (C) 2013 Alec Jacobson 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public License 6 | // v. 2.0. If a copy of the MPL was not distributed with this file, You can 7 | // obtain one at http://mozilla.org/MPL/2.0/. 8 | #ifndef IGL_VERBOSE_H 9 | #define IGL_VERBOSE_H 10 | 11 | // This function is only useful as a header-only inlined function 12 | 13 | namespace igl 14 | { 15 | // Provide a wrapper for printf, called verbose that functions exactly like 16 | // printf if VERBOSE is defined and does exactly nothing if VERBOSE is 17 | // undefined 18 | inline int verbose(const char * msg,...); 19 | } 20 | 21 | 22 | 23 | #include 24 | #ifdef VERBOSE 25 | # include 26 | #endif 27 | 28 | #include 29 | // http://channel9.msdn.com/forums/techoff/254707-wrapping-printf-in-c/ 30 | #ifdef VERBOSE 31 | inline int igl::verbose(const char * msg,...) 32 | { 33 | va_list argList; 34 | va_start(argList, msg); 35 | int count = vprintf(msg, argList); 36 | va_end(argList); 37 | return count; 38 | } 39 | #else 40 | inline int igl::verbose(const char * /*msg*/,...) 41 | { 42 | return 0; 43 | } 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /source/thirdparty/mimalloc/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Microsoft Corporation, Daan Leijen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /source/thirdparty/mimalloc/src/static.c: -------------------------------------------------------------------------------- 1 | /* ---------------------------------------------------------------------------- 2 | Copyright (c) 2018, Microsoft Research, Daan Leijen 3 | This is free software; you can redistribute it and/or modify it under the 4 | terms of the MIT license. A copy of the license can be found in the file 5 | "LICENSE" at the root of this distribution. 6 | -----------------------------------------------------------------------------*/ 7 | #define _DEFAULT_SOURCE 8 | 9 | #include "mimalloc.h" 10 | #include "mimalloc-internal.h" 11 | 12 | // For a static override we create a single object file 13 | // containing the whole library. If it is linked first 14 | // it will override all the standard library allocation 15 | // functions (on Unix's). 16 | #include "stats.c" 17 | #include "random.c" 18 | #include "os.c" 19 | #include "arena.c" 20 | #include "region.c" 21 | #include "segment.c" 22 | #include "page.c" 23 | #include "heap.c" 24 | #include "alloc.c" 25 | #include "alloc-aligned.c" 26 | #include "alloc-posix.c" 27 | #include "init.c" 28 | #include "options.c" 29 | -------------------------------------------------------------------------------- /source/thirdparty/nativefiledialog/LICENSE: -------------------------------------------------------------------------------- 1 | This software is provided 'as-is', without any express or implied 2 | warranty. In no event will the authors be held liable for any damages 3 | arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, 6 | including commercial applications, and to alter it and redistribute it 7 | freely, subject to the following restrictions: 8 | 9 | 1. The origin of this software must not be misrepresented; you must not 10 | claim that you wrote the original software. If you use this software 11 | in a product, an acknowledgment in the product documentation would be 12 | appreciated but is not required. 13 | 2. Altered source versions must be plainly marked as such, and must not be 14 | misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | 17 | -------------------------------------------------------------------------------- /source/thirdparty/nativefiledialog/common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Native File Dialog 3 | 4 | Internal, common across platforms 5 | 6 | http://www.frogtoss.com/labs 7 | */ 8 | 9 | 10 | #ifndef _NFD_COMMON_H 11 | #define _NFD_COMMON_H 12 | 13 | #define NFD_MAX_STRLEN 256 14 | #define _NFD_UNUSED(x) ((void)x) 15 | 16 | void *NFDi_Malloc( size_t bytes ); 17 | void NFDi_Free( void *ptr ); 18 | void NFDi_SetError( const char *msg ); 19 | void NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy ); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /source/thirdparty/nativefiledialog/nfd_common.h: -------------------------------------------------------------------------------- 1 | /* 2 | Native File Dialog 3 | 4 | Internal, common across platforms 5 | 6 | http://www.frogtoss.com/labs 7 | */ 8 | 9 | 10 | #ifndef _NFD_COMMON_H 11 | #define _NFD_COMMON_H 12 | 13 | #include "nfd.h" 14 | 15 | #include 16 | 17 | #ifdef __cplusplus 18 | extern "C" { 19 | #endif 20 | 21 | #define NFD_MAX_STRLEN 256 22 | #define _NFD_UNUSED(x) ((void)x) 23 | 24 | #define NFD_UTF8_BOM "\xEF\xBB\xBF" 25 | 26 | 27 | void *NFDi_Malloc( size_t bytes ); 28 | void NFDi_Free( void *ptr ); 29 | void NFDi_SetError( const char *msg ); 30 | int NFDi_SafeStrncpy( char *dst, const char *src, size_t maxCopy ); 31 | int32_t NFDi_UTF8_Strlen( const nfdchar_t *str ); 32 | int NFDi_IsFilterSegmentChar( char ch ); 33 | 34 | #ifdef __cplusplus 35 | } 36 | #endif 37 | 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /source/thirdparty/oidn/include/OpenImageDenoise/version.h: -------------------------------------------------------------------------------- 1 | // ======================================================================== // 2 | // Copyright 2009-2019 Intel Corporation // 3 | // // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); // 5 | // you may not use this file except in compliance with the License. // 6 | // You may obtain a copy of the License at // 7 | // // 8 | // http://www.apache.org/licenses/LICENSE-2.0 // 9 | // // 10 | // Unless required by applicable law or agreed to in writing, software // 11 | // distributed under the License is distributed on an "AS IS" BASIS, // 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // 13 | // See the License for the specific language governing permissions and // 14 | // limitations under the License. // 15 | // ======================================================================== // 16 | 17 | #pragma once 18 | 19 | #define OIDN_VERSION_MAJOR 1 20 | #define OIDN_VERSION_MINOR 1 21 | #define OIDN_VERSION_PATCH 0 22 | #define OIDN_VERSION 10100 23 | #define OIDN_VERSION_STRING "1.1.0" 24 | -------------------------------------------------------------------------------- /source/thirdparty/stb_image.c: -------------------------------------------------------------------------------- 1 | #define STB_IMAGE_IMPLEMENTATION 2 | #include "stb_image.h" 3 | -------------------------------------------------------------------------------- /source/thirdparty/stb_image_resize.c: -------------------------------------------------------------------------------- 1 | #define STB_IMAGE_RESIZE_IMPLEMENTATION 2 | #include "stb_image_resize.h" 3 | -------------------------------------------------------------------------------- /source/thirdparty/stb_image_write.c: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #define STBI_MSC_SECURE_CRT 3 | #endif 4 | #define STB_IMAGE_WRITE_IMPLEMENTATION 5 | #include "stb_image_write.h" 6 | -------------------------------------------------------------------------------- /source/thirdparty/tiny_obj_loader.cpp: -------------------------------------------------------------------------------- 1 | #define TINYOBJLOADER_IMPLEMENTATION 2 | #include "tiny_obj_loader.h" 3 | -------------------------------------------------------------------------------- /source/viewer/shaders/fs_blit.sc: -------------------------------------------------------------------------------- 1 | $input v_texcoord0 2 | 3 | #include 4 | 5 | SAMPLER2D(s_texture, 0); 6 | 7 | void main() 8 | { 9 | gl_FragColor = texture2D(s_texture, v_texcoord0.xy); 10 | } 11 | -------------------------------------------------------------------------------- /source/viewer/shaders/fs_color.sc: -------------------------------------------------------------------------------- 1 | $input v_color0 2 | 3 | #include 4 | 5 | void main() 6 | { 7 | gl_FragColor = v_color0; 8 | } 9 | -------------------------------------------------------------------------------- /source/viewer/shaders/fs_gui.sc: -------------------------------------------------------------------------------- 1 | $input v_color0, v_texcoord0 2 | 3 | #include 4 | 5 | SAMPLER2D(s_texture, 0); 6 | 7 | void main() 8 | { 9 | gl_FragColor = v_color0 * texture2D(s_texture, v_texcoord0.xy); 10 | } 11 | -------------------------------------------------------------------------------- /source/viewer/shaders/fs_wireframe.sc: -------------------------------------------------------------------------------- 1 | $input v_barycentric 2 | 3 | /* 4 | * Copyright 2016 Dario Manesku. All rights reserved. 5 | * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause 6 | */ 7 | 8 | #include 9 | 10 | uniform vec4 u_color; 11 | uniform vec4 u_thickness; 12 | 13 | void main() 14 | { 15 | vec3 color = u_color.rgb; 16 | float opacity = u_color.a; 17 | float thickness = u_thickness.x; 18 | 19 | vec3 fw = abs(dFdx(v_barycentric)) + abs(dFdy(v_barycentric)); 20 | vec3 val = smoothstep(vec3_splat(0.0), fw*thickness, v_barycentric); 21 | float edge = min(min(val.x, val.y), val.z); // Gets to 0.0 around the edges. 22 | 23 | vec4 rgba = vec4(color, (1.0-edge)*opacity); 24 | gl_FragColor = rgba; 25 | } 26 | -------------------------------------------------------------------------------- /source/viewer/shaders/shared.h: -------------------------------------------------------------------------------- 1 | #define DIFFUSE_COLOR 0u 2 | #define DIFFUSE_TEXTURE 1u 3 | 4 | #define EMISSION_COLOR 0u 5 | #define EMISSION_TEXTURE 1u 6 | 7 | #define SHADE_FLAT 0u 8 | #define SHADE_LIGHTMAP 1u 9 | #define SHADE_LIGHTMAP_ONLY 2u 10 | 11 | #define OVERLAY_NONE 0u 12 | #define OVERLAY_CHART 1u 13 | #define OVERLAY_MESH 2u 14 | #define OVERLAY_STRETCH 3u 15 | 16 | #define LIGHTMAP_OP_CLEAR_CURR 0u 17 | #define LIGHTMAP_OP_CLEAR_SUM 1u 18 | #define LIGHTMAP_OP_WRITE_FINAL 2u 19 | #define LIGHTMAP_OP_FINISH_PASS 3u 20 | 21 | // Sync with ChartColorMode 22 | #define CHART_TYPE_PLANAR 0u 23 | #define CHART_TYPE_ORTHO 1u 24 | #define CHART_TYPE_LSCM 2u 25 | #define CHART_TYPE_PIECEWISE 3u 26 | #define CHART_TYPE_INVALID 4u 27 | #define CHART_TYPE_ANY 5u 28 | 29 | #define FACE_DATA_TEXTURE_WIDTH 2048u 30 | -------------------------------------------------------------------------------- /source/viewer/shaders/varying.def.sc: -------------------------------------------------------------------------------- 1 | vec4 v_color0 : COLOR0 = vec4(1.0, 1.0, 1.0, 1.0); 2 | vec3 v_normal : NORMAL = vec3(0.0, 0.0, 0.0); 3 | centroid vec4 v_texcoord0 : TEXCOORD0 = vec4(0.0, 0.0, 0.0, 0.0); 4 | vec3 v_barycentric : TEXCOORD1 = vec3(0.0, 0.0, 0.0); 5 | 6 | vec4 a_color0 : COLOR0; 7 | vec3 a_normal : NORMAL; 8 | vec3 a_position : POSITION; 9 | vec4 a_texcoord0 : TEXCOORD0; 10 | -------------------------------------------------------------------------------- /source/viewer/shaders/vs_blit.sc: -------------------------------------------------------------------------------- 1 | $input a_position, a_texcoord0 2 | $output v_texcoord0 3 | 4 | #include 5 | 6 | void main() 7 | { 8 | v_texcoord0 = a_texcoord0; 9 | gl_Position = mul(u_modelViewProj, vec4(a_position.xy, 0.0, 1.0)); 10 | } 11 | -------------------------------------------------------------------------------- /source/viewer/shaders/vs_color.sc: -------------------------------------------------------------------------------- 1 | $input a_color0, a_position 2 | $output v_color0 3 | 4 | #include 5 | 6 | void main() 7 | { 8 | v_color0 = a_color0; 9 | gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0)); 10 | } 11 | -------------------------------------------------------------------------------- /source/viewer/shaders/vs_gui.sc: -------------------------------------------------------------------------------- 1 | $input a_color0, a_position, a_texcoord0 2 | $output v_color0, v_texcoord0 3 | 4 | #include 5 | 6 | void main() 7 | { 8 | v_color0 = a_color0; 9 | v_texcoord0 = a_texcoord0; 10 | gl_Position = mul(u_modelViewProj, vec4(a_position.xy, 0.0, 1.0)); 11 | } 12 | -------------------------------------------------------------------------------- /source/viewer/shaders/vs_model.sc: -------------------------------------------------------------------------------- 1 | $input a_normal, a_position, a_texcoord0 2 | $output v_normal, v_texcoord0 3 | 4 | #include 5 | 6 | void main() 7 | { 8 | v_normal = normalize(mul(u_model[0], vec4(a_normal, 0.0)).xyz); 9 | v_texcoord0 = a_texcoord0; 10 | gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0)); 11 | } 12 | -------------------------------------------------------------------------------- /source/viewer/shaders/vs_wireframe.sc: -------------------------------------------------------------------------------- 1 | $input a_position, a_texcoord0 2 | $output v_barycentric 3 | 4 | #include 5 | 6 | void main() 7 | { 8 | v_barycentric = a_texcoord0.xyz; 9 | gl_Position = mul(u_modelViewProj, vec4(a_position, 1.0)); 10 | } 11 | -------------------------------------------------------------------------------- /source/viewer/shaders_bin/gl/fs_blit.h: -------------------------------------------------------------------------------- 1 | static const uint8_t fs_blit_gl[168] = 2 | { 3 | 0x46, 0x53, 0x48, 0x08, 0x6f, 0x1e, 0x3e, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x73, // FSH.o.><.......s 4 | 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // _texture........ 5 | 0x83, 0x00, 0x00, 0x00, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x69, 0x64, 0x20, 0x69, 0x6e, 0x20, // ....centroid in 6 | 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // vec4 v_texcoord0 7 | 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // ;.uniform sample 8 | 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x3b, 0x0a, 0x76, // r2D s_texture;.v 9 | 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, // oid main ().{. 10 | 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, // gl_FragColor = t 11 | 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, // exture (s_textur 12 | 0x65, 0x2c, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, // e, v_texcoord0.x 13 | 0x79, 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // y);.}... 14 | }; 15 | -------------------------------------------------------------------------------- /source/viewer/shaders_bin/gl/fs_color.h: -------------------------------------------------------------------------------- 1 | static const uint8_t fs_color_gl[82] = 2 | { 3 | 0x46, 0x53, 0x48, 0x08, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, // FSH....I......?. 4 | 0x00, 0x00, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // ..in vec4 v_colo 5 | 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, // r0;.void main () 6 | 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // .{. gl_FragColo 7 | 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, // r = v_color0;.}. 8 | 0x0a, 0x00, // .. 9 | }; 10 | -------------------------------------------------------------------------------- /source/viewer/shaders_bin/gl/fs_gui.h: -------------------------------------------------------------------------------- 1 | static const uint8_t fs_gui_gl[199] = 2 | { 3 | 0x46, 0x53, 0x48, 0x08, 0x01, 0x83, 0xf2, 0xe1, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x09, 0x73, // FSH............s 4 | 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // _texture........ 5 | 0xa2, 0x00, 0x00, 0x00, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, // ....in vec4 v_co 6 | 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x6f, 0x69, 0x64, 0x20, 0x69, // lor0;.centroid i 7 | 0x6e, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, // n vec4 v_texcoor 8 | 0x64, 0x30, 0x3b, 0x0a, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, // d0;.uniform samp 9 | 0x6c, 0x65, 0x72, 0x32, 0x44, 0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x3b, // ler2D s_texture; 10 | 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{. 11 | 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, // gl_FragColor = 12 | 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x2a, 0x20, 0x74, 0x65, 0x78, // (v_color0 * tex 13 | 0x74, 0x75, 0x72, 0x65, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x2c, // ture (s_texture, 14 | 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x2e, 0x78, 0x79, 0x29, // v_texcoord0.xy) 15 | 0x29, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // );.}... 16 | }; 17 | -------------------------------------------------------------------------------- /source/viewer/shaders_bin/shaders.h: -------------------------------------------------------------------------------- 1 | #include "d3d11/fs_blit.h" 2 | #include "d3d11/fs_color.h" 3 | #include "d3d11/fs_gui.h" 4 | #include "d3d11/fs_material.h" 5 | #include "d3d11/fs_wireframe.h" 6 | #include "d3d11/vs_blit.h" 7 | #include "d3d11/vs_color.h" 8 | #include "d3d11/vs_gui.h" 9 | #include "d3d11/vs_model.h" 10 | #include "d3d11/vs_wireframe.h" 11 | #include "gl/fs_blit.h" 12 | #include "gl/fs_color.h" 13 | #include "gl/fs_gui.h" 14 | #include "gl/fs_material.h" 15 | #include "gl/fs_wireframe.h" 16 | #include "gl/vs_blit.h" 17 | #include "gl/vs_color.h" 18 | #include "gl/vs_gui.h" 19 | #include "gl/vs_model.h" 20 | #include "gl/vs_wireframe.h" 21 | #include "vk/fs_blit.h" 22 | #include "vk/fs_color.h" 23 | #include "vk/fs_gui.h" 24 | #include "vk/fs_material.h" 25 | #include "vk/fs_wireframe.h" 26 | #include "vk/vs_blit.h" 27 | #include "vk/vs_color.h" 28 | #include "vk/vs_gui.h" 29 | #include "vk/vs_model.h" 30 | #include "vk/vs_wireframe.h" 31 | -------------------------------------------------------------------------------- /source/xatlas.natvis: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | empty 5 | {{ size={m_base.size} }} 6 | 7 | m_base.size 8 | m_base.capacity 9 | 10 | m_base.size 11 | ($T1*)m_base.buffer 12 | 13 | 14 | 15 | 16 | empty 17 | {{ length={length} }} 18 | 19 | length 20 | 21 | length 22 | data 23 | 24 | 25 | 26 | 27 | empty 28 | {{ length={length} }} 29 | 30 | length 31 | 32 | length 33 | data 34 | 35 | 36 | 37 | 38 | --------------------------------------------------------------------------------