Copy disabled (too large)
Download .txt
Showing preview only (27,280K chars total). Download the full file to get everything.
Repository: NVIDIAGameWorks/FleX
Branch: master
Commit: b1ea0f87b725
Files: 700
Total size: 154.7 MB
Directory structure:
gitextract_aqyo8464/
├── .gitignore
├── LICENSE.txt
├── README.md
├── bin/
│ ├── linux64/
│ │ ├── NvFlexDemoDebugCUDA_x64
│ │ └── NvFlexDemoReleaseCUDA_x64
│ ├── win32/
│ │ ├── NvFlexDebugCUDA_x86.dll.pdb
│ │ ├── NvFlexDebugD3D_x86.dll.pdb
│ │ ├── NvFlexDemoDebugCUDA_x86.exe.pdb
│ │ ├── NvFlexDemoDebugD3D_x86.exe.pdb
│ │ ├── NvFlexDemoReleaseCUDA_x86.exe.pdb
│ │ ├── NvFlexDemoReleaseD3D_x86.exe.pdb
│ │ ├── NvFlexDeviceDebug_x86.dll.pdb
│ │ ├── NvFlexDeviceRelease_x86.dll.pdb
│ │ ├── NvFlexExtDebugCUDA_x86.dll.pdb
│ │ ├── NvFlexExtDebugD3D_x86.dll.pdb
│ │ ├── NvFlexExtReleaseCUDA_x86.dll.pdb
│ │ ├── NvFlexExtReleaseD3D_x86.dll.pdb
│ │ ├── NvFlexReleaseCUDA_x86.dll.pdb
│ │ └── NvFlexReleaseD3D_x86.dll.pdb
│ └── win64/
│ ├── NvFlexDebugCUDA_x64.dll.pdb
│ ├── NvFlexDebugD3D_x64.dll.pdb
│ ├── NvFlexDemoDebugCUDA_x64.exe.pdb
│ ├── NvFlexDemoDebugD3D_x64.exe.pdb
│ ├── NvFlexDemoReleaseCUDA_x64.exe.pdb
│ ├── NvFlexDemoReleaseD3D_x64.exe.pdb
│ ├── NvFlexDeviceDebug_x64.dll.pdb
│ ├── NvFlexDeviceRelease_x64.dll.pdb
│ ├── NvFlexExtDebugCUDA_x64.dll.pdb
│ ├── NvFlexExtDebugD3D_x64.dll.pdb
│ ├── NvFlexExtReleaseCUDA_x64.dll.pdb
│ ├── NvFlexExtReleaseD3D_x64.dll.pdb
│ ├── NvFlexReleaseCUDA_x64.dll.pdb
│ └── NvFlexReleaseD3D_x64.dll.pdb
├── core/
│ ├── aabbtree.cpp
│ ├── aabbtree.h
│ ├── cloth.h
│ ├── convex.h
│ ├── core.cpp
│ ├── core.h
│ ├── extrude.cpp
│ ├── extrude.h
│ ├── mat22.h
│ ├── mat33.h
│ ├── mat44.h
│ ├── maths.cpp
│ ├── maths.h
│ ├── matnn.h
│ ├── mesh.cpp
│ ├── mesh.h
│ ├── perlin.cpp
│ ├── perlin.h
│ ├── pfm.cpp
│ ├── pfm.h
│ ├── platform.cpp
│ ├── platform.h
│ ├── png.cpp
│ ├── png.h
│ ├── point3.h
│ ├── quat.h
│ ├── sdf.cpp
│ ├── sdf.h
│ ├── tga.cpp
│ ├── tga.h
│ ├── types.h
│ ├── vec2.h
│ ├── vec3.h
│ ├── vec4.h
│ ├── voxelize.cpp
│ └── voxelize.h
├── data/
│ ├── apple.obj
│ ├── armadillo.pfm
│ ├── armadillo.ply
│ ├── banana.obj
│ ├── bowl.obj
│ ├── bowl_high.ply
│ ├── box.ply
│ ├── box_high.ply
│ ├── box_high_weld.ply
│ ├── box_ultra_high.ply
│ ├── box_very_high.ply
│ ├── bunny.pfm
│ ├── bunny.ply
│ ├── dragon.obj
│ ├── froggy.tet
│ ├── irregular_plane.obj
│ ├── lighthouse.ply
│ ├── nv_small.ply
│ ├── pear.obj
│ ├── rocka.ply
│ ├── rockb.ply
│ ├── rockc.ply
│ ├── rockd.ply
│ ├── rocke.ply
│ ├── rockf.ply
│ ├── rope.obj
│ ├── sandcastle.obj
│ ├── softs/
│ │ └── octopus.obj
│ ├── sphere.pfm
│ ├── sphere.ply
│ ├── sphere_high.ply
│ ├── teapot.ply
│ └── torus.obj
├── demo/
│ ├── benchmark.h
│ ├── compiler/
│ │ ├── makelinux64/
│ │ │ ├── Makefile
│ │ │ ├── Makefile.flexDemoCUDA.mk
│ │ │ └── Makefile.flexExtCUDA.mk
│ │ ├── vc12win32/
│ │ │ ├── flexDemoCUDA.sln
│ │ │ ├── flexDemoCUDA.vcxproj
│ │ │ ├── flexDemoCUDA.vcxproj.filters
│ │ │ ├── flexDemoCUDA.vcxproj.user
│ │ │ ├── flexDemoD3D.sln
│ │ │ ├── flexDemoD3D.vcxproj
│ │ │ ├── flexDemoD3D.vcxproj.filters
│ │ │ └── flexDemoD3D.vcxproj.user
│ │ ├── vc12win64/
│ │ │ ├── flexDemoCUDA.sln
│ │ │ ├── flexDemoCUDA.vcxproj
│ │ │ ├── flexDemoCUDA.vcxproj.filters
│ │ │ ├── flexDemoCUDA.vcxproj.user
│ │ │ ├── flexDemoD3D.sln
│ │ │ ├── flexDemoD3D.vcxproj
│ │ │ ├── flexDemoD3D.vcxproj.filters
│ │ │ └── flexDemoD3D.vcxproj.user
│ │ ├── vc14win32/
│ │ │ ├── flexDemoD3D.sln
│ │ │ ├── flexDemoD3D.vcxproj
│ │ │ ├── flexDemoD3D.vcxproj.filters
│ │ │ └── flexDemoD3D.vcxproj.user
│ │ └── vc14win64/
│ │ ├── flexDemoCUDA.sln
│ │ ├── flexDemoCUDA.vcxproj
│ │ ├── flexDemoCUDA.vcxproj.filters
│ │ ├── flexDemoCUDA.vcxproj.user
│ │ ├── flexDemoD3D.sln
│ │ ├── flexDemoD3D.vcxproj
│ │ ├── flexDemoD3D.vcxproj.filters
│ │ └── flexDemoD3D.vcxproj.user
│ ├── d3d/
│ │ ├── appGraphCtx.h
│ │ ├── appGraphCtxLoader.cpp
│ │ ├── imguiGraph.cpp
│ │ ├── imguiGraph.h
│ │ ├── imguiGraphLoader.cpp
│ │ ├── loader.cpp
│ │ ├── loader.h
│ │ ├── loaderMacros.h
│ │ ├── renderParamsD3D.cpp
│ │ ├── renderParamsD3D.h
│ │ ├── shaderCommonD3D.h
│ │ └── shaders/
│ │ ├── blurDepthPS.hlsl
│ │ ├── compositePS.hlsl
│ │ ├── debugLinePS.hlsl
│ │ ├── debugLineVS.hlsl
│ │ ├── diffuseGS.hlsl
│ │ ├── diffusePS.hlsl
│ │ ├── diffuseVS.hlsl
│ │ ├── ellipsoidDepthGS.hlsl
│ │ ├── ellipsoidDepthPS.hlsl
│ │ ├── ellipsoidDepthVS.hlsl
│ │ ├── imguiPS.hlsl
│ │ ├── imguiVS.hlsl
│ │ ├── meshAsyncComputeBenchPS.hlsl
│ │ ├── meshPS.hlsl
│ │ ├── meshShadowPS.hlsl
│ │ ├── meshVS.hlsl
│ │ ├── passThroughVS.hlsl
│ │ ├── pointGS.hlsl
│ │ ├── pointPS.hlsl
│ │ ├── pointShadowPS.hlsl
│ │ ├── pointThicknessGS.hlsl
│ │ ├── pointThicknessPS.hlsl
│ │ ├── pointThicknessVS.hlsl
│ │ ├── pointVS.hlsl
│ │ └── shaderCommon.h
│ ├── d3d11/
│ │ ├── appD3D11Ctx.cpp
│ │ ├── appD3D11Ctx.h
│ │ ├── debugLineRenderD3D11.cpp
│ │ ├── debugLineRenderD3D11.h
│ │ ├── demoContextD3D11.cpp
│ │ ├── demoContextD3D11.h
│ │ ├── diffuseRenderD3D11.cpp
│ │ ├── diffuseRenderD3D11.h
│ │ ├── fluidRenderD3D11.cpp
│ │ ├── fluidRenderD3D11.h
│ │ ├── imguiGraphD3D11.cpp
│ │ ├── imguiGraphD3D11.h
│ │ ├── imguiInteropD3D11.cpp
│ │ ├── meshRenderD3D11.cpp
│ │ ├── meshRenderD3D11.h
│ │ ├── pointRenderD3D11.cpp
│ │ ├── pointRenderD3D11.h
│ │ ├── renderTargetD3D11.cpp
│ │ ├── renderTargetD3D11.h
│ │ ├── shadowMapD3D11.cpp
│ │ └── shadowMapD3D11.h
│ ├── d3d12/
│ │ ├── NvCoDx12CircularResourceHeap.cpp
│ │ ├── NvCoDx12CircularResourceHeap.h
│ │ ├── NvCoDx12CounterFence.cpp
│ │ ├── NvCoDx12CounterFence.h
│ │ ├── NvCoDx12DescriptorHeap.cpp
│ │ ├── NvCoDx12DescriptorHeap.h
│ │ ├── NvCoDx12Handle.h
│ │ ├── NvCoDx12HelperUtil.cpp
│ │ ├── NvCoDx12HelperUtil.h
│ │ ├── NvCoDx12RenderTarget.cpp
│ │ ├── NvCoDx12RenderTarget.h
│ │ ├── NvCoDx12Resource.cpp
│ │ ├── NvCoDx12Resource.h
│ │ ├── NvCoDx12ResourceScopeManager.cpp
│ │ ├── NvCoDx12ResourceScopeManager.h
│ │ ├── NvCoDxDebugUtil.cpp
│ │ ├── NvCoDxDebugUtil.h
│ │ ├── NvCoDxFormatUtil.cpp
│ │ ├── NvCoDxFormatUtil.h
│ │ ├── NvCoFreeList.cpp
│ │ ├── NvCoFreeList.h
│ │ ├── NvResult.h
│ │ ├── appD3D12Ctx.cpp
│ │ ├── appD3D12Ctx.h
│ │ ├── bufferD3D12.cpp
│ │ ├── bufferD3D12.h
│ │ ├── demoContextD3D12.cpp
│ │ ├── demoContextD3D12.h
│ │ ├── diffusePointRenderPipelineD3D12.cpp
│ │ ├── diffusePointRenderPipelineD3D12.h
│ │ ├── fluidCompositeRenderPipelineD3D12.cpp
│ │ ├── fluidCompositeRenderPipelineD3D12.h
│ │ ├── fluidEllipsoidRenderPipelineD3D12.cpp
│ │ ├── fluidEllipsoidRenderPipelineD3D12.h
│ │ ├── fluidSmoothRenderPipelineD3D12.cpp
│ │ ├── fluidSmoothRenderPipelineD3D12.h
│ │ ├── fluidThicknessRenderPipelineD3D12.cpp
│ │ ├── fluidThicknessRenderPipelineD3D12.h
│ │ ├── imguiGraphD3D12.cpp
│ │ ├── imguiGraphD3D12.h
│ │ ├── imguiInteropD3D12.cpp
│ │ ├── lineRenderPipelineD3D12.cpp
│ │ ├── lineRenderPipelineD3D12.h
│ │ ├── meshRenderPipelineD3D12.cpp
│ │ ├── meshRenderPipelineD3D12.h
│ │ ├── meshRenderer.cpp
│ │ ├── meshRenderer.h
│ │ ├── meshRendererD3D12.cpp
│ │ ├── meshRendererD3D12.h
│ │ ├── meshUtil.cpp
│ │ ├── meshUtil.h
│ │ ├── pipelineUtilD3D12.cpp
│ │ ├── pipelineUtilD3D12.h
│ │ ├── pointRenderPipelineD3D12.cpp
│ │ ├── pointRenderPipelineD3D12.h
│ │ ├── renderStateD3D12.cpp
│ │ └── renderStateD3D12.h
│ ├── demoContext.h
│ ├── helpers.h
│ ├── imgui.cpp
│ ├── imgui.h
│ ├── main.cpp
│ ├── opengl/
│ │ ├── demoContextOGL.h
│ │ ├── imguiRenderGL.cpp
│ │ ├── imguiRenderGL.h
│ │ ├── shader.cpp
│ │ ├── shader.h
│ │ ├── shadersGL.cpp
│ │ └── utilsGL.h
│ ├── scenes/
│ │ ├── adhesion.h
│ │ ├── armadilloshower.h
│ │ ├── bananas.h
│ │ ├── bouyancy.h
│ │ ├── bunnybath.h
│ │ ├── ccdfluid.h
│ │ ├── clothlayers.h
│ │ ├── dambreak.h
│ │ ├── darts.h
│ │ ├── debris.h
│ │ ├── deformables.h
│ │ ├── envcloth.h
│ │ ├── flag.h
│ │ ├── fluidblock.h
│ │ ├── fluidclothcoupling.h
│ │ ├── forcefield.h
│ │ ├── frictionmoving.h
│ │ ├── frictionramp.h
│ │ ├── gamemesh.h
│ │ ├── googun.h
│ │ ├── granularpile.h
│ │ ├── granularshape.h
│ │ ├── inflatable.h
│ │ ├── initialoverlap.h
│ │ ├── lighthouse.h
│ │ ├── localspacecloth.h
│ │ ├── localspacefluid.h
│ │ ├── lowdimensionalshapes.h
│ │ ├── melting.h
│ │ ├── mixedpile.h
│ │ ├── nonconvex.h
│ │ ├── parachutingbunnies.h
│ │ ├── pasta.h
│ │ ├── player.h
│ │ ├── potpourri.h
│ │ ├── rayleightaylor.h
│ │ ├── restitution.h
│ │ ├── rigidfluidcoupling.h
│ │ ├── rigidpile.h
│ │ ├── rigidrotation.h
│ │ ├── rockpool.h
│ │ ├── sdfcollision.h
│ │ ├── shapechannels.h
│ │ ├── shapecollision.h
│ │ ├── softbody.h
│ │ ├── spherecloth.h
│ │ ├── surfacetension.h
│ │ ├── tearing.h
│ │ ├── thinbox.h
│ │ ├── trianglecollision.h
│ │ ├── triggervolume.h
│ │ ├── viscosity.h
│ │ └── waterballoon.h
│ ├── scenes.h
│ ├── shaders.h
│ ├── shadersDemoContext.cpp
│ ├── shadersDemoContext.h
│ └── stb_truetype.h
├── doc/
│ ├── .buildinfo
│ ├── _sources/
│ │ ├── index.txt
│ │ ├── manual.txt
│ │ └── releasenotes.txt
│ ├── _static/
│ │ ├── api/
│ │ │ ├── _nv_flex_8h.html
│ │ │ ├── _nv_flex_8h_source.html
│ │ │ ├── _nv_flex_device_8h.html
│ │ │ ├── _nv_flex_device_8h_source.html
│ │ │ ├── _nv_flex_ext_8h.html
│ │ │ ├── _nv_flex_ext_8h_source.html
│ │ │ ├── dir_d44c64559bbebec7f509842c48db8b23.html
│ │ │ ├── doxygen.css
│ │ │ ├── dynsections.js
│ │ │ ├── files.html
│ │ │ ├── flex.css
│ │ │ ├── globals.html
│ │ │ ├── globals_enum.html
│ │ │ ├── globals_eval.html
│ │ │ ├── globals_func.html
│ │ │ ├── globals_type.html
│ │ │ ├── index.html
│ │ │ ├── jquery.js
│ │ │ ├── struct_nv_flex_solver_callback.html
│ │ │ ├── struct_nv_flex_vector.html
│ │ │ └── tabs.css
│ │ ├── application.css
│ │ ├── bootstrap.css
│ │ ├── bootstrap.js
│ │ ├── default.css
│ │ ├── doctools.js
│ │ ├── jquery.cookie.js
│ │ ├── jquery.js
│ │ ├── jquery.storageapi.js
│ │ ├── pygments.css
│ │ ├── searchtools.js
│ │ ├── sidebar.js
│ │ ├── styleguide.css
│ │ └── underscore.js
│ ├── genindex.html
│ ├── index.html
│ ├── manual.html
│ ├── objects.inv
│ ├── releasenotes.html
│ ├── search.html
│ └── searchindex.js
├── extensions/
│ ├── compiler/
│ │ ├── makeandroid_aarch64/
│ │ │ ├── Makefile
│ │ │ └── Makefile.flexExtCUDA.mk
│ │ ├── makelinux64/
│ │ │ ├── Makefile
│ │ │ └── Makefile.flexExtCUDA.mk
│ │ ├── vc12win32/
│ │ │ ├── flexExtCUDA.sln
│ │ │ ├── flexExtCUDA.vcxproj
│ │ │ ├── flexExtCUDA.vcxproj.filters
│ │ │ ├── flexExtD3D.sln
│ │ │ ├── flexExtD3D.vcxproj
│ │ │ └── flexExtD3D.vcxproj.filters
│ │ ├── vc12win64/
│ │ │ ├── flexExtCUDA.sln
│ │ │ ├── flexExtCUDA.vcxproj
│ │ │ ├── flexExtCUDA.vcxproj.filters
│ │ │ ├── flexExtD3D.sln
│ │ │ ├── flexExtD3D.vcxproj
│ │ │ └── flexExtD3D.vcxproj.filters
│ │ ├── vc14win32/
│ │ │ ├── flexExtD3D.sln
│ │ │ ├── flexExtD3D.vcxproj
│ │ │ └── flexExtD3D.vcxproj.filters
│ │ └── vc14win64/
│ │ ├── flexExtCUDA.sln
│ │ ├── flexExtCUDA.vcxproj
│ │ ├── flexExtCUDA.vcxproj.filters
│ │ ├── flexExtD3D.sln
│ │ ├── flexExtD3D.vcxproj
│ │ └── flexExtD3D.vcxproj.filters
│ ├── cuda/
│ │ └── flexExt.cu
│ ├── dx/
│ │ ├── flexExt.cpp
│ │ ├── flexExt.hlsl
│ │ ├── flexExt_dx_common.h
│ │ └── shaders/
│ │ └── flexExt.UpdateForceFields.hlsl
│ ├── flexExtCloth.cpp
│ ├── flexExtContainer.cpp
│ ├── flexExtMovingFrame.cpp
│ ├── flexExtRigid.cpp
│ └── flexExtSoft.cpp
├── external/
│ ├── D3D11/
│ │ ├── include/
│ │ │ ├── D3DX10.h
│ │ │ ├── D3DX10core.h
│ │ │ ├── D3DX10math.h
│ │ │ ├── D3DX10math.inl
│ │ │ ├── D3DX10mesh.h
│ │ │ ├── D3DX10tex.h
│ │ │ ├── D3DX11.h
│ │ │ ├── D3DX11async.h
│ │ │ ├── D3DX11core.h
│ │ │ ├── D3DX11tex.h
│ │ │ └── d3dx10async.h
│ │ └── libs/
│ │ ├── x64/
│ │ │ ├── d3d11.lib
│ │ │ ├── d3dx10.lib
│ │ │ └── d3dx11.lib
│ │ └── x86/
│ │ ├── d3d11.lib
│ │ ├── d3dx10.lib
│ │ └── d3dx11.lib
│ ├── D3D12/
│ │ ├── include/
│ │ │ ├── PIXEventsCommon.h
│ │ │ ├── PIXEventsGenerated.h
│ │ │ ├── d3d12.h
│ │ │ ├── d3d12sdklayers.h
│ │ │ ├── d3dx12.h
│ │ │ ├── dxgi.h
│ │ │ ├── dxgi1_2.h
│ │ │ ├── dxgi1_3.h
│ │ │ ├── dxgi1_4.h
│ │ │ ├── dxgitype.h
│ │ │ ├── pix3.h
│ │ │ └── pix3_win.h
│ │ └── libs/
│ │ ├── x64/
│ │ │ └── d3d12.lib
│ │ └── x86/
│ │ └── d3d12.lib
│ ├── GFSDK_Aftermath_v1.21/
│ │ ├── include/
│ │ │ ├── GFSDK_Aftermath.h
│ │ │ └── defines.h
│ │ └── lib/
│ │ ├── x64/
│ │ │ ├── GFSDK_Aftermath_Lib.x64.lib
│ │ │ └── GFSDK_Aftermath_Lib_UWP.x64.lib
│ │ └── x86/
│ │ ├── GFSDK_Aftermath_Lib.x86.lib
│ │ └── GFSDK_Aftermath_Lib_UWP.x86.lib
│ ├── NvToolsExt/
│ │ ├── include/
│ │ │ └── nvToolsExt.h
│ │ └── lib/
│ │ ├── Win32/
│ │ │ └── nvToolsExt32_1.lib
│ │ └── x64/
│ │ └── nvToolsExt64_1.lib
│ ├── SDL2-2.0.4/
│ │ ├── BUGS.txt
│ │ ├── COPYING.txt
│ │ ├── README-SDL.txt
│ │ ├── README.txt
│ │ ├── WhatsNew.txt
│ │ ├── docs/
│ │ │ ├── README-android.md
│ │ │ ├── README-cmake.md
│ │ │ ├── README-directfb.md
│ │ │ ├── README-dynapi.md
│ │ │ ├── README-emscripten.md
│ │ │ ├── README-gesture.md
│ │ │ ├── README-hg.md
│ │ │ ├── README-ios.md
│ │ │ ├── README-linux.md
│ │ │ ├── README-macosx.md
│ │ │ ├── README-nacl.md
│ │ │ ├── README-pandora.md
│ │ │ ├── README-platforms.md
│ │ │ ├── README-porting.md
│ │ │ ├── README-psp.md
│ │ │ ├── README-raspberrypi.md
│ │ │ ├── README-touch.md
│ │ │ ├── README-wince.md
│ │ │ ├── README-windows.md
│ │ │ ├── README-winrt.md
│ │ │ ├── README.md
│ │ │ └── doxyfile
│ │ ├── include/
│ │ │ ├── SDL.h
│ │ │ ├── SDL_assert.h
│ │ │ ├── SDL_atomic.h
│ │ │ ├── SDL_audio.h
│ │ │ ├── SDL_bits.h
│ │ │ ├── SDL_blendmode.h
│ │ │ ├── SDL_clipboard.h
│ │ │ ├── SDL_config.h
│ │ │ ├── SDL_cpuinfo.h
│ │ │ ├── SDL_egl.h
│ │ │ ├── SDL_endian.h
│ │ │ ├── SDL_error.h
│ │ │ ├── SDL_events.h
│ │ │ ├── SDL_filesystem.h
│ │ │ ├── SDL_gamecontroller.h
│ │ │ ├── SDL_gesture.h
│ │ │ ├── SDL_haptic.h
│ │ │ ├── SDL_hints.h
│ │ │ ├── SDL_joystick.h
│ │ │ ├── SDL_keyboard.h
│ │ │ ├── SDL_keycode.h
│ │ │ ├── SDL_loadso.h
│ │ │ ├── SDL_log.h
│ │ │ ├── SDL_main.h
│ │ │ ├── SDL_messagebox.h
│ │ │ ├── SDL_mouse.h
│ │ │ ├── SDL_mutex.h
│ │ │ ├── SDL_name.h
│ │ │ ├── SDL_opengl.h
│ │ │ ├── SDL_opengl_glext.h
│ │ │ ├── SDL_opengles.h
│ │ │ ├── SDL_opengles2.h
│ │ │ ├── SDL_opengles2_gl2.h
│ │ │ ├── SDL_opengles2_gl2ext.h
│ │ │ ├── SDL_opengles2_gl2platform.h
│ │ │ ├── SDL_opengles2_khrplatform.h
│ │ │ ├── SDL_pixels.h
│ │ │ ├── SDL_platform.h
│ │ │ ├── SDL_power.h
│ │ │ ├── SDL_quit.h
│ │ │ ├── SDL_rect.h
│ │ │ ├── SDL_render.h
│ │ │ ├── SDL_revision.h
│ │ │ ├── SDL_rwops.h
│ │ │ ├── SDL_scancode.h
│ │ │ ├── SDL_shape.h
│ │ │ ├── SDL_stdinc.h
│ │ │ ├── SDL_surface.h
│ │ │ ├── SDL_system.h
│ │ │ ├── SDL_syswm.h
│ │ │ ├── SDL_test.h
│ │ │ ├── SDL_test_assert.h
│ │ │ ├── SDL_test_common.h
│ │ │ ├── SDL_test_compare.h
│ │ │ ├── SDL_test_crc32.h
│ │ │ ├── SDL_test_font.h
│ │ │ ├── SDL_test_fuzzer.h
│ │ │ ├── SDL_test_harness.h
│ │ │ ├── SDL_test_images.h
│ │ │ ├── SDL_test_log.h
│ │ │ ├── SDL_test_md5.h
│ │ │ ├── SDL_test_random.h
│ │ │ ├── SDL_thread.h
│ │ │ ├── SDL_timer.h
│ │ │ ├── SDL_touch.h
│ │ │ ├── SDL_types.h
│ │ │ ├── SDL_version.h
│ │ │ ├── SDL_video.h
│ │ │ ├── begin_code.h
│ │ │ └── close_code.h
│ │ └── lib/
│ │ ├── x64/
│ │ │ ├── SDL2.lib
│ │ │ ├── SDL2main.lib
│ │ │ ├── SDL2test.lib
│ │ │ ├── libSDL2-2.0.so.0.4.0
│ │ │ ├── libSDL2.a
│ │ │ ├── libSDL2.la
│ │ │ ├── libSDL2_test.a
│ │ │ └── libSDL2main.a
│ │ └── x86/
│ │ ├── SDL2.lib
│ │ ├── SDL2main.lib
│ │ └── SDL2test.lib
│ ├── ags_lib/
│ │ ├── .gitattributes
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── hlsl/
│ │ │ ├── ags_shader_intrinsics_dx11.hlsl
│ │ │ └── ags_shader_intrinsics_dx12.hlsl
│ │ ├── inc/
│ │ │ └── amd_ags.h
│ │ └── lib/
│ │ ├── amd_ags_x64.lib
│ │ └── amd_ags_x86.lib
│ ├── cub-1.3.2/
│ │ └── cub/
│ │ ├── block/
│ │ │ ├── block_discontinuity.cuh
│ │ │ ├── block_exchange.cuh
│ │ │ ├── block_histogram.cuh
│ │ │ ├── block_load.cuh
│ │ │ ├── block_radix_rank.cuh
│ │ │ ├── block_radix_sort.cuh
│ │ │ ├── block_raking_layout.cuh
│ │ │ ├── block_reduce.cuh
│ │ │ ├── block_scan.cuh
│ │ │ ├── block_shift.cuh
│ │ │ ├── block_store.cuh
│ │ │ └── specializations/
│ │ │ ├── block_histogram_atomic.cuh
│ │ │ ├── block_histogram_sort.cuh
│ │ │ ├── block_reduce_raking.cuh
│ │ │ ├── block_reduce_raking_commutative_only.cuh
│ │ │ ├── block_reduce_warp_reductions.cuh
│ │ │ ├── block_scan_raking.cuh
│ │ │ └── block_scan_warp_scans.cuh
│ │ ├── block_range/
│ │ │ ├── block_range_histo.cuh
│ │ │ ├── block_range_radix_sort_downsweep.cuh
│ │ │ ├── block_range_radix_sort_upsweep.cuh
│ │ │ ├── block_range_reduce.cuh
│ │ │ ├── block_range_reduce_by_key.cuh
│ │ │ ├── block_range_scan.cuh
│ │ │ ├── block_range_select.cuh
│ │ │ ├── block_scan_prefix_operators.cuh
│ │ │ └── specializations/
│ │ │ ├── block_range_histo_gatomic.cuh
│ │ │ ├── block_range_histo_satomic.cuh
│ │ │ └── block_range_histo_sort.cuh
│ │ ├── cub.cuh
│ │ ├── device/
│ │ │ ├── device_histogram.cuh
│ │ │ ├── device_partition.cuh
│ │ │ ├── device_radix_sort.cuh
│ │ │ ├── device_reduce.cuh
│ │ │ ├── device_scan.cuh
│ │ │ ├── device_select.cuh
│ │ │ └── dispatch/
│ │ │ ├── device_histogram_dispatch.cuh
│ │ │ ├── device_radix_sort_dispatch.cuh
│ │ │ ├── device_reduce_by_key_dispatch.cuh
│ │ │ ├── device_reduce_dispatch.cuh
│ │ │ ├── device_scan_dispatch.cuh
│ │ │ └── device_select_dispatch.cuh
│ │ ├── grid/
│ │ │ ├── grid_barrier.cuh
│ │ │ ├── grid_even_share.cuh
│ │ │ ├── grid_mapping.cuh
│ │ │ └── grid_queue.cuh
│ │ ├── host/
│ │ │ └── spinlock.cuh
│ │ ├── iterator/
│ │ │ ├── arg_index_input_iterator.cuh
│ │ │ ├── cache_modified_input_iterator.cuh
│ │ │ ├── cache_modified_output_iterator.cuh
│ │ │ ├── constant_input_iterator.cuh
│ │ │ ├── counting_input_iterator.cuh
│ │ │ ├── tex_obj_input_iterator.cuh
│ │ │ ├── tex_ref_input_iterator.cuh
│ │ │ └── transform_input_iterator.cuh
│ │ ├── thread/
│ │ │ ├── thread_load.cuh
│ │ │ ├── thread_operators.cuh
│ │ │ ├── thread_reduce.cuh
│ │ │ ├── thread_scan.cuh
│ │ │ └── thread_store.cuh
│ │ ├── util_allocator.cuh
│ │ ├── util_arch.cuh
│ │ ├── util_debug.cuh
│ │ ├── util_device.cuh
│ │ ├── util_macro.cuh
│ │ ├── util_namespace.cuh
│ │ ├── util_ptx.cuh
│ │ ├── util_type.cuh
│ │ └── warp/
│ │ ├── specializations/
│ │ │ ├── warp_reduce_shfl.cuh
│ │ │ ├── warp_reduce_smem.cuh
│ │ │ ├── warp_scan_shfl.cuh
│ │ │ └── warp_scan_smem.cuh
│ │ ├── warp_reduce.cuh
│ │ └── warp_scan.cuh
│ ├── egl_setup/
│ │ ├── egl_setup.cpp
│ │ └── egl_setup.h
│ ├── glad/
│ │ ├── include/
│ │ │ ├── KHR/
│ │ │ │ └── khrplatform.h
│ │ │ └── glad/
│ │ │ └── glad.h
│ │ └── src/
│ │ └── glad.c
│ ├── nvapi/
│ │ ├── include/
│ │ │ ├── NvApiDriverSettings.c
│ │ │ ├── NvApiDriverSettings.h
│ │ │ ├── nvHLSLExtns.h
│ │ │ ├── nvHLSLExtnsInternal.h
│ │ │ ├── nvShaderExtnEnums.h
│ │ │ ├── nvapi.h
│ │ │ ├── nvapi_lite_common.h
│ │ │ ├── nvapi_lite_d3dext.h
│ │ │ ├── nvapi_lite_salend.h
│ │ │ ├── nvapi_lite_salstart.h
│ │ │ ├── nvapi_lite_sli.h
│ │ │ ├── nvapi_lite_stereo.h
│ │ │ └── nvapi_lite_surround.h
│ │ └── lib/
│ │ ├── nvapi.lib
│ │ └── nvapi64.lib
│ ├── regal_shared/
│ │ ├── Android.mk
│ │ └── include/
│ │ └── GL/
│ │ └── Regal.h
│ ├── regal_static/
│ │ ├── Android.mk
│ │ ├── include/
│ │ │ └── GL/
│ │ │ └── Regal.h
│ │ └── lib/
│ │ └── armeabi-v7a/
│ │ ├── Regal_static.a
│ │ └── libRegal_static.a
│ └── stb_image/
│ └── stb_image.h
├── include/
│ ├── NvFlex.h
│ ├── NvFlexDevice.h
│ └── NvFlexExt.h
├── lib/
│ ├── android/
│ │ ├── libNvFlexDebugCUDA_aarch64.a
│ │ ├── libNvFlexDeviceDebug_aarch64.a
│ │ ├── libNvFlexDeviceRelease_aarch64.a
│ │ ├── libNvFlexExtDebugCUDA_aarch64.a
│ │ ├── libNvFlexExtReleaseCUDA_aarch64.a
│ │ └── libNvFlexReleaseCUDA_aarch64.a
│ ├── linux64/
│ │ ├── NvFlexDebugCUDA_x64.a
│ │ ├── NvFlexDeviceDebug_x64.a
│ │ ├── NvFlexDeviceRelease_x64.a
│ │ ├── NvFlexExtDebugCUDA_x64.a
│ │ ├── NvFlexExtReleaseCUDA_x64.a
│ │ └── NvFlexReleaseCUDA_x64.a
│ ├── win32/
│ │ ├── NvFlexDebugCUDA_x86.lib
│ │ ├── NvFlexDebugD3D_x86.lib
│ │ ├── NvFlexDeviceDebug_x86.lib
│ │ ├── NvFlexDeviceRelease_x86.lib
│ │ ├── NvFlexExtDebugCUDA_x86.lib
│ │ ├── NvFlexExtDebugD3D_x86.lib
│ │ ├── NvFlexExtReleaseCUDA_x86.lib
│ │ ├── NvFlexExtReleaseD3D_x86.lib
│ │ ├── NvFlexReleaseCUDA_x86.lib
│ │ └── NvFlexReleaseD3D_x86.lib
│ └── win64/
│ ├── NvFlexDebugCUDA_x64.lib
│ ├── NvFlexDebugD3D_x64.lib
│ ├── NvFlexDeviceDebug_x64.lib
│ ├── NvFlexDeviceRelease_x64.lib
│ ├── NvFlexExtDebugCUDA_x64.lib
│ ├── NvFlexExtDebugD3D_x64.lib
│ ├── NvFlexExtReleaseCUDA_x64.lib
│ ├── NvFlexExtReleaseD3D_x64.lib
│ ├── NvFlexReleaseCUDA_x64.lib
│ └── NvFlexReleaseD3D_x64.lib
├── release_notes.txt
├── run_cuda.bat
├── run_dx.bat
└── src/
└── dx/
└── context/
├── Context.h
├── Device.h
├── Format.h
├── NvFlexTypes.h
├── README.md
└── Vector.h
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# we do not store binary outputs in Flex
# windows
*.exp
*.ilk
# android
*.apk
================================================
FILE: LICENSE.txt
================================================
Nvidia Source Code License (1-Way Commercial)
1. Definitions
“Licensor” means any person or entity that distributes its Work. “Software”
means the original work of authorship made available under this License. “Work”
means the Software and any additions to or derivative works of the Software that
are made available under this License. The terms “reproduce,” “reproduction,”
“derivative works,” and “distribution” have the meaning as provided under U.S.
copyright law; provided, however, that for the purposes of this License,
derivative works shall not include works that remain separable from, or merely
link (or bind by name) to the interfaces of, the Work. Works, including the
Software, are “made available” under this License by including in or with the
Work either (a) a copyright notice referencing the applicability of this License
to the Work, or (b) a copy of this License.
2. License Grants
2.1 Copyright Grant. Subject to the terms and conditions of this License, each
Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free,
copyright license to reproduce, prepare derivative works of, publicly display,
publicly perform, sublicense and distribute its Work and any resulting
derivative works in any form.
3. Limitations
3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do
so under this License, (b) you include a complete copy of this License with your
distribution, and (c) you retain without modification any copyright, patent,
trademark, or attribution notices that are present in the Work.
3.2 Derivative Works. You may specify that additional or different terms apply
to the use, reproduction, and distribution of your derivative works of the Work
(“Your Terms”) only if you identify the specific derivative works that are
subject to Your Terms. Notwithstanding Your Terms, this License (including the
redistribution requirements in Section 3.1) will continue to apply to the Work
itself.
3.3 Patent Claims. If you bring or threaten to bring a patent claim against any
Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to
enforce any patents that you allege are infringed by any Work, then your rights
under this License from such Licensor (including the grant in Sections 2.1)
will terminate immediately.
3.4 Trademarks. This License does not grant any rights to use any Licensor’s or
its affiliates’ names, logos, or trademarks, except as necessary to reproduce
the notices described in this License.
3.5 Termination. If you violate any term of this License, then your rights under
this License (including the grant in Section 2.1) will terminate
immediately.
4. Disclaimer of Warranty.
THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT.
YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE.
5. Limitation of Liability.
EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY,
WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY
LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE,
THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF
GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR
MALFUNCTION, OR ANY OTHER COMMERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR
HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
================================================
FILE: README.md
================================================
NVIDIA Flex - 1.2.0
===================
Flex is a particle-based simulation library designed for real-time applications.
Please see the programmer's manual included in this release package for more information on
the solver API and usage.
Supported Platforms
-------------------
* Windows 32/64 bit (CUDA, DX11, DX12)
* Linux 64 bit (CUDA, tested with Ubuntu 16.04 LTS and Mint 17.2 Rafaela)
Requirements
------------
A D3D11 capable graphics card with the following driver versions:
* NVIDIA GeForce Game Ready Driver 396.45 or above
* AMD Radeon Software Version 16.9.1 or above
* Intel® Graphics Version 15.33.43.4425 or above
To build the demo at least one of the following is required:
* Microsoft Visual Studio 2013
* Microsoft Visual Studio 2015
* g++ 4.6.3 or higher
And either:
* CUDA 9.2.148 toolkit
* DirectX 11/12 SDK
Demo
====
Use the `run_cuda.bat` or `run_d3d.bat` files to launch the demo.
Notes
-----
* Some scenes also have fluid emitters that can be started using 'space'
* For running the Linux binaries you will need to export the path to where the CUDA run time libraries are
For example, you may add to your .bashrc file the following:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/lib64
Command Line Options
--------------------
The following commands may be passed to the demo application to modify behavior:
-fullscreen=wxh Start fullscreen e.g.: -fullscreen=1280x720
-msaa=0 Disable multisampling (default is on)
-device=n Choose GPU to run on
-d3d12 Enable D3D12 compute
-benchmark Enable bencmark mode, will write a benchmark.txt to the root folder
-vsync=0 Disable vsync
Controls
--------
w,s,a,d - Fly Camera
right mouse - Mouse look
shift + left mouse - Particle select and drag
p - Pause/Unpause
o - Step
h - Hide/Show onscreen help
left/right arrow keys - Move to prev/next scene
up/down arrow keys - Select next scene
enter - Launch selected scene
r - Reset current scene
e - Draw fluid surface
v - Draw points
f - Draw springs
i - Draw diffuse
m - Draw meshes
space - Toggle fluid emitter
y - Toggle wave pool
c - Toggle video capture
u - Toggle fullscreen
j - Wind gust
- - Remove a plane
esc - Quit
Known Issues
============
* Crash with inflatable scenes on Intel HD Graphics 530
* MSAA is broken on D3D12 and currently disabled
Acknowledgements
================
* SDL is licensed under the zlib license
* GLEW is licensed under the Modified BSD license
* Regal is licensed under the BSD license
* stb_truetype by Sean Barrett is public domain
* imgui by Mikko Mononen is licensed under the ZLib license
================================================
FILE: bin/linux64/NvFlexDemoDebugCUDA_x64
================================================
[File too large to display: 13.0 MB]
================================================
FILE: bin/win32/NvFlexDemoDebugCUDA_x86.exe.pdb
================================================
[File too large to display: 11.5 MB]
================================================
FILE: bin/win32/NvFlexDemoDebugD3D_x86.exe.pdb
================================================
[File too large to display: 10.6 MB]
================================================
FILE: bin/win32/NvFlexDemoReleaseCUDA_x86.exe.pdb
================================================
[File too large to display: 12.9 MB]
================================================
FILE: bin/win32/NvFlexDemoReleaseD3D_x86.exe.pdb
================================================
[File too large to display: 12.0 MB]
================================================
FILE: bin/win64/NvFlexDemoDebugCUDA_x64.exe.pdb
================================================
[File too large to display: 11.9 MB]
================================================
FILE: bin/win64/NvFlexDemoDebugD3D_x64.exe.pdb
================================================
[File too large to display: 11.0 MB]
================================================
FILE: bin/win64/NvFlexDemoReleaseCUDA_x64.exe.pdb
================================================
[File too large to display: 12.9 MB]
================================================
FILE: bin/win64/NvFlexDemoReleaseD3D_x64.exe.pdb
================================================
[File too large to display: 12.0 MB]
================================================
FILE: core/aabbtree.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "aabbtree.h"
#include "maths.h"
#include "platform.h"
#include <algorithm>
#include <iostream>
using namespace std;
#if _WIN32
_declspec (thread) uint32_t AABBTree::s_traceDepth;
#endif
AABBTree::AABBTree(const Vec3* vertices, uint32_t numVerts, const uint32_t* indices, uint32_t numFaces)
: m_vertices(vertices)
, m_numVerts(numVerts)
, m_indices(indices)
, m_numFaces(numFaces)
{
// build stats
m_treeDepth = 0;
m_innerNodes = 0;
m_leafNodes = 0;
Build();
}
namespace
{
struct FaceSorter
{
FaceSorter(const Vec3* positions, const uint32_t* indices, uint32_t n, uint32_t axis)
: m_vertices(positions)
, m_indices(indices)
, m_numIndices(n)
, m_axis(axis)
{
}
inline bool operator()(uint32_t lhs, uint32_t rhs) const
{
float a = GetCentroid(lhs);
float b = GetCentroid(rhs);
if (a == b)
return lhs < rhs;
else
return a < b;
}
inline float GetCentroid(uint32_t face) const
{
const Vec3& a = m_vertices[m_indices[face*3+0]];
const Vec3& b = m_vertices[m_indices[face*3+1]];
const Vec3& c = m_vertices[m_indices[face*3+2]];
return (a[m_axis] + b[m_axis] + c[m_axis])/3.0f;
}
const Vec3* m_vertices;
const uint32_t* m_indices;
uint32_t m_numIndices;
uint32_t m_axis;
};
inline uint32_t LongestAxis(const Vector3& v)
{
if (v.x > v.y && v.x > v.z)
return 0;
else
return (v.y > v.z) ? 1 : 2;
}
} // anonymous namespace
void AABBTree::CalculateFaceBounds(uint32_t* faces, uint32_t numFaces, Vector3& outMinExtents, Vector3& outMaxExtents)
{
Vector3 minExtents(FLT_MAX);
Vector3 maxExtents(-FLT_MAX);
// calculate face bounds
for (uint32_t i=0; i < numFaces; ++i)
{
Vector3 a = Vector3(m_vertices[m_indices[faces[i]*3+0]]);
Vector3 b = Vector3(m_vertices[m_indices[faces[i]*3+1]]);
Vector3 c = Vector3(m_vertices[m_indices[faces[i]*3+2]]);
minExtents = Min(a, minExtents);
maxExtents = Max(a, maxExtents);
minExtents = Min(b, minExtents);
maxExtents = Max(b, maxExtents);
minExtents = Min(c, minExtents);
maxExtents = Max(c, maxExtents);
}
outMinExtents = minExtents;
outMaxExtents = maxExtents;
}
// track current tree depth
static uint32_t s_depth = 0;
void AABBTree::Build()
{
assert(m_numFaces*3);
//const double startTime = GetSeconds();
const uint32_t numFaces = m_numFaces;
// build initial list of faces
m_faces.reserve(numFaces);
/*
for (uint32_t i=0; i < numFaces; ++i)
{
m_faces[i] = i;
}
*/
// calculate bounds of each face and store
m_faceBounds.reserve(numFaces);
std::vector<Bounds> stack;
for (uint32_t i=0; i < numFaces; ++i)
{
Bounds top;
CalculateFaceBounds(&i, 1, top.m_min, top.m_max);
m_faces.push_back(i);
m_faceBounds.push_back(top);
/*
stack.push_back(top);
while (!stack.empty())
{
Bounds b = stack.back();
stack.pop_back();
const float kAreaThreshold = 200.0f;
if (b.GetSurfaceArea() < kAreaThreshold)
{
// node is good, append to our face list
m_faces.push_back(i);
m_faceBounds.push_back(b);
}
else
{
// split along longest axis
uint32_t a = LongestAxis(b.m_max-b.m_min);
float splitPos = (b.m_min[a] + b.m_max[a])*0.5f;
Bounds left(b);
left.m_max[a] = splitPos;
assert(left.GetSurfaceArea() < b.GetSurfaceArea());
Bounds right(b);
right.m_min[a] = splitPos;
assert(right.GetSurfaceArea() < b.GetSurfaceArea());
stack.push_back(left);
stack.push_back(right);
}
}
*/
}
m_nodes.reserve(uint32_t(numFaces*1.5f));
// allocate space for all the nodes
m_freeNode = 1;
// start building
BuildRecursive(0, &m_faces[0], numFaces);
assert(s_depth == 0);
/*
const double buildTime = (GetSeconds()-startTime);
cout << "AAABTree Build Stats:" << endl;
cout << "Node size: " << sizeof(Node) << endl;
cout << "Build time: " << buildTime << "s" << endl;
cout << "Inner nodes: " << m_innerNodes << endl;
cout << "Leaf nodes: " << m_leafNodes << endl;
cout << "Alloc nodes: " << m_nodes.size() << endl;
cout << "Avg. tris/leaf: " << m_faces.size() / float(m_leafNodes) << endl;
cout << "Max depth: " << m_treeDepth << endl;
*/
// free some memory
FaceBoundsArray f;
m_faceBounds.swap(f);
}
// partion faces around the median face
uint32_t AABBTree::PartitionMedian(Node& n, uint32_t* faces, uint32_t numFaces)
{
FaceSorter predicate(&m_vertices[0], &m_indices[0], m_numFaces*3, LongestAxis(n.m_maxExtents-n.m_minExtents));
std::nth_element(faces, faces+numFaces/2, faces+numFaces, predicate);
return numFaces/2;
}
// partion faces based on the surface area heuristic
uint32_t AABBTree::PartitionSAH(Node& n, uint32_t* faces, uint32_t numFaces)
{
/*
Vector3 mean(0.0f);
Vector3 variance(0.0f);
// calculate best axis based on variance
for (uint32_t i=0; i < numFaces; ++i)
{
mean += 0.5f*(m_faceBounds[faces[i]].m_min + m_faceBounds[faces[i]].m_max);
}
mean /= float(numFaces);
for (uint32_t i=0; i < numFaces; ++i)
{
Vector3 v = 0.5f*(m_faceBounds[faces[i]].m_min + m_faceBounds[faces[i]].m_max) - mean;
v *= v;
variance += v;
}
uint32_t bestAxis = LongestAxis(variance);
*/
uint32_t bestAxis = 0;
uint32_t bestIndex = 0;
float bestCost = FLT_MAX;
for (uint32_t a=0; a < 3; ++a)
//uint32_t a = bestAxis;
{
// sort faces by centroids
FaceSorter predicate(&m_vertices[0], &m_indices[0], m_numFaces*3, a);
std::sort(faces, faces+numFaces, predicate);
// two passes over data to calculate upper and lower bounds
vector<float> cumulativeLower(numFaces);
vector<float> cumulativeUpper(numFaces);
Bounds lower;
Bounds upper;
for (uint32_t i=0; i < numFaces; ++i)
{
lower.Union(m_faceBounds[faces[i]]);
upper.Union(m_faceBounds[faces[numFaces-i-1]]);
cumulativeLower[i] = lower.GetSurfaceArea();
cumulativeUpper[numFaces-i-1] = upper.GetSurfaceArea();
}
float invTotalSA = 1.0f / cumulativeUpper[0];
// test all split positions
for (uint32_t i=0; i < numFaces-1; ++i)
{
float pBelow = cumulativeLower[i] * invTotalSA;
float pAbove = cumulativeUpper[i] * invTotalSA;
float cost = 0.125f + (pBelow*i + pAbove*(numFaces-i));
if (cost <= bestCost)
{
bestCost = cost;
bestIndex = i;
bestAxis = a;
}
}
}
// re-sort by best axis
FaceSorter predicate(&m_vertices[0], &m_indices[0], m_numFaces*3, bestAxis);
std::sort(faces, faces+numFaces, predicate);
return bestIndex+1;
}
void AABBTree::BuildRecursive(uint32_t nodeIndex, uint32_t* faces, uint32_t numFaces)
{
const uint32_t kMaxFacesPerLeaf = 6;
// if we've run out of nodes allocate some more
if (nodeIndex >= m_nodes.size())
{
uint32_t s = std::max(uint32_t(1.5f*m_nodes.size()), 512U);
//cout << "Resizing tree, current size: " << m_nodes.size()*sizeof(Node) << " new size: " << s*sizeof(Node) << endl;
m_nodes.resize(s);
}
// a reference to the current node, need to be careful here as this reference may become invalid if array is resized
Node& n = m_nodes[nodeIndex];
// track max tree depth
++s_depth;
m_treeDepth = max(m_treeDepth, s_depth);
CalculateFaceBounds(faces, numFaces, n.m_minExtents, n.m_maxExtents);
// calculate bounds of faces and add node
if (numFaces <= kMaxFacesPerLeaf)
{
n.m_faces = faces;
n.m_numFaces = numFaces;
++m_leafNodes;
}
else
{
++m_innerNodes;
// face counts for each branch
//const uint32_t leftCount = PartitionMedian(n, faces, numFaces);
const uint32_t leftCount = PartitionSAH(n, faces, numFaces);
const uint32_t rightCount = numFaces-leftCount;
// alloc 2 nodes
m_nodes[nodeIndex].m_children = m_freeNode;
// allocate two nodes
m_freeNode += 2;
// split faces in half and build each side recursively
BuildRecursive(m_nodes[nodeIndex].m_children+0, faces, leftCount);
BuildRecursive(m_nodes[nodeIndex].m_children+1, faces+leftCount, rightCount);
}
--s_depth;
}
struct StackEntry
{
uint32_t m_node;
float m_dist;
};
#define TRACE_STATS 0
/*
bool AABBTree::TraceRay(const Vec3& start, const Vector3& dir, float& outT, float& outU, float& outV, float& outW, float& outSign, uint32_t& outIndex) const
{
#if _WIN32
// reset stats
s_traceDepth = 0;
#endif
const Vector3 rcp_dir(1.0f/dir.x, 1.0f/dir.y, 1.0f/dir.z);
// some temp variables
Vector3 normal;
float t, u, v, w, s;
float minT, minU, minV, minW, minSign;
minU = minV = minW = minSign = minT = FLT_MAX;
uint32_t minIndex = 0;
Vector3 minNormal;
const uint32_t kStackDepth = 50;
StackEntry stack[kStackDepth];
stack[0].m_node = 0;
stack[0].m_dist = 0.0f;
uint32_t stackCount = 1;
while (stackCount)
{
// pop node from back
StackEntry& e = stack[--stackCount];
// ignore if another node has already come closer
if (e.m_dist >= minT)
{
continue;
}
const Node* node = &m_nodes[e.m_node];
filth:
if (node->m_faces == NULL)
{
#if TRACE_STATS
extern uint32_t g_nodesChecked;
++g_nodesChecked;
#endif
#if _WIN32
++s_traceDepth;
#endif
// find closest node
const Node& leftChild = m_nodes[node->m_children+0];
const Node& rightChild = m_nodes[node->m_children+1];
float dist[2] = {FLT_MAX, FLT_MAX};
IntersectRayAABBOmpf(start, rcp_dir, leftChild.m_minExtents, leftChild.m_maxExtents, dist[0]);
IntersectRayAABBOmpf(start, rcp_dir, rightChild.m_minExtents, rightChild.m_maxExtents, dist[1]);
const uint32_t closest = dist[1] < dist[0]; // 0 or 1
const uint32_t furthest = closest ^ 1;
if (dist[furthest] < minT)
{
StackEntry& e = stack[stackCount++];
e.m_node = node->m_children+furthest;
e.m_dist = dist[furthest];
}
// lifo
if (dist[closest] < minT)
{
node = &m_nodes[node->m_children+closest];
goto filth;
}
}
else
{
for (uint32_t i=0; i < node->m_numFaces; ++i)
{
const uint32_t faceIndex = node->m_faces[i];
const uint32_t indexStart = faceIndex*3;
const Vec3& a = m_vertices[m_indices[indexStart+0]];
const Vec3& b = m_vertices[m_indices[indexStart+1]];
const Vec3& c = m_vertices[m_indices[indexStart+2]];
#if TRACE_STATS
extern uint32_t g_trisChecked;
++g_trisChecked;
#endif
if (IntersectRayTriTwoSided(start, dir, a, b, c, t, u, v, w, s))
{
if (t < minT && t > 0.01f)
{
minT = t;
minU = u;
minV = v;
minW = w;
minSign = s;
minIndex = faceIndex;
}
}
}
}
}
// copy to outputs
outT = minT;
outU = minU;
outV = minV;
outW = minW;
outSign = minSign;
outIndex = minIndex;
return (outT != FLT_MAX);
}
*/
bool AABBTree::TraceRay(const Vec3& start, const Vector3& dir, float& outT, float& u, float& v, float& w, float& faceSign, uint32_t& faceIndex) const
{
//s_traceDepth = 0;
Vector3 rcp_dir(1.0f/dir.x, 1.0f/dir.y, 1.0f/dir.z);
outT = FLT_MAX;
TraceRecursive(0, start, dir, outT, u, v, w, faceSign, faceIndex);
return (outT != FLT_MAX);
}
void AABBTree::TraceRecursive(uint32_t nodeIndex, const Vec3& start, const Vector3& dir, float& outT, float& outU, float& outV, float& outW, float& faceSign, uint32_t& faceIndex) const
{
const Node& node = m_nodes[nodeIndex];
if (node.m_faces == NULL)
{
#if _WIN32
++s_traceDepth;
#endif
#if TRACE_STATS
extern uint32_t g_nodesChecked;
++g_nodesChecked;
#endif
// find closest node
const Node& leftChild = m_nodes[node.m_children+0];
const Node& rightChild = m_nodes[node.m_children+1];
float dist[2] = {FLT_MAX, FLT_MAX};
IntersectRayAABB(start, dir, leftChild.m_minExtents, leftChild.m_maxExtents, dist[0], NULL);
IntersectRayAABB(start, dir, rightChild.m_minExtents, rightChild.m_maxExtents, dist[1], NULL);
uint32_t closest = 0;
uint32_t furthest = 1;
if (dist[1] < dist[0])
{
closest = 1;
furthest = 0;
}
if (dist[closest] < outT)
TraceRecursive(node.m_children+closest, start, dir, outT, outU, outV, outW, faceSign, faceIndex);
if (dist[furthest] < outT)
TraceRecursive(node.m_children+furthest, start, dir, outT, outU, outV, outW, faceSign, faceIndex);
}
else
{
Vector3 normal;
float t, u, v, w, s;
for (uint32_t i=0; i < node.m_numFaces; ++i)
{
uint32_t indexStart = node.m_faces[i]*3;
const Vec3& a = m_vertices[m_indices[indexStart+0]];
const Vec3& b = m_vertices[m_indices[indexStart+1]];
const Vec3& c = m_vertices[m_indices[indexStart+2]];
#if TRACE_STATS
extern uint32_t g_trisChecked;
++g_trisChecked;
#endif
if (IntersectRayTriTwoSided(start, dir, a, b, c, t, u, v, w, s))
{
if (t < outT)
{
outT = t;
outU = u;
outV = v;
outW = w;
faceSign = s;
faceIndex = node.m_faces[i];
}
}
}
}
}
/*
bool AABBTree::TraceRay(const Vec3& start, const Vector3& dir, float& outT, Vector3* outNormal) const
{
outT = FLT_MAX;
TraceRecursive(0, start, dir, outT, outNormal);
return (outT != FLT_MAX);
}
void AABBTree::TraceRecursive(uint32_t n, const Vec3& start, const Vector3& dir, float& outT, Vector3* outNormal) const
{
const Node& node = m_nodes[n];
if (node.m_numFaces == 0)
{
extern _declspec(thread) uint32_t g_traceDepth;
++g_traceDepth;
#if _DEBUG
extern uint32_t g_nodesChecked;
++g_nodesChecked;
#endif
float t;
if (IntersectRayAABB(start, dir, node.m_minExtents, node.m_maxExtents, t, NULL))
{
if (t <= outT)
{
TraceRecursive(n*2+1, start, dir, outT, outNormal);
TraceRecursive(n*2+2, start, dir, outT, outNormal);
}
}
}
else
{
Vector3 normal;
float t, u, v, w;
for (uint32_t i=0; i < node.m_numFaces; ++i)
{
uint32_t indexStart = node.m_faces[i]*3;
const Vec3& a = m_vertices[m_indices[indexStart+0]];
const Vec3& b = m_vertices[m_indices[indexStart+1]];
const Vec3& c = m_vertices[m_indices[indexStart+2]];
#if _DEBUG
extern uint32_t g_trisChecked;
++g_trisChecked;
#endif
if (IntersectRayTri(start, dir, a, b, c, t, u, v, w, &normal))
{
if (t < outT)
{
outT = t;
if (outNormal)
*outNormal = normal;
}
}
}
}
}
*/
bool AABBTree::TraceRaySlow(const Vec3& start, const Vector3& dir, float& outT, float& outU, float& outV, float& outW, float& faceSign, uint32_t& faceIndex) const
{
const uint32_t numFaces = GetNumFaces();
float minT, minU, minV, minW, minS;
minT = minU = minV = minW = minS = FLT_MAX;
Vector3 minNormal(0.0f, 1.0f, 0.0f);
Vector3 n(0.0f, 1.0f, 0.0f);
float t, u, v, w, s;
bool hit = false;
uint32_t minIndex = 0;
for (uint32_t i=0; i < numFaces; ++i)
{
const Vec3& a = m_vertices[m_indices[i*3+0]];
const Vec3& b = m_vertices[m_indices[i*3+1]];
const Vec3& c = m_vertices[m_indices[i*3+2]];
if (IntersectRayTriTwoSided(start, dir, a, b, c, t, u, v, w, s))
{
if (t < minT)
{
minT = t;
minU = u;
minV = v;
minW = w;
minS = s;
minNormal = n;
minIndex = i;
hit = true;
}
}
}
outT = minT;
outU = minU;
outV = minV;
outW = minW;
faceSign = minS;
faceIndex = minIndex;
return hit;
}
void AABBTree::DebugDraw()
{
/*
glPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
DebugDrawRecursive(0, 0);
glPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
*/
}
void AABBTree::DebugDrawRecursive(uint32_t nodeIndex, uint32_t depth)
{
static uint32_t kMaxDepth = 3;
if (depth > kMaxDepth)
return;
/*
Node& n = m_nodes[nodeIndex];
Vector3 minExtents = FLT_MAX;
Vector3 maxExtents = -FLT_MAX;
// calculate face bounds
for (uint32_t i=0; i < m_vertices.size(); ++i)
{
Vector3 a = m_vertices[i];
minExtents = Min(a, minExtents);
maxExtents = Max(a, maxExtents);
}
glBegin(GL_QUADS);
glVertex3f(minExtents.x, maxExtents.y, 0.0f);
glVertex3f(maxExtents.x, maxExtents.y, 0.0f);
glVertex3f(maxExtents.x, minExtents.y, 0.0f);
glVertex3f(minExtents.x, minExtents.y, 0.0f);
glEnd();
n.m_center = Vec3(minExtents+maxExtents)/2;
n.m_extents = (maxExtents-minExtents)/2;
*/
/*
if (n.m_minEtextents != Vector3(0.0f))
{
Vec3 corners[8];
corners[0] = n.m_center + Vector3(-n.m_extents.x, n.m_extents.y, n.m_extents.z);
corners[1] = n.m_center + Vector3(n.m_extents.x, n.m_extents.y, n.m_extents.z);
corners[2] = n.m_center + Vector3(n.m_extents.x, -n.m_extents.y, n.m_extents.z);
corners[3] = n.m_center + Vector3(-n.m_extents.x, -n.m_extents.y, n.m_extents.z);
corners[4] = n.m_center + Vector3(-n.m_extents.x, n.m_extents.y, -n.m_extents.z);
corners[5] = n.m_center + Vector3(n.m_extents.x, n.m_extents.y, -n.m_extents.z);
corners[6] = n.m_center + Vector3(n.m_extents.x, -n.m_extents.y, -n.m_extents.z);
corners[7] = n.m_center + Vector3(-n.m_extents.x, -n.m_extents.y, -n.m_extents.z);
glBegin(GL_QUADS);
glColor3f(0.0f, 1.0f, 0.0f);
glVertex3fv(corners[0]);
glVertex3fv(corners[1]);
glVertex3fv(corners[2]);
glVertex3fv(corners[3]);
glVertex3fv(corners[1]);
glVertex3fv(corners[5]);
glVertex3fv(corners[6]);
glVertex3fv(corners[2]);
glVertex3fv(corners[0]);
glVertex3fv(corners[4]);
glVertex3fv(corners[5]);
glVertex3fv(corners[1]);
glVertex3fv(corners[4]);
glVertex3fv(corners[5]);
glVertex3fv(corners[6]);
glVertex3fv(corners[7]);
glVertex3fv(corners[0]);
glVertex3fv(corners[4]);
glVertex3fv(corners[7]);
glVertex3fv(corners[3]);
glVertex3fv(corners[3]);
glVertex3fv(corners[7]);
glVertex3fv(corners[6]);
glVertex3fv(corners[2]);
glEnd();
DebugDrawRecursive(nodeIndex*2+1, depth+1);
DebugDrawRecursive(nodeIndex*2+2, depth+1);
}
*/
}
================================================
FILE: core/aabbtree.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include "core.h"
#include "maths.h"
#include <vector>
class AABBTree
{
AABBTree(const AABBTree&);
AABBTree& operator=(const AABBTree&);
public:
AABBTree(const Vec3* vertices, uint32_t numVerts, const uint32_t* indices, uint32_t numFaces);
bool TraceRaySlow(const Vec3& start, const Vector3& dir, float& outT, float& u, float& v, float& w, float& faceSign, uint32_t& faceIndex) const;
bool TraceRay(const Vec3& start, const Vector3& dir, float& outT, float& u, float& v, float& w, float& faceSign, uint32_t& faceIndex) const;
void DebugDraw();
Vector3 GetCenter() const { return (m_nodes[0].m_minExtents+m_nodes[0].m_maxExtents)*0.5f; }
Vector3 GetMinExtents() const { return m_nodes[0].m_minExtents; }
Vector3 GetMaxExtents() const { return m_nodes[0].m_maxExtents; }
#if _WIN32
// stats (reset each trace)
static uint32_t GetTraceDepth() { return s_traceDepth; }
#endif
private:
void DebugDrawRecursive(uint32_t nodeIndex, uint32_t depth);
struct Node
{
Node()
: m_numFaces(0)
, m_faces(NULL)
, m_minExtents(0.0f)
, m_maxExtents(0.0f)
{
}
union
{
uint32_t m_children;
uint32_t m_numFaces;
};
uint32_t* m_faces;
Vector3 m_minExtents;
Vector3 m_maxExtents;
};
struct Bounds
{
Bounds() : m_min(0.0f), m_max(0.0f)
{
}
Bounds(const Vector3& min, const Vector3& max) : m_min(min), m_max(max)
{
}
inline float GetVolume() const
{
Vector3 e = m_max-m_min;
return (e.x*e.y*e.z);
}
inline float GetSurfaceArea() const
{
Vector3 e = m_max-m_min;
return 2.0f*(e.x*e.y + e.x*e.z + e.y*e.z);
}
inline void Union(const Bounds& b)
{
m_min = Min(m_min, b.m_min);
m_max = Max(m_max, b.m_max);
}
Vector3 m_min;
Vector3 m_max;
};
typedef std::vector<uint32_t> IndexArray;
typedef std::vector<Vec3> PositionArray;
typedef std::vector<Node> NodeArray;
typedef std::vector<uint32_t> FaceArray;
typedef std::vector<Bounds> FaceBoundsArray;
// partition the objects and return the number of objects in the lower partition
uint32_t PartitionMedian(Node& n, uint32_t* faces, uint32_t numFaces);
uint32_t PartitionSAH(Node& n, uint32_t* faces, uint32_t numFaces);
void Build();
void BuildRecursive(uint32_t nodeIndex, uint32_t* faces, uint32_t numFaces);
void TraceRecursive(uint32_t nodeIndex, const Vec3& start, const Vector3& dir, float& outT, float& u, float& v, float& w, float& faceSign, uint32_t& faceIndex) const;
void CalculateFaceBounds(uint32_t* faces, uint32_t numFaces, Vector3& outMinExtents, Vector3& outMaxExtents);
uint32_t GetNumFaces() const { return m_numFaces; }
uint32_t GetNumNodes() const { return uint32_t(m_nodes.size()); }
// track the next free node
uint32_t m_freeNode;
const Vec3* m_vertices;
const uint32_t m_numVerts;
const uint32_t* m_indices;
const uint32_t m_numFaces;
FaceArray m_faces;
NodeArray m_nodes;
FaceBoundsArray m_faceBounds;
// stats
uint32_t m_treeDepth;
uint32_t m_innerNodes;
uint32_t m_leafNodes;
#if _WIN32
_declspec (thread) static uint32_t s_traceDepth;
#endif
};
================================================
FILE: core/cloth.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include <set>
#include <vector>
#include <map>
#include <algorithm>
#include <functional>
#include <numeric>
#include "maths.h"
class ClothMesh
{
public:
struct Edge
{
int vertices[2];
int tris[2];
int stretchConstraint;
int bendingConstraint;
Edge(int a, int b)
{
assert(a != b);
vertices[0] = Min(a, b);
vertices[1] = Max(a, b);
tris[0] = -1;
tris[1] = -1;
stretchConstraint = -1;
bendingConstraint = -1;
}
bool IsBoundary() const { return tris[0] == -1 || tris[1] == -1; }
bool Contains(int index) const
{
return (vertices[0] == index) || (vertices[1] == index);
}
void Replace(int oldIndex, int newIndex)
{
if (vertices[0] == oldIndex)
vertices[0] = newIndex;
else if (vertices[1] == oldIndex)
vertices[1] = newIndex;
else
assert(0);
}
void RemoveTri(int index)
{
if (tris[0] == index)
tris[0] = -1;
else if (tris[1] == index)
tris[1] = -1;
else
assert(0);
}
bool AddTri(int index)
{
if (tris[0] == -1)
{
tris[0] = index;
return true;
}
else if (tris[1] == -1)
{
// check tri not referencing same edge
if (index == tris[0])
return false;
else
{
tris[1] = index;
return true;
}
}
else
return false;
}
bool operator < (const Edge& rhs) const
{
if (vertices[0] != rhs.vertices[0])
return vertices[0] < rhs.vertices[0];
else
return vertices[1] < rhs.vertices[1];
}
};
struct Triangle
{
Triangle(int a, int b, int c)
{
assert(a != b && a != c);
assert(b != c);
vertices[0] = a;
vertices[1] = b;
vertices[2] = c;
edges[0] = -1;
edges[1] = -1;
edges[2] = -1;
side = -1;
component = -1;
}
bool Contains(int v) const
{
if (vertices[0] == v ||
vertices[1] == v ||
vertices[2] == v)
return true;
else
return false;
}
void ReplaceEdge(int oldIndex, int newIndex)
{
for (int i=0; i < 3; ++i)
{
if (edges[i] == oldIndex)
{
edges[i] = newIndex;
return;
}
}
assert(0);
}
int ReplaceVertex(int oldIndex, int newIndex)
{
for (int i=0; i < 3; ++i)
{
if (vertices[i] == oldIndex)
{
vertices[i] = newIndex;
return i;
}
}
assert(0);
return -1;
}
int GetOppositeVertex(int v0, int v1) const
{
for (int i=0; i < 3; ++i)
{
if (vertices[i] != v0 && vertices[i] != v1)
return vertices[i];
}
assert(0);
return -1;
}
int vertices[3];
int edges[3];
// used during splitting
int side;
// used during singular vertex removal
mutable int component;
};
ClothMesh(const Vec4* vertices, int numVertices,
const int* indices, int numIndices,
float stretchStiffness,
float bendStiffness, bool tearable=true)
{
mValid = false;
mNumVertices = numVertices;
if (tearable)
{
// tearable cloth uses a simple bending constraint model that allows easy splitting of vertices and remapping of constraints
typedef std::set<Edge> EdgeSet;
EdgeSet edges;
// build unique edge list
for (int i=0; i < numIndices; i += 3)
{
mTris.push_back(Triangle(indices[i+0], indices[i+1], indices[i+2]));
const int triIndex = i/3;
// breaking the rules
Edge& e1 = const_cast<Edge&>(*edges.insert(Edge(indices[i+0], indices[i+1])).first);
Edge& e2 = const_cast<Edge&>(*edges.insert(Edge(indices[i+1], indices[i+2])).first);
Edge& e3 = const_cast<Edge&>(*edges.insert(Edge(indices[i+2], indices[i+0])).first);
if (!e1.AddTri(triIndex))
return;
if (!e2.AddTri(triIndex))
return;
if (!e3.AddTri(triIndex))
return;
}
// flatten set to array
mEdges.assign(edges.begin(), edges.end());
// second pass, set edge indices to faces
for (int i=0; i < numIndices; i += 3)
{
int e1 = int(std::lower_bound(mEdges.begin(), mEdges.end(), Edge(indices[i+0], indices[i+1])) - mEdges.begin());
int e2 = int(std::lower_bound(mEdges.begin(), mEdges.end(), Edge(indices[i+1], indices[i+2])) - mEdges.begin());
int e3 = int(std::lower_bound(mEdges.begin(), mEdges.end(), Edge(indices[i+2], indices[i+0])) - mEdges.begin());
if (e1 != e2 && e1 != e3 && e2 != e3)
{
const int triIndex = i/3;
mTris[triIndex].edges[0] = e1;
mTris[triIndex].edges[1] = e2;
mTris[triIndex].edges[2] = e3;
}
else
{
// degenerate tri
return;
}
}
// generate distance constraints
for (size_t i=0; i < mEdges.size(); ++i)
{
Edge& edge = mEdges[i];
// stretch constraint along mesh edges
edge.stretchConstraint = AddConstraint(vertices, edge.vertices[0], edge.vertices[1], stretchStiffness);
const int t1 = edge.tris[0];
const int t2 = edge.tris[1];
// add bending constraint between connected tris
if (t1 != -1 && t2 != -1 && bendStiffness > 0.0f)
{
int v1 = mTris[t1].GetOppositeVertex(edge.vertices[0], edge.vertices[1]);
int v2 = mTris[t2].GetOppositeVertex(edge.vertices[0], edge.vertices[1]);
edge.bendingConstraint = AddConstraint(vertices, v1, v2, bendStiffness);
}
}
}
// calculate rest volume
mRestVolume = 0.0f;
mConstraintScale = 0.0f;
std::vector<Vec3> gradients(numVertices);
for (int i=0; i < numIndices; i+=3)
{
Vec3 v1 = Vec3(vertices[indices[i+0]]);
Vec3 v2 = Vec3(vertices[indices[i+1]]);
Vec3 v3 = Vec3(vertices[indices[i+2]]);
const Vec3 n = Cross(v2-v1, v3-v1);
const float signedVolume = Dot(v1, n);
mRestVolume += signedVolume;
gradients[indices[i+0]] += n;
gradients[indices[i+1]] += n;
gradients[indices[i+2]] += n;
}
for (int i=0; i < numVertices; ++i)
mConstraintScale += Dot(gradients[i], gradients[i]);
mConstraintScale = 1.0f/mConstraintScale;
mValid = true;
}
int AddConstraint(const Vec4* vertices, int a, int b, float stiffness, float give=0.0f)
{
int index = int(mConstraintRestLengths.size());
mConstraintIndices.push_back(a);
mConstraintIndices.push_back(b);
const float restLength = Length(Vec3(vertices[a])-Vec3(vertices[b]));
mConstraintRestLengths.push_back(restLength*(1.0f + give));
mConstraintCoefficients.push_back(stiffness);
return index;
}
int IsSingularVertex(int vertex) const
{
std::vector<int> adjacentTriangles;
// gather adjacent triangles
for (int i=0; i < int(mTris.size()); ++i)
{
if (mTris[i].Contains(vertex))
adjacentTriangles.push_back(i);
}
// number of identified components
int componentCount = 0;
// while connected tris not colored
for (int i=0; i < int(adjacentTriangles.size()); ++i)
{
// pop off a triangle
int seed = adjacentTriangles[i];
// triangle already belongs to a component
if (mTris[seed].component != -1)
continue;
std::vector<int> stack;
stack.push_back(seed);
while (!stack.empty())
{
int t = stack.back();
stack.pop_back();
const Triangle& tri = mTris[t];
if (tri.component == componentCount)
{
// we're back to the beginning
// component is fully connected
break;
}
tri.component = componentCount;
// update mesh
for (int e=0; e < 3; ++e)
{
const Edge& edge = mEdges[tri.edges[e]];
if (edge.Contains(vertex))
{
if (!edge.IsBoundary())
{
// push unprocessed neighbors on stack
for (int s=0; s < 2; ++s)
{
assert(mTris[edge.tris[s]].component == -1 || mTris[edge.tris[s]].component == componentCount);
if (edge.tris[s] != t && mTris[edge.tris[s]].component == -1)
stack.push_back(edge.tris[s]);
}
}
}
}
}
componentCount++;
}
// reset component indices
for (int i=0; i < int(adjacentTriangles.size()); ++i)
{
assert(mTris[adjacentTriangles[i]].component != -1);
mTris[adjacentTriangles[i]].component = -1;
}
return componentCount;
}
struct TriangleUpdate
{
int triangle;
int vertex;
};
struct VertexCopy
{
int srcIndex;
int destIndex;
};
int SeparateVertex(int singularVertex, std::vector<TriangleUpdate>& replacements, std::vector<VertexCopy>& copies, int maxCopies)
{
std::vector<int> adjacentTriangles;
// gather adjacent triangles
for (int i=0; i < int(mTris.size()); ++i)
{
if (mTris[i].Contains(singularVertex))
adjacentTriangles.push_back(i);
}
// number of identified components
int componentCount = 0;
// first component keeps the existing vertex
int newIndex = singularVertex;
// while connected tris not colored
for (int i=0; i < int(adjacentTriangles.size()); ++i)
{
if (maxCopies == 0)
break;
// pop off a triangle
int seed = adjacentTriangles[i];
// triangle already belongs to a component
if (mTris[seed].component != -1)
continue;
std::vector<int> stack;
stack.push_back(seed);
while (!stack.empty())
{
int t = stack.back();
stack.pop_back();
Triangle& tri = mTris[t];
// test if we're back to the beginning, in which case the component is fully connected
if (tri.component == componentCount)
break;
assert(tri.component == -1);
tri.component = componentCount;
// update triangle
int v = tri.ReplaceVertex(singularVertex, newIndex);
if (singularVertex != newIndex)
{
// output replacement
TriangleUpdate r;
r.triangle = t*3 + v;
r.vertex = newIndex;
replacements.push_back(r);
}
// update mesh
for (int e=0; e < 3; ++e)
{
Edge& edge = mEdges[tri.edges[e]];
if (edge.Contains(singularVertex))
{
// update edge to point to new vertex
edge.Replace(singularVertex, newIndex);
const int stretching = edge.stretchConstraint;
if (mConstraintIndices[stretching*2+0] == singularVertex)
mConstraintIndices[stretching*2+0] = newIndex;
else if (mConstraintIndices[stretching*2+1] == singularVertex)
mConstraintIndices[stretching*2+1] = newIndex;
else
assert(0);
if (!edge.IsBoundary())
{
// push unprocessed neighbors on stack
for (int s=0; s < 2; ++s)
{
assert(mTris[edge.tris[s]].component == -1 || mTris[edge.tris[s]].component == componentCount);
if (edge.tris[s] != t && mTris[edge.tris[s]].component == -1)
stack.push_back(edge.tris[s]);
}
}
}
else
{
const int bending = edge.bendingConstraint;
if (bending != -1)
{
if (mConstraintIndices[bending*2+0] == singularVertex)
mConstraintIndices[bending*2+0] = newIndex;
else if (mConstraintIndices[bending*2+1] == singularVertex)
mConstraintIndices[bending*2+1] = newIndex;
}
}
}
}
// copy vertex
if (singularVertex != newIndex)
{
VertexCopy copy;
copy.srcIndex = singularVertex;
copy.destIndex = newIndex;
copies.push_back(copy);
mNumVertices++;
maxCopies--;
}
// component traversal finished
newIndex = mNumVertices;
componentCount++;
}
// reset component indices
for (int i=0; i < int(adjacentTriangles.size()); ++i)
{
//assert(mTris[adjacentTriangles[i]].component != -1);
mTris[adjacentTriangles[i]].component = -1;
}
return componentCount;
}
int SplitVertex(const Vec4* vertices, int index, Vec3 splitPlane, std::vector<int>& adjacentTris, std::vector<int>& adjacentVertices, std::vector<TriangleUpdate>& replacements, std::vector<VertexCopy>& copies, int maxCopies)
{
if (maxCopies == 0)
return -1;
float w = Dot(vertices[index], splitPlane);
int leftCount = 0;
int rightCount = 0;
const int newIndex = mNumVertices;
// classify all tris attached to the split vertex according
// to which side of the split plane their centroid lies on O(N)
for (size_t i = 0; i < mTris.size(); ++i)
{
Triangle& tri = mTris[i];
if (tri.Contains(index))
{
const Vec4 centroid = (vertices[tri.vertices[0]] + vertices[tri.vertices[1]] + vertices[tri.vertices[2]]) / 3.0f;
if (Dot(Vec3(centroid), splitPlane) < w)
{
tri.side = 1;
++leftCount;
}
else
{
tri.side = 0;
++rightCount;
}
adjacentTris.push_back(int(i));
for (int v=0; v < 3; ++v)
{
if (std::find(adjacentVertices.begin(), adjacentVertices.end(), tri.vertices[v]) == adjacentVertices.end())
{
adjacentVertices.push_back(tri.vertices[v]);
}
}
}
}
// if all tris on one side of split plane then do nothing
if (leftCount == 0 || rightCount == 0)
return -1;
// remap triangle indices
for (size_t i = 0; i < adjacentTris.size(); ++i)
{
const int triIndex = adjacentTris[i];
Triangle& tri = mTris[triIndex];
// tris on the negative side of the split plane are assigned the new index
if (tri.side == 0)
{
int v = tri.ReplaceVertex(index, newIndex);
TriangleUpdate update;
update.triangle = triIndex*3 + v;
update.vertex = newIndex;
replacements.push_back(update);
// update edges and constraints
for (int e = 0; e < 3; ++e)
{
Edge& edge = mEdges[tri.edges[e]];
if (edge.Contains(index))
{
bool exposed = false;
if (edge.tris[0] != -1 && edge.tris[1] != -1)
{
Triangle& t1 = mTris[edge.tris[0]];
Triangle& t2 = mTris[edge.tris[1]];
// Case 1: connected tris lie on opposite sides of the split plane
// creating a new exposed edge, need to break bending constraint
// and create new stretch constraint for exposed edge
if (t1.side != t2.side)
{
// create new edge
Edge newEdge(edge.vertices[0], edge.vertices[1]);
newEdge.Replace(index, newIndex);
newEdge.AddTri(triIndex);
// remove neighbor from old edge
edge.RemoveTri(triIndex);
// replace bending constraint with stretch constraint
assert(edge.bendingConstraint != -1);
newEdge.stretchConstraint = edge.bendingConstraint;
mConstraintIndices[newEdge.stretchConstraint * 2 + 0] = newEdge.vertices[0];
mConstraintIndices[newEdge.stretchConstraint * 2 + 1] = newEdge.vertices[1];
mConstraintCoefficients[newEdge.stretchConstraint] = mConstraintCoefficients[edge.stretchConstraint];
mConstraintRestLengths[newEdge.stretchConstraint] = mConstraintRestLengths[edge.stretchConstraint];
edge.bendingConstraint = -1;
// don't access Edge& after this
tri.ReplaceEdge(tri.edges[e], int(mEdges.size()));
mEdges.push_back(newEdge);
exposed = true;
}
}
if (!exposed)
{
// Case 2: both tris on same side of split plane or boundary edge, simply remap edge and constraint
// may have processed this edge already so check that it still contains old vertex
edge.Replace(index, newIndex);
const int stretching = edge.stretchConstraint;
if (mConstraintIndices[stretching * 2 + 0] == index)
mConstraintIndices[stretching * 2 + 0] = newIndex;
else if (mConstraintIndices[stretching * 2 + 1] == index)
mConstraintIndices[stretching * 2 + 1] = newIndex;
else
assert(0);
}
}
else
{
// Case 3: tri is adjacent to split vertex but this edge is not connected to it
// therefore there can be a bending constraint crossing this edge connected
// to vertex that needs to be remapped
const int bending = edge.bendingConstraint;
if (bending != -1)
{
if (mConstraintIndices[bending * 2 + 0] == index)
mConstraintIndices[bending * 2 + 0] = newIndex;
else if (mConstraintIndices[bending * 2 + 1] == index)
mConstraintIndices[bending * 2 + 1] = newIndex;
}
}
}
}
}
// output vertex copy
VertexCopy copy;
copy.srcIndex = index;
copy.destIndex = newIndex;
copies.push_back(copy);
mNumVertices++;
return newIndex;
}
std::vector<int> mConstraintIndices;
std::vector<float> mConstraintCoefficients;
std::vector<float> mConstraintRestLengths;
std::vector<Edge> mEdges;
std::vector<Triangle> mTris;
int mNumVertices;
float mRestVolume;
float mConstraintScale;
bool mValid;
};
================================================
FILE: core/convex.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include "maths.h"
#include <vector>
// Thanks to Christian Sigg for the convex mesh builder!
struct ConvexMeshBuilder
{
ConvexMeshBuilder(const Vec4* planes)
: mPlanes(planes)
{}
void operator()(uint32_t mask, float scale=1.0f);
const Vec4* mPlanes;
std::vector<Vec3> mVertices;
std::vector<uint16_t> mIndices;
};
namespace
{
float det(Vec4 v0, Vec4 v1, Vec4 v2, Vec4 v3)
{
const Vec3& d0 = reinterpret_cast<const Vec3&>(v0);
const Vec3& d1 = reinterpret_cast<const Vec3&>(v1);
const Vec3& d2 = reinterpret_cast<const Vec3&>(v2);
const Vec3& d3 = reinterpret_cast<const Vec3&>(v3);
return v0.w * Dot(Cross(d1,d2), d3)
- v1.w * Dot(Cross(d0, d2), d3)
+ v2.w * Dot(Cross(d0, d1), d3)
- v3.w * Dot(Cross(d0, d1), d2);
}
Vec3 intersect(Vec4 p0, Vec4 p1, Vec4 p2)
{
const Vec3& d0 = reinterpret_cast<const Vec3&>(p0);
const Vec3& d1 = reinterpret_cast<const Vec3&>(p1);
const Vec3& d2 = reinterpret_cast<const Vec3&>(p2);
Vec3 r = (p0.w * Cross(d1, d2)
+ p1.w * Cross(d2, d0)
+ p2.w * Cross(d0, d1))
/ Dot(d0, Cross(d2,d1));
return Vec3(r.x, r.y, r.z);
}
const uint16_t sInvalid = uint16_t(-1);
// restriction: only supports a single patch per vertex.
struct HalfedgeMesh
{
struct Halfedge
{
Halfedge(uint16_t vertex = sInvalid, uint16_t face = sInvalid,
uint16_t next = sInvalid, uint16_t prev = sInvalid)
: mVertex(vertex), mFace(face), mNext(next), mPrev(prev)
{}
uint16_t mVertex; // to
uint16_t mFace; // left
uint16_t mNext; // ccw
uint16_t mPrev; // cw
};
HalfedgeMesh() : mNumTriangles(0) {}
uint16_t findHalfedge(uint16_t v0, uint16_t v1)
{
uint16_t h = mVertices[v0], start = h;
while(h != sInvalid && mHalfedges[h].mVertex != v1)
{
h = mHalfedges[h ^ 1].mNext;
if(h == start)
return sInvalid;
}
return h;
}
void connect(uint16_t h0, uint16_t h1)
{
mHalfedges[h0].mNext = h1;
mHalfedges[h1].mPrev = h0;
}
void addTriangle(uint16_t v0, uint16_t v1, uint16_t v2)
{
// add new vertices
uint16_t n = Max(v0, Max(v1, v2))+1;
if(mVertices.size() < n)
mVertices.resize(n, sInvalid);
// collect halfedges, prev and next of triangle
uint16_t verts[] = { v0, v1, v2 };
uint16_t handles[3], prev[3], next[3];
for(uint16_t i=0; i<3; ++i)
{
uint16_t j = (i+1)%3;
uint16_t h = findHalfedge(verts[i], verts[j]);
if(h == sInvalid)
{
// add new edge
h = uint16_t(mHalfedges.size());
mHalfedges.push_back(Halfedge(verts[j]));
mHalfedges.push_back(Halfedge(verts[i]));
}
handles[i] = h;
prev[i] = mHalfedges[h].mPrev;
next[i] = mHalfedges[h].mNext;
}
// patch connectivity
for(uint16_t i=0; i<3; ++i)
{
uint16_t j = (i+1)%3;
mHalfedges[handles[i]].mFace = uint16_t(mFaces.size());
// connect prev and next
connect(handles[i], handles[j]);
if(next[j] == sInvalid) // new next edge, connect opposite
connect(handles[j]^1, next[i]!=sInvalid ? next[i] : handles[i]^1);
if(prev[i] == sInvalid) // new prev edge, connect opposite
connect(prev[j]!=sInvalid ? prev[j] : handles[j]^1, handles[i]^1);
// prev is boundary, update middle vertex
if(mHalfedges[handles[i]^1].mFace == sInvalid)
mVertices[verts[j]] = handles[i]^1;
}
assert(mNumTriangles < 0xffff);
mFaces.push_back(handles[2]);
++mNumTriangles;
}
uint16_t removeTriangle(uint16_t f)
{
uint16_t result = sInvalid;
for(uint16_t i=0, h = mFaces[f]; i<3; ++i)
{
uint16_t v0 = mHalfedges[h^1].mVertex;
uint16_t v1 = mHalfedges[h].mVertex;
mHalfedges[h].mFace = sInvalid;
if(mHalfedges[h^1].mFace == sInvalid) // was boundary edge, remove
{
uint16_t v0Prev = mHalfedges[h ].mPrev;
uint16_t v0Next = mHalfedges[h^1].mNext;
uint16_t v1Prev = mHalfedges[h^1].mPrev;
uint16_t v1Next = mHalfedges[h ].mNext;
// update halfedge connectivity
connect(v0Prev, v0Next);
connect(v1Prev, v1Next);
// update vertex boundary or delete
mVertices[v0] = (v0Prev^1) == v0Next ? sInvalid : v0Next;
mVertices[v1] = (v1Prev^1) == v1Next ? sInvalid : v1Next;
}
else
{
mVertices[v0] = h; // update vertex boundary
result = v1;
}
h = mHalfedges[h].mNext;
}
mFaces[f] = sInvalid;
--mNumTriangles;
return result;
}
// true if vertex v is in front of face f
bool visible(uint16_t v, uint16_t f)
{
uint16_t h = mFaces[f];
if(h == sInvalid)
return false;
uint16_t v0 = mHalfedges[h].mVertex;
h = mHalfedges[h].mNext;
uint16_t v1 = mHalfedges[h].mVertex;
h = mHalfedges[h].mNext;
uint16_t v2 = mHalfedges[h].mVertex;
h = mHalfedges[h].mNext;
return det(mPoints[v], mPoints[v0], mPoints[v1], mPoints[v2]) < -1e-3f;
}
/*
void print() const
{
for(uint32_t i=0; i<mFaces.size(); ++i)
{
printf("f%u: ", i);
uint16_t h = mFaces[i];
if(h == sInvalid)
{
printf("deleted\n");
continue;
}
for(int j=0; j<3; ++j)
{
printf("h%u -> v%u -> ", uint32_t(h), uint32_t(mHalfedges[h].mVertex));
h = mHalfedges[h].mNext;
}
printf("\n");
}
for(uint32_t i=0; i<mVertices.size(); ++i)
{
printf("v%u: ", i);
uint16_t h = mVertices[i];
if(h == sInvalid)
{
printf("deleted\n");
continue;
}
uint16_t start = h;
do {
printf("h%u -> v%u, ", uint32_t(h), uint32_t(mHalfedges[h].mVertex));
h = mHalfedges[h^1].mNext;
} while (h != start);
printf("\n");
}
for(uint32_t i=0; i<mHalfedges.size(); ++i)
{
printf("h%u: v%u, ", i, uint32_t(mHalfedges[i].mVertex));
if(mHalfedges[i].mFace == sInvalid)
printf("boundary, ");
else
printf("f%u, ", uint32_t(mHalfedges[i].mFace));
printf("p%u, n%u\n", uint32_t(mHalfedges[i].mPrev), uint32_t(mHalfedges[i].mNext));
}
}
*/
std::vector<Halfedge> mHalfedges;
std::vector<uint16_t> mVertices; // vertex -> (boundary) halfedge
std::vector<uint16_t> mFaces; // face -> halfedge
std::vector<Vec4> mPoints;
uint16_t mNumTriangles;
};
}
void ConvexMeshBuilder::operator()(uint32_t numPlanes, float scale)
{
if(numPlanes < 4)
return; // todo: handle degenerate cases
HalfedgeMesh mesh;
// gather points (planes, that is)
mesh.mPoints.reserve(numPlanes);
for(uint32_t i=0; i < numPlanes; ++i)
mesh.mPoints.push_back(Vec4(mPlanes[i].x, mPlanes[i].y, mPlanes[i].z, mPlanes[i].w));
// initialize to tetrahedron
mesh.addTriangle(0, 1, 2);
mesh.addTriangle(0, 3, 1);
mesh.addTriangle(1, 3, 2);
mesh.addTriangle(2, 3, 0);
// flip if inside-out
if(mesh.visible(3, 0))
std::swap(mesh.mPoints[0], mesh.mPoints[1]);
// iterate through remaining points
for(uint16_t i=4; i<mesh.mPoints.size(); ++i)
{
// remove any visible triangle
uint16_t v0 = sInvalid;
for(uint16_t j=0; j<mesh.mFaces.size(); ++j)
{
if(mesh.visible(i, j))
v0 = Min(v0, mesh.removeTriangle(j));
}
if(v0 == sInvalid)
continue; // no triangle removed
if(!mesh.mNumTriangles)
return; // empty mesh
// find non-deleted boundary vertex
for(uint16_t h=0; mesh.mVertices[v0] == sInvalid; h+=2)
{
if ((mesh.mHalfedges[h ].mFace == sInvalid) ^
(mesh.mHalfedges[h+1].mFace == sInvalid))
{
v0 = mesh.mHalfedges[h].mVertex;
}
}
// tesselate hole
uint16_t start = v0;
do {
uint16_t h = mesh.mVertices[v0];
uint16_t v1 = mesh.mHalfedges[h].mVertex;
mesh.addTriangle(v0, v1, i);
v0 = v1;
} while(v0 != start && mesh.mNumTriangles < 200);
if (mesh.mNumTriangles == 200)
{
return;
}
}
// convert triangles to vertices (intersection of 3 planes)
std::vector<uint32_t> face2Vertex(mesh.mFaces.size());
for(uint32_t i=0; i<mesh.mFaces.size(); ++i)
{
face2Vertex[i] = uint32_t(mVertices.size());
uint16_t h = mesh.mFaces[i];
if(h == sInvalid)
continue;
uint16_t v0 = mesh.mHalfedges[h].mVertex;
h = mesh.mHalfedges[h].mNext;
uint16_t v1 = mesh.mHalfedges[h].mVertex;
h = mesh.mHalfedges[h].mNext;
uint16_t v2 = mesh.mHalfedges[h].mVertex;
mVertices.push_back(intersect(mesh.mPoints[v0], mesh.mPoints[v1], mesh.mPoints[v2]));
}
// convert vertices to polygons (face one-ring)
for(uint32_t i=0; i<mesh.mVertices.size(); ++i)
{
uint16_t h = mesh.mVertices[i];
if(h == sInvalid || mesh.mHalfedges[h].mFace == sInvalid)
continue;
uint16_t v0 = face2Vertex[mesh.mHalfedges[h].mFace];
h = mesh.mHalfedges[h].mPrev^1;
if(h == sInvalid || mesh.mHalfedges[h].mFace == sInvalid)
continue;
uint16_t v1 = face2Vertex[mesh.mHalfedges[h].mFace];
while(mIndices.size() < 1000)
{
h = mesh.mHalfedges[h].mPrev^1;
if(h == sInvalid || mesh.mHalfedges[h].mFace == sInvalid)
continue;
uint16_t v2 = face2Vertex[mesh.mHalfedges[h].mFace];
if(v0 == v2)
break;
mIndices.push_back(v0);
mIndices.push_back(v2);
mIndices.push_back(v1);
v1 = v2;
}
}
}
================================================
FILE: core/core.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "core.h"
================================================
FILE: core/core.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#define ENABLE_VERBOSE_OUTPUT 0
#define ENABLE_APIC_CAPTURE 0
#define ENABLE_PERFALYZE_CAPTURE 0
#if ENABLE_VERBOSE_OUTPUT
#define VERBOSE(a) a##;
#else
#define VERBOSE(a)
#endif
//#define Super __super
// basically just a collection of macros and types
#ifndef UNUSED
#define UNUSED(x) (void)x;
#endif
#define NOMINMAX
#if !PLATFORM_OPENCL
#include <cassert>
#endif
#include "types.h"
#if !PLATFORM_SPU && !PLATFORM_OPENCL
#include <string>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <functional>
#endif
// disable some warnings
#if _WIN32
#pragma warning(disable: 4996) // secure io
#pragma warning(disable: 4100) // unreferenced param
#pragma warning(disable: 4324) // structure was padded due to __declspec(align())
#endif
// alignment helpers
#define DEFAULT_ALIGNMENT 16
#if PLATFORM_LINUX
#define ALIGN_N(x)
#define ENDALIGN_N(x) __attribute__ ((aligned (x)))
#else
#define ALIGN_N(x) __declspec(align(x))
#define END_ALIGN_N(x)
#endif
#define ALIGN ALIGN_N(DEFAULT_ALIGNMENT)
#define END_ALIGN END_ALIGN_N(DEFAULT_ALIGNMENT)
inline bool IsPowerOfTwo(int n)
{
return (n&(n-1))==0;
}
// align a ptr to a power of tow
template <typename T>
inline T* AlignPtr(T* p, uint32_t alignment)
{
assert(IsPowerOfTwo(alignment));
// cast to safe ptr type
uintptr_t up = reinterpret_cast<uintptr_t>(p);
return (T*)((up+(alignment-1)) & ~(alignment-1));
}
// align an unsigned value to a power of two
inline uint32_t Align(uint32_t val, uint32_t alignment)
{
assert(IsPowerOfTwo(alignment));
return (val+(alignment-1))& ~(alignment-1);
}
inline bool IsAligned(void* p, uint32_t alignment)
{
return (((uintptr_t)p) & (alignment-1)) == 0;
}
// Endian helpers
template <typename T>
T ByteSwap(const T& val)
{
T copy = val;
uint8_t* p = reinterpret_cast<uint8_t*>(©);
std::reverse(p, p+sizeof(T));
return copy;
}
#ifndef LITTLE_ENDIAN
#define LITTLE_ENDIAN WIN32
#endif
#ifndef BIG_ENDIAN
#define BIG_ENDIAN PLATFORM_PS3 || PLATFORM_SPU
#endif
#if BIG_ENDIAN
#define ToLittleEndian(x) ByteSwap(x)
#else
#define ToLittleEndian(x) x
#endif
//#include "platform.h"
//#define sizeof_array(x) (sizeof(x)/sizeof(*x))
template <typename T, size_t N>
size_t sizeof_array(const T (&)[N])
{
return N;
}
// functor designed for use in the stl
template <typename T>
class free_ptr : public std::unary_function<T*, void>
{
public:
void operator()(const T* ptr)
{
delete ptr;
}
};
================================================
FILE: core/extrude.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "maths.h"
#include <vector>
void Extrude(const Vec3* points, int numPoints, std::vector<Vec3>& vertices, std::vector<Vec3>& normals, std::vector<int>& triangles, float radius, int resolution, int smoothing)
{
if (numPoints < 2)
return;
Vec3 u, v;
Vec3 w = SafeNormalize(Vec3(points[1]) - Vec3(points[0]), Vec3(0.0f, 1.0f, 0.0f));
BasisFromVector(w, &u, &v);
Matrix44 frame;
frame.SetCol(0, Vec4(u.x, u.y, u.z, 0.0f));
frame.SetCol(1, Vec4(v.x, v.y, v.z, 0.0f));
frame.SetCol(2, Vec4(w.x, w.y, w.z, 0.0f));
frame.SetCol(3, Vec4(0.0f, 0.0f, 0.0f, 1.0f));
for (int i = 0; i < numPoints - 1; ++i)
{
Vec3 next;
if (i < numPoints - 1)
next = Normalize(Vec3(points[i + 1]) - Vec3(points[i - 1]));
else
next = Normalize(Vec3(points[i]) - Vec3(points[i - 1]));
int a = Max(i - 1, 0);
int b = i;
int c = Min(i + 1, numPoints - 1);
int d = Min(i + 2, numPoints - 1);
Vec3 p1 = Vec3(points[b]);
Vec3 p2 = Vec3(points[c]);
Vec3 m1 = 0.5f*(Vec3(points[c]) - Vec3(points[a]));
Vec3 m2 = 0.5f*(Vec3(points[d]) - Vec3(points[b]));
// ensure last segment handled correctly
int segments = (i < numPoints - 2) ? smoothing : smoothing + 1;
for (int s = 0; s < segments; ++s)
{
Vec3 pos = HermiteInterpolate(p1, p2, m1, m2, s / float(smoothing));
Vec3 dir = Normalize(HermiteTangent(p1, p2, m1, m2, s / float(smoothing)));
Vec3 cur = frame.GetAxis(2);
const float angle = acosf(Dot(cur, dir));
// if parallel then don't need to do anything
if (fabsf(angle) > 0.001f)
frame = RotationMatrix(angle, SafeNormalize(Cross(cur, dir)))*frame;
size_t startIndex = vertices.size();
for (int c = 0; c < resolution; ++c)
{
float angle = k2Pi / resolution;
// transform position and normal to world space
Vec4 v = frame*Vec4(cosf(angle*c), sinf(angle*c), 0.0f, 0.0f);
vertices.push_back(Vec3(v)*radius + pos);
normals.push_back(Vec3(v));
}
// output triangles
if (startIndex != 0)
{
for (int i = 0; i < resolution; ++i)
{
int curIndex = static_cast<int>(startIndex + i);
int nextIndex = static_cast<int>(startIndex + (i + 1) % resolution);
triangles.push_back(curIndex);
triangles.push_back(curIndex - resolution);
triangles.push_back(nextIndex - resolution);
triangles.push_back(nextIndex - resolution);
triangles.push_back(nextIndex);
triangles.push_back(curIndex);
}
}
}
}
}
================================================
FILE: core/extrude.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include <vector>
#include "maths.h"
// extrudes a circle along a Hermite curve defined by curvePoints, resolution is the number of circle segments, smoothing is the number of segments between points
void Extrude(const Vec3* points, int numPoints, std::vector<Vec3>& positions, std::vector<Vec3>& normals, std::vector<int>& indices, float radius, int resolution, int smoothing);
================================================
FILE: core/mat22.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include "maths.h"
struct Matrix22
{
CUDA_CALLABLE Matrix22() {}
CUDA_CALLABLE Matrix22(float a, float b, float c, float d)
{
cols[0] = Vec2(a, c);
cols[1] = Vec2(b, d);
}
CUDA_CALLABLE Matrix22(const Vec2& c1, const Vec2& c2)
{
cols[0] = c1;
cols[1] = c2;
}
CUDA_CALLABLE float operator()(int i, int j) const { return static_cast<const float*>(cols[j])[i]; }
CUDA_CALLABLE float& operator()(int i, int j) { return static_cast<float*>(cols[j])[i]; }
Vec2 cols[2];
static inline Matrix22 Identity() { static const Matrix22 sIdentity(Vec2(1.0f, 0.0f), Vec2(0.0f, 1.0f)); return sIdentity; }
};
CUDA_CALLABLE inline Matrix22 Multiply(float s, const Matrix22& m)
{
Matrix22 r = m;
r.cols[0] *= s;
r.cols[1] *= s;
return r;
}
CUDA_CALLABLE inline Matrix22 Multiply(const Matrix22& a, const Matrix22& b)
{
Matrix22 r;
r.cols[0] = a.cols[0]*b.cols[0].x + a.cols[1]*b.cols[0].y;
r.cols[1] = a.cols[0]*b.cols[1].x + a.cols[1]*b.cols[1].y;
return r;
}
CUDA_CALLABLE inline Matrix22 Add(const Matrix22& a, const Matrix22& b)
{
return Matrix22(a.cols[0]+b.cols[0], a.cols[1]+b.cols[1]);
}
CUDA_CALLABLE inline Vec2 Multiply(const Matrix22& a, const Vec2& x)
{
return a.cols[0]*x.x + a.cols[1]*x.y;
}
CUDA_CALLABLE inline Matrix22 operator*(float s, const Matrix22& a) { return Multiply(s, a); }
CUDA_CALLABLE inline Matrix22 operator*(const Matrix22& a, float s) { return Multiply(s, a); }
CUDA_CALLABLE inline Matrix22 operator*(const Matrix22& a, const Matrix22& b) { return Multiply(a, b); }
CUDA_CALLABLE inline Matrix22 operator+(const Matrix22& a, const Matrix22& b) { return Add(a, b); }
CUDA_CALLABLE inline Matrix22 operator-(const Matrix22& a, const Matrix22& b) { return Add(a, -1.0f*b); }
CUDA_CALLABLE inline Matrix22& operator+=(Matrix22& a, const Matrix22& b) { a = a+b; return a; }
CUDA_CALLABLE inline Matrix22& operator-=(Matrix22& a, const Matrix22& b) { a = a-b; return a; }
CUDA_CALLABLE inline Matrix22& operator*=(Matrix22& a, float s) { a = a*s; return a; }
CUDA_CALLABLE inline Vec2 operator*(const Matrix22& a, const Vec2& x) { return Multiply(a, x); }
CUDA_CALLABLE inline float Determinant(const Matrix22& m)
{
return m(0,0)*m(1,1)-m(1,0)*m(0,1);
}
CUDA_CALLABLE inline Matrix22 Inverse(const Matrix22& m, float& det)
{
det = Determinant(m);
if (fabsf(det) > FLT_EPSILON)
{
Matrix22 inv;
inv(0,0) = m(1,1);
inv(1,1) = m(0,0);
inv(0,1) = -m(0,1);
inv(1,0) = -m(1,0);
return Multiply(1.0f/det, inv);
}
else
{
det = 0.0f;
return m;
}
}
CUDA_CALLABLE inline Matrix22 Transpose(const Matrix22& a)
{
Matrix22 r;
r(0,0) = a(0,0);
r(0,1) = a(1,0);
r(1,0) = a(0,1);
r(1,1) = a(1,1);
return r;
}
CUDA_CALLABLE inline float Trace(const Matrix22& a)
{
return a(0,0)+a(1,1);
}
CUDA_CALLABLE inline Matrix22 RotationMatrix(float theta)
{
return Matrix22(Vec2(cosf(theta), sinf(theta)), Vec2(-sinf(theta), cosf(theta)));
}
// outer product of a and b, b is considered a row vector
CUDA_CALLABLE inline Matrix22 Outer(const Vec2& a, const Vec2& b)
{
return Matrix22(a*b.x, a*b.y);
}
CUDA_CALLABLE inline Matrix22 QRDecomposition(const Matrix22& m)
{
Vec2 a = Normalize(m.cols[0]);
Matrix22 q(a, PerpCCW(a));
return q;
}
CUDA_CALLABLE inline Matrix22 PolarDecomposition(const Matrix22& m)
{
/*
//iterative method
float det;
Matrix22 q = m;
for (int i=0; i < 4; ++i)
{
q = 0.5f*(q + Inverse(Transpose(q), det));
}
*/
Matrix22 q = m + Matrix22(m(1,1), -m(1,0), -m(0,1), m(0,0));
float s = Length(q.cols[0]);
q.cols[0] /= s;
q.cols[1] /= s;
return q;
}
================================================
FILE: core/mat33.h
================================================
// This code contain s NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include "maths.h"
#include "quat.h"
#include "vec3.h"
struct Matrix33
{
CUDA_CALLABLE Matrix33() {}
CUDA_CALLABLE Matrix33(const Vec3& c1, const Vec3& c2, const Vec3& c3)
{
cols[0] = c1;
cols[1] = c2;
cols[2] = c3;
}
CUDA_CALLABLE Matrix33(const Quat& q)
{
cols[0] = Rotate(q, Vec3(1.0f, 0.0f, 0.0f));
cols[1] = Rotate(q, Vec3(0.0f, 1.0f, 0.0f));
cols[2] = Rotate(q, Vec3(0.0f, 0.0f, 1.0f));
}
CUDA_CALLABLE float operator()(int i, int j) const { return static_cast<const float*>(cols[j])[i]; }
CUDA_CALLABLE float& operator()(int i, int j) { return static_cast<float*>(cols[j])[i]; }
Vec3 cols[3];
CUDA_CALLABLE static inline Matrix33 Identity() { const Matrix33 sIdentity(Vec3(1.0f, 0.0f, 0.0f), Vec3(0.0f, 1.0f, 0.0f), Vec3(0.0f, 0.0f, 1.0f)); return sIdentity; }
};
CUDA_CALLABLE inline Matrix33 Multiply(float s, const Matrix33& m)
{
Matrix33 r = m;
r.cols[0] *= s;
r.cols[1] *= s;
r.cols[2] *= s;
return r;
}
CUDA_CALLABLE inline Vec3 Multiply(const Matrix33& a, const Vec3& x)
{
return a.cols[0]*x.x + a.cols[1]*x.y + a.cols[2]*x.z;
}
CUDA_CALLABLE inline Vec3 operator*(const Matrix33& a, const Vec3& x) { return Multiply(a, x); }
CUDA_CALLABLE inline Matrix33 Multiply(const Matrix33& a, const Matrix33& b)
{
Matrix33 r;
r.cols[0] = a*b.cols[0];
r.cols[1] = a*b.cols[1];
r.cols[2] = a*b.cols[2];
return r;
}
CUDA_CALLABLE inline Matrix33 Add(const Matrix33& a, const Matrix33& b)
{
return Matrix33(a.cols[0]+b.cols[0], a.cols[1]+b.cols[1], a.cols[2]+b.cols[2]);
}
CUDA_CALLABLE inline float Determinant(const Matrix33& m)
{
return Dot(m.cols[0], Cross(m.cols[1], m.cols[2]));
}
CUDA_CALLABLE inline Matrix33 Transpose(const Matrix33& a)
{
Matrix33 r;
for (uint32_t i=0; i < 3; ++i)
for(uint32_t j=0; j < 3; ++j)
r(i, j) = a(j, i);
return r;
}
CUDA_CALLABLE inline float Trace(const Matrix33& a)
{
return a(0,0)+a(1,1)+a(2,2);
}
CUDA_CALLABLE inline Matrix33 Outer(const Vec3& a, const Vec3& b)
{
return Matrix33(a*b.x, a*b.y, a*b.z);
}
CUDA_CALLABLE inline Matrix33 Inverse(const Matrix33& a, bool& success)
{
float s = Determinant(a);
const float eps = 1.e-8f;
if (fabsf(s) > eps)
{
Matrix33 b;
b(0,0) = a(1,1)*a(2,2) - a(1,2)*a(2,1); b(0,1) = a(0,2)*a(2,1) - a(0,1)*a(2,2); b(0,2) = a(0,1)*a(1,2) - a(0,2)*a(1,1);
b(1,0) = a(1,2)*a(2,0) - a(1,0)*a(2,2); b(1,1) = a(0,0)*a(2,2) - a(0,2)*a(2,0); b(1,2) = a(0,2)*a(1,0) - a(0,0)*a(1,2);
b(2,0) = a(1,0)*a(2,1) - a(1,1)*a(2,0); b(2,1) = a(0,1)*a(2,0) - a(0,0)*a(2,1); b(2,2) = a(0,0)*a(1,1) - a(0,1)*a(1,0);
success = true;
return Multiply(1.0f/s, b);
}
else
{
success = false;
return Matrix33();
}
}
CUDA_CALLABLE inline Matrix33 operator*(float s, const Matrix33& a) { return Multiply(s, a); }
CUDA_CALLABLE inline Matrix33 operator*(const Matrix33& a, float s) { return Multiply(s, a); }
CUDA_CALLABLE inline Matrix33 operator*(const Matrix33& a, const Matrix33& b) { return Multiply(a, b); }
CUDA_CALLABLE inline Matrix33 operator+(const Matrix33& a, const Matrix33& b) { return Add(a, b); }
CUDA_CALLABLE inline Matrix33 operator-(const Matrix33& a, const Matrix33& b) { return Add(a, -1.0f*b); }
CUDA_CALLABLE inline Matrix33& operator+=(Matrix33& a, const Matrix33& b) { a = a+b; return a; }
CUDA_CALLABLE inline Matrix33& operator-=(Matrix33& a, const Matrix33& b) { a = a-b; return a; }
CUDA_CALLABLE inline Matrix33& operator*=(Matrix33& a, float s) { a.cols[0]*=s; a.cols[1]*=s; a.cols[2]*=s; return a; }
template <typename T>
CUDA_CALLABLE inline XQuat<T>::XQuat(const Matrix33& m)
{
float tr = m(0, 0) + m(1, 1) + m(2, 2), h;
if(tr >= 0)
{
h = sqrtf(tr + 1);
w = 0.5f * h;
h = 0.5f / h;
x = (m(2, 1) - m(1, 2)) * h;
y = (m(0, 2) - m(2, 0)) * h;
z = (m(1, 0) - m(0, 1)) * h;
}
else
{
unsigned int i = 0;
if(m(1, 1) > m(0, 0))
i = 1;
if(m(2, 2) > m(i, i))
i = 2;
switch(i)
{
case 0:
h = sqrtf((m(0, 0) - (m(1, 1) + m(2, 2))) + 1);
x = 0.5f * h;
h = 0.5f / h;
y = (m(0, 1) + m(1, 0)) * h;
z = (m(2, 0) + m(0, 2)) * h;
w = (m(2, 1) - m(1, 2)) * h;
break;
case 1:
h = sqrtf((m(1, 1) - (m(2, 2) + m(0, 0))) + 1);
y = 0.5f * h;
h = 0.5f / h;
z = (m(1, 2) + m(2, 1)) * h;
x = (m(0, 1) + m(1, 0)) * h;
w = (m(0, 2) - m(2, 0)) * h;
break;
case 2:
h = sqrtf((m(2, 2) - (m(0, 0) + m(1, 1))) + 1);
z = 0.5f * h;
h = 0.5f / h;
x = (m(2, 0) + m(0, 2)) * h;
y = (m(1, 2) + m(2, 1)) * h;
w = (m(1, 0) - m(0, 1)) * h;
break;
default: // Make compiler happy
x = y = z = w = 0;
break;
}
}
}
================================================
FILE: core/mat44.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
// stores column vectors in column major order
template <typename T>
class XMatrix44
{
public:
CUDA_CALLABLE XMatrix44() { memset(columns, 0, sizeof(columns)); }
CUDA_CALLABLE XMatrix44(const T* d) { assert(d); memcpy(columns, d, sizeof(*this)); }
CUDA_CALLABLE XMatrix44(T c11, T c21, T c31, T c41,
T c12, T c22, T c32, T c42,
T c13, T c23, T c33, T c43,
T c14, T c24, T c34, T c44)
{
columns[0][0] = c11;
columns[0][1] = c21;
columns[0][2] = c31;
columns[0][3] = c41;
columns[1][0] = c12;
columns[1][1] = c22;
columns[1][2] = c32;
columns[1][3] = c42;
columns[2][0] = c13;
columns[2][1] = c23;
columns[2][2] = c33;
columns[2][3] = c43;
columns[3][0] = c14;
columns[3][1] = c24;
columns[3][2] = c34;
columns[3][3] = c44;
}
CUDA_CALLABLE XMatrix44(const Vec4& c1, const Vec4& c2, const Vec4& c3, const Vec4& c4)
{
columns[0][0] = c1.x;
columns[0][1] = c1.y;
columns[0][2] = c1.z;
columns[0][3] = c1.w;
columns[1][0] = c2.x;
columns[1][1] = c2.y;
columns[1][2] = c2.z;
columns[1][3] = c2.w;
columns[2][0] = c3.x;
columns[2][1] = c3.y;
columns[2][2] = c3.z;
columns[2][3] = c3.w;
columns[3][0] = c4.x;
columns[3][1] = c4.y;
columns[3][2] = c4.z;
columns[3][3] = c4.w;
}
CUDA_CALLABLE operator T* () { return &columns[0][0]; }
CUDA_CALLABLE operator const T* () const { return &columns[0][0]; }
// right multiply
CUDA_CALLABLE XMatrix44<T> operator * (const XMatrix44<T>& rhs) const
{
XMatrix44<T> r;
MatrixMultiply(*this, rhs, r);
return r;
}
// right multiply
CUDA_CALLABLE XMatrix44<T>& operator *= (const XMatrix44<T>& rhs)
{
XMatrix44<T> r;
MatrixMultiply(*this, rhs, r);
*this = r;
return *this;
}
// scalar multiplication
CUDA_CALLABLE XMatrix44<T>& operator *= (const T& s)
{
for (int c=0; c < 4; ++c)
{
for (int r=0; r < 4; ++r)
{
columns[c][r] *= s;
}
}
return *this;
}
CUDA_CALLABLE void MatrixMultiply(const T* __restrict lhs, const T* __restrict rhs, T* __restrict result) const
{
assert(lhs != rhs);
assert(lhs != result);
assert(rhs != result);
for (int i=0; i < 4; ++i)
{
for (int j=0; j < 4; ++j)
{
result[j*4+i] = rhs[j*4+0]*lhs[i+0];
result[j*4+i] += rhs[j*4+1]*lhs[i+4];
result[j*4+i] += rhs[j*4+2]*lhs[i+8];
result[j*4+i] += rhs[j*4+3]*lhs[i+12];
}
}
}
CUDA_CALLABLE void SetCol(int index, const Vec4& c)
{
columns[index][0] = c.x;
columns[index][1] = c.y;
columns[index][2] = c.z;
columns[index][3] = c.w;
}
// convenience overloads
CUDA_CALLABLE void SetAxis(uint32_t index, const XVector3<T>& a)
{
columns[index][0] = a.x;
columns[index][1] = a.y;
columns[index][2] = a.z;
columns[index][3] = 0.0f;
}
CUDA_CALLABLE void SetTranslation(const Point3& p)
{
columns[3][0] = p.x;
columns[3][1] = p.y;
columns[3][2] = p.z;
columns[3][3] = 1.0f;
}
CUDA_CALLABLE const Vec3& GetAxis(int i) const { return *reinterpret_cast<const Vec3*>(&columns[i]); }
CUDA_CALLABLE const Vec4& GetCol(int i) const { return *reinterpret_cast<const Vec4*>(&columns[i]); }
CUDA_CALLABLE const Point3& GetTranslation() const { return *reinterpret_cast<const Point3*>(&columns[3]); }
CUDA_CALLABLE Vec4 GetRow(int i) const { return Vec4(columns[0][i], columns[1][i], columns[2][i], columns[3][i]); }
float columns[4][4];
static XMatrix44<T> kIdentity;
};
// right multiply a point assumes w of 1
template <typename T>
CUDA_CALLABLE Point3 Multiply(const XMatrix44<T>& mat, const Point3& v)
{
Point3 r;
r.x = v.x*mat[0] + v.y*mat[4] + v.z*mat[8] + mat[12];
r.y = v.x*mat[1] + v.y*mat[5] + v.z*mat[9] + mat[13];
r.z = v.x*mat[2] + v.y*mat[6] + v.z*mat[10] + mat[14];
return r;
}
// right multiply a vector3 assumes a w of 0
template <typename T>
CUDA_CALLABLE XVector3<T> Multiply(const XMatrix44<T>& mat, const XVector3<T>& v)
{
XVector3<T> r;
r.x = v.x*mat[0] + v.y*mat[4] + v.z*mat[8];
r.y = v.x*mat[1] + v.y*mat[5] + v.z*mat[9];
r.z = v.x*mat[2] + v.y*mat[6] + v.z*mat[10];
return r;
}
// right multiply a vector4
template <typename T>
CUDA_CALLABLE XVector4<T> Multiply(const XMatrix44<T>& mat, const XVector4<T>& v)
{
XVector4<T> r;
r.x = v.x*mat[0] + v.y*mat[4] + v.z*mat[8] + v.w*mat[12];
r.y = v.x*mat[1] + v.y*mat[5] + v.z*mat[9] + v.w*mat[13];
r.z = v.x*mat[2] + v.y*mat[6] + v.z*mat[10] + v.w*mat[14];
r.w = v.x*mat[3] + v.y*mat[7] + v.z*mat[11] + v.w*mat[15];
return r;
}
template <typename T>
CUDA_CALLABLE Point3 operator*(const XMatrix44<T>& mat, const Point3& v)
{
return Multiply(mat, v);
}
template <typename T>
CUDA_CALLABLE XVector4<T> operator*(const XMatrix44<T>& mat, const XVector4<T>& v)
{
return Multiply(mat, v);
}
template <typename T>
CUDA_CALLABLE XVector3<T> operator*(const XMatrix44<T>& mat, const XVector3<T>& v)
{
return Multiply(mat, v);
}
template<typename T>
CUDA_CALLABLE inline XMatrix44<T> Transpose(const XMatrix44<T>& m)
{
XMatrix44<float> inv;
// transpose
for (uint32_t c=0; c < 4; ++c)
{
for (uint32_t r=0; r < 4; ++r)
{
inv.columns[c][r] = m.columns[r][c];
}
}
return inv;
}
template <typename T>
CUDA_CALLABLE XMatrix44<T> AffineInverse(const XMatrix44<T>& m)
{
XMatrix44<T> inv;
// transpose upper 3x3
for (int c=0; c < 3; ++c)
{
for (int r=0; r < 3; ++r)
{
inv.columns[c][r] = m.columns[r][c];
}
}
// multiply -translation by upper 3x3 transpose
inv.columns[3][0] = -Dot3(m.columns[3], m.columns[0]);
inv.columns[3][1] = -Dot3(m.columns[3], m.columns[1]);
inv.columns[3][2] = -Dot3(m.columns[3], m.columns[2]);
inv.columns[3][3] = 1.0f;
return inv;
}
CUDA_CALLABLE inline XMatrix44<float> Outer(const Vec4& a, const Vec4& b)
{
return XMatrix44<float>(a*b.x, a*b.y, a*b.z, a*b.w);
}
// convenience
typedef XMatrix44<float> Mat44;
typedef XMatrix44<float> Matrix44;
================================================
FILE: core/maths.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "maths.h"
uint32_t seed1;
uint32_t seed2;
void RandInit()
{
seed1 = 315645664;
seed2 = seed1 ^ 0x13ab45fe;
}
static float s_identity[4][4] = { { 1.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 1.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 1.0f, 0.0f },
{ 0.0f, 0.0f, 0.0f, 1.0f } };
template <>
XMatrix44<float> XMatrix44<float>::kIdentity(s_identity[0]);
Colour::Colour(Colour::Preset p)
{
switch (p)
{
case kRed:
*this = Colour(1.0f, 0.0f, 0.0f);
break;
case kGreen:
*this = Colour(0.0f, 1.0f, 0.0f);
break;
case kBlue:
*this = Colour(0.0f, 0.0f, 1.0f);
break;
case kWhite:
*this = Colour(1.0f, 1.0f, 1.0f);
break;
case kBlack:
*this = Colour(0.0f, 0.0f, 0.0f);
break;
};
}
================================================
FILE: core/maths.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include <cmath>
#include <float.h>
#include <cassert>
#include <string.h>
#include "core.h"
#include "types.h"
#ifdef __CUDACC__
#define CUDA_CALLABLE __host__ __device__
#else
#define CUDA_CALLABLE
#endif
const float kPi = 3.141592653589f;
const float k2Pi = 2.0f*kPi;
const float kInvPi = 1.0f/kPi;
const float kInv2Pi = 0.5f/kPi;
const float kDegToRad = kPi/180.0f;
const float kRadToDeg = 180.0f/kPi;
CUDA_CALLABLE inline float DegToRad(float t)
{
return t * kDegToRad;
}
CUDA_CALLABLE inline float RadToDeg(float t)
{
return t * kRadToDeg;
}
CUDA_CALLABLE inline float Sin(float theta)
{
return sinf(theta);
}
CUDA_CALLABLE inline float Cos(float theta)
{
return cosf(theta);
}
CUDA_CALLABLE inline void SinCos(float theta, float& s, float& c)
{
// no optimizations yet
s = sinf(theta);
c = cosf(theta);
}
CUDA_CALLABLE inline float Tan(float theta)
{
return tanf(theta);
}
CUDA_CALLABLE inline float Sqrt(float x)
{
return sqrtf(x);
}
CUDA_CALLABLE inline double Sqrt(double x)
{
return sqrt(x);
}
CUDA_CALLABLE inline float ASin(float theta)
{
return asinf(theta);
}
CUDA_CALLABLE inline float ACos(float theta)
{
return acosf(theta);
}
CUDA_CALLABLE inline float ATan(float theta)
{
return atanf(theta);
}
CUDA_CALLABLE inline float ATan2(float x, float y)
{
return atan2f(x, y);
}
CUDA_CALLABLE inline float Abs(float x)
{
return fabsf(x);
}
CUDA_CALLABLE inline float Pow(float b, float e)
{
return powf(b, e);
}
CUDA_CALLABLE inline float Sgn(float x)
{
return (x < 0.0f ? -1.0f : 1.0f);
}
CUDA_CALLABLE inline float Sign(float x)
{
return x < 0.0f ? -1.0f : 1.0f;
}
CUDA_CALLABLE inline double Sign(double x)
{
return x < 0.0f ? -1.0f : 1.0f;
}
CUDA_CALLABLE inline float Mod(float x, float y)
{
return fmod(x, y);
}
template <typename T>
CUDA_CALLABLE inline T Min(T a, T b)
{
return a < b ? a : b;
}
template <typename T>
CUDA_CALLABLE inline T Max(T a, T b)
{
return a > b ? a : b;
}
template <typename T>
CUDA_CALLABLE inline void Swap(T& a, T& b)
{
T tmp = a;
a = b;
b = tmp;
}
template <typename T>
CUDA_CALLABLE inline T Clamp(T a, T low, T high)
{
if (low > high)
Swap(low, high);
return Max(low, Min(a, high));
}
template <typename V, typename T>
CUDA_CALLABLE inline V Lerp(const V& start, const V& end, const T& t)
{
return start + (end-start)*t;
}
CUDA_CALLABLE inline float InvSqrt(float x)
{
return 1.0f / sqrtf(x);
}
// round towards +infinity
CUDA_CALLABLE inline int Round(float f)
{
return int(f+0.5f);
}
template <typename T>
CUDA_CALLABLE T Normalize(const T& v)
{
T a(v);
a /= Length(v);
return a;
}
template <typename T>
CUDA_CALLABLE inline typename T::value_type LengthSq(const T v)
{
return Dot(v,v);
}
template <typename T>
CUDA_CALLABLE inline typename T::value_type Length(const T& v)
{
typename T::value_type lSq = LengthSq(v);
if (lSq)
return Sqrt(LengthSq(v));
else
return 0.0f;
}
// this is mainly a helper function used by script
template <typename T>
CUDA_CALLABLE inline typename T::value_type Distance(const T& v1, const T& v2)
{
return Length(v1-v2);
}
template <typename T>
CUDA_CALLABLE inline T SafeNormalize(const T& v, const T& fallback=T())
{
float l = LengthSq(v);
if (l > 0.0f)
{
return v * InvSqrt(l);
}
else
return fallback;
}
template <typename T>
CUDA_CALLABLE inline T Sqr(T x) { return x*x; }
template <typename T>
CUDA_CALLABLE inline T Cube(T x) { return x*x*x; }
#include "vec2.h"
#include "vec3.h"
#include "vec4.h"
#include "quat.h"
#include "point3.h"
#include "mat22.h"
#include "mat33.h"
#include "mat44.h"
#include "matnn.h"
// represents a plane in the form ax + by + cz - d = 0
class Plane : public Vec4
{
public:
CUDA_CALLABLE inline Plane() {}
CUDA_CALLABLE inline Plane(float x, float y, float z, float w) : Vec4(x, y, z, w) {}
CUDA_CALLABLE inline Plane(const Vec3& p, const Vector3& n)
{
x = n.x;
y = n.y;
z = n.z;
w = -Dot3(p, n);
}
CUDA_CALLABLE inline Vec3 GetNormal() const { return Vec3(x, y, z); }
CUDA_CALLABLE inline Vec3 GetPoint() const { return Vec3(x*-w, y*-w, z*-w); }
CUDA_CALLABLE inline Plane(const Vec3& v) : Vec4(v.x, v.y, v.z, 1.0f) {}
CUDA_CALLABLE inline Plane(const Vec4& v) : Vec4(v) {}
};
template <typename T>
CUDA_CALLABLE inline T Dot(const XVector4<T>& v1, const XVector4<T>& v2)
{
return v1.x*v2.x + v1.y*v2.y + v1.z*v2.z + v1.w*v2.w;
}
// helper function that assumes a w of 0
CUDA_CALLABLE inline float Dot(const Plane& p, const Vector3& v)
{
return p.x*v.x + p.y*v.y + p.z*v.z;
}
CUDA_CALLABLE inline float Dot(const Vector3& v, const Plane& p)
{
return Dot(p, v);
}
// helper function that assumes a w of 1
CUDA_CALLABLE inline float Dot(const Plane& p, const Point3& v)
{
return p.x*v.x + p.y*v.y + p.z*v.z + p.w;
}
// ensures that the normal component of the plane is unit magnitude
CUDA_CALLABLE inline Vec4 NormalizePlane(const Vec4& p)
{
float l = Length(Vec3(p));
return (1.0f/l)*p;
}
//----------------------------------------------------------------------------
inline float RandomUnit()
{
float r = (float)rand();
r /= RAND_MAX;
return r;
}
// Random number in range [-1,1]
inline float RandomSignedUnit()
{
float r = (float)rand();
r /= RAND_MAX;
r = 2.0f * r - 1.0f;
return r;
}
inline float Random(float lo, float hi)
{
float r = (float)rand();
r /= RAND_MAX;
r = (hi - lo) * r + lo;
return r;
}
extern uint32_t seed1;
extern uint32_t seed2;
void RandInit();
// random number generator
inline uint32_t Rand()
{
seed1 = ( seed2 ^ ( ( seed1 << 5 ) | ( seed1 >> 27 ) ) ) ^ ( seed1*seed2 );
seed2 = seed1 ^ ( ( seed2 << 12 ) | ( seed2 >> 20 ) );
return seed1;
}
// returns a random number in the range [min, max)
inline uint32_t Rand(uint32_t min, uint32_t max)
{
return min + Rand()%(max-min);
}
// returns random number between 0-1
inline float Randf()
{
uint32_t value = Rand();
uint32_t limit = 0xffffffff;
return ( float )value*( 1.0f/( float )limit );
}
// returns random number between min and max
inline float Randf(float min, float max)
{
// return Lerp(min, max, ParticleRandf());
float t = Randf();
return (1.0f-t)*min + t*(max);
}
// returns random number between 0-max
inline float Randf(float max)
{
return Randf()*max;
}
// returns a random unit vector (also can add an offset to generate around an off axis vector)
inline Vec3 RandomUnitVector()
{
float phi = Randf(kPi*2.0f);
float theta = Randf(kPi*2.0f);
float cosTheta = Cos(theta);
float sinTheta = Sin(theta);
float cosPhi = Cos(phi);
float sinPhi = Sin(phi);
return Vec3(cosTheta*sinPhi,cosPhi,sinTheta*sinPhi);
}
inline Vec3 RandVec3() { return Vec3(Randf(-1.0f, 1.0f), Randf(-1.0f, 1.0f), Randf(-1.0f, 1.0f)); }
// uniformly sample volume of a sphere using dart throwing
inline Vec3 UniformSampleSphereVolume()
{
for(;;)
{
Vec3 v = RandVec3();
if (Dot(v, v) < 1.0f)
return v;
}
}
inline Vec3 UniformSampleSphere()
{
float u1 = Randf(0.0f, 1.0f);
float u2 = Randf(0.0f, 1.0f);
float z = 1.f - 2.f * u1;
float r = sqrtf(Max(0.f, 1.f - z*z));
float phi = 2.f * kPi * u2;
float x = r * cosf(phi);
float y = r * sinf(phi);
return Vector3(x, y, z);
}
inline Vec3 UniformSampleHemisphere()
{
// generate a random z value
float z = Randf(0.0f, 1.0f);
float w = Sqrt(1.0f-z*z);
float phi = k2Pi*Randf(0.0f, 1.0f);
float x = Cos(phi)*w;
float y = Sin(phi)*w;
return Vec3(x, y, z);
}
inline Vec2 UniformSampleDisc()
{
float r = Sqrt(Randf(0.0f, 1.0f));
float theta = k2Pi*Randf(0.0f, 1.0f);
return Vec2(r * Cos(theta), r * Sin(theta));
}
inline void UniformSampleTriangle(float& u, float& v)
{
float r = Sqrt(Randf());
u = 1.0f - r;
v = Randf() * r;
}
inline Vec3 CosineSampleHemisphere()
{
Vec2 s = UniformSampleDisc();
float z = Sqrt(Max(0.0f, 1.0f - s.x*s.x - s.y*s.y));
return Vec3(s.x, s.y, z);
}
inline Vec3 SphericalToXYZ(float theta, float phi)
{
float cosTheta = cos(theta);
float sinTheta = sin(theta);
return Vec3(sin(phi)*sinTheta, cosTheta, cos(phi)*sinTheta);
}
// returns random vector between -range and range
inline Vec4 Randf(const Vec4 &range)
{
return Vec4(Randf(-range.x, range.x),
Randf(-range.y, range.y),
Randf(-range.z, range.z),
Randf(-range.w, range.w));
}
// generates a transform matrix with v as the z axis, taken from PBRT
inline void BasisFromVector(const Vec3& w, Vec3* u, Vec3* v)
{
if (fabsf(w.x) > fabsf(w.y))
{
float invLen = 1.0f / sqrtf(w.x*w.x + w.z*w.z);
*u = Vec3(-w.z*invLen, 0.0f, w.x*invLen);
}
else
{
float invLen = 1.0f / sqrtf(w.y*w.y + w.z*w.z);
*u = Vec3(0.0f, w.z*invLen, -w.y*invLen);
}
*v = Cross(w, *u);
assert(fabsf(Length(*u)-1.0f) < 0.01f);
assert(fabsf(Length(*v)-1.0f) < 0.01f);
}
// same as above but returns a matrix
inline Mat44 TransformFromVector(const Vec3& w, const Point3& t=Point3(0.0f, 0.0f, 0.0f))
{
Mat44 m = Mat44::kIdentity;
m.SetCol(2, Vec4(w.x, w.y, w.z, 0.0));
m.SetCol(3, Vec4(t.x, t.y, t.z, 1.0f));
BasisFromVector(w, (Vec3*)m.columns[0], (Vec3*)m.columns[1]);
return m;
}
// todo: sort out rotations
inline Mat44 ViewMatrix(const Point3& pos)
{
float view[4][4] = { { 1.0f, 0.0f, 0.0f, 0.0f },
{ 0.0f, 1.0f, 0.0f, 0.0f },
{ 0.0f, 0.0f, 1.0f, 0.0f },
{ -pos.x, -pos.y, -pos.z, 1.0f } };
return Mat44(&view[0][0]);
}
inline Mat44 LookAtMatrix(const Point3& viewer, const Point3& target)
{
// create a basis from viewer to target (OpenGL convention looking down -z)
Vec3 forward = -Normalize(target-viewer);
Vec3 up(0.0f, 1.0f, 0.0f);
Vec3 left = Normalize(Cross(up, forward));
up = Cross(forward, left);
float xform[4][4] = { { left.x, left.y, left.z, 0.0f },
{ up.x, up.y, up.z, 0.0f},
{ forward.x, forward.y, forward.z, 0.0f},
{ viewer.x, viewer.y, viewer.z, 1.0f} };
return AffineInverse(Mat44(&xform[0][0]));
}
// generate a rotation matrix around an axis, from PBRT p74
inline Mat44 RotationMatrix(float angle, const Vec3& axis)
{
Vec3 a = Normalize(axis);
float s = sinf(angle);
float c = cosf(angle);
float m[4][4];
m[0][0] = a.x * a.x + (1.0f - a.x * a.x) * c;
m[0][1] = a.x * a.y * (1.0f - c) + a.z * s;
m[0][2] = a.x * a.z * (1.0f - c) - a.y * s;
m[0][3] = 0.0f;
m[1][0] = a.x * a.y * (1.0f - c) - a.z * s;
m[1][1] = a.y * a.y + (1.0f - a.y * a.y) * c;
m[1][2] = a.y * a.z * (1.0f - c) + a.x * s;
m[1][3] = 0.0f;
m[2][0] = a.x * a.z * (1.0f - c) + a.y * s;
m[2][1] = a.y * a.z * (1.0f - c) - a.x * s;
m[2][2] = a.z * a.z + (1.0f - a.z * a.z) * c;
m[2][3] = 0.0f;
m[3][0] = 0.0f;
m[3][1] = 0.0f;
m[3][2] = 0.0f;
m[3][3] = 1.0f;
return Mat44(&m[0][0]);
}
inline Mat44 RotationMatrix(Quat q)
{
Matrix33 rotation(q);
Matrix44 m;
m.SetAxis(0, rotation.cols[0]);
m.SetAxis(1, rotation.cols[1]);
m.SetAxis(2, rotation.cols[2]);
m.SetTranslation(Point3(0.0f));
return m;
}
inline Mat44 TranslationMatrix(const Point3& t)
{
Mat44 m(Mat44::kIdentity);
m.SetTranslation(t);
return m;
}
inline Mat44 OrthographicMatrix(float left, float right, float bottom, float top, float n, float f)
{
float m[4][4] = { { 2.0f/(right-left), 0.0f, 0.0f, 0.0f },
{ 0.0f, 2.0f/(top-bottom), 0.0f, 0.0f },
{ 0.0f, 0.0f, -2.0f/(f-n), 0.0f },
{ -(right+left)/(right-left), -(top+bottom)/(top-bottom), -(f+n)/(f-n), 1.0f } };
return Mat44(&m[0][0]);
}
// this is designed as a drop in replacement for gluPerspective
inline Mat44 ProjectionMatrix(float fov, float aspect, float znear, float zfar)
{
float f = 1.0f / tanf(DegToRad(fov*0.5f));
float zd = znear-zfar;
float view[4][4] = { { f/aspect, 0.0f, 0.0f, 0.0f },
{ 0.0f, f, 0.0f, 0.0f },
{ 0.0f, 0.0f, (zfar+znear)/zd, -1.0f },
{ 0.0f, 0.0f, (2.0f*znear*zfar)/zd, 0.0f } };
return Mat44(&view[0][0]);
}
// encapsulates an orientation encoded in Euler angles, not the sexiest
// representation but it is convenient when manipulating objects from script
class Rotation
{
public:
Rotation() : yaw(0), pitch(0), roll(0) {}
Rotation(float inYaw, float inPitch, float inRoll) : yaw(inYaw), pitch(inPitch), roll(inRoll) {}
Rotation& operator +=(const Rotation& rhs) {yaw += rhs.yaw; pitch += rhs.pitch; roll += rhs.roll; return *this;}
Rotation& operator -=(const Rotation& rhs) {yaw -= rhs.yaw; pitch -= rhs.pitch; roll -= rhs.roll; return *this;}
Rotation operator + (const Rotation& rhs) const { Rotation lhs(*this); lhs += rhs; return lhs; }
Rotation operator - (const Rotation& rhs) const { Rotation lhs(*this); lhs -= rhs; return lhs; }
// all members are in degrees (easy editing)
float yaw;
float pitch;
float roll;
};
inline Mat44 ScaleMatrix(const Vector3& s)
{
float m[4][4] = { {s.x, 0.0f, 0.0f, 0.0f },
{ 0.0f, s.y, 0.0f, 0.0f},
{ 0.0f, 0.0f, s.z, 0.0f},
{ 0.0f, 0.0f, 0.0f, 1.0f} };
return Mat44(&m[0][0]);
}
// assumes yaw on y, then pitch on z, then roll on x
inline Mat44 TransformMatrix(const Rotation& r, const Point3& p)
{
const float yaw = DegToRad(r.yaw);
const float pitch = DegToRad(r.pitch);
const float roll = DegToRad(r.roll);
const float s1 = Sin(roll);
const float c1 = Cos(roll);
const float s2 = Sin(pitch);
const float c2 = Cos(pitch);
const float s3 = Sin(yaw);
const float c3 = Cos(yaw);
// interprets the angles as yaw around world-y, pitch around new z, roll around new x
float mr[4][4] = { { c2*c3, s2, -c2*s3, 0.0f},
{ s1*s3-c1*c3*s2, c1*c2, c3*s1+c1*s2*s3, 0.0f},
{ c3*s1*s2+c1*s3, -c2*s1, c1*c3-s1*s2*s3, 0.0f},
{ p.x, p.y, p.z, 1.0f} };
Mat44 m1(&mr[0][0]);
return m1;//m2 * m1;
}
class Transform
{
public:
Transform() {};
Transform(const Point3& p, const Rotation& r) : position(p), rotation(r) {}
Mat44 ToMatrix() const
{
return TransformMatrix(rotation, position);
}
// helper function to translate object
void Translate(const Vec3& delta)
{
position += delta;
}
// helper function to rotate an object
void Rotate(const Rotation& delta)
{
rotation += delta;
}
void RotateToLookAt(const Point3& target)
{
// get vector to point
Vec3 delta = target-position;
// yaw
rotation.yaw = atan2f(delta.z, delta.x);
rotation.pitch = atan2f(delta.y, sqrt(delta.x*delta.x+delta.z*delta.z));
rotation.roll = 0.0f;
}
Vec3 GetXAxis() const
{
return ToMatrix().columns[0];
}
Vec3 GetYAxis() const
{
return ToMatrix().columns[1];
}
Vec3 GetZAxis() const
{
return ToMatrix().columns[2];
}
Point3 position;
Rotation rotation;
};
// aligns the z axis along the vector
inline Rotation AlignToVector(const Vec3& vector)
{
// todo: fix, see spherical->cartesian coordinates wikipedia
return Rotation(0.0f, RadToDeg(atan2(vector.y, vector.x)), 0.0f);
}
// creates a vector given an angle measured clockwise from horizontal (1,0)
inline Vec2 AngleToVector(float a)
{
return Vec2(Cos(a), Sin(a));
}
inline float VectorToAngle(const Vec2& v)
{
return atan2f(v.y, v.x);
}
CUDA_CALLABLE inline float SmoothStep(float a, float b, float t)
{
t = Clamp(t-a / (b-a), 0.0f, 1.0f);
return t*t*(3.0f-2.0f*t);
}
// hermite spline interpolation
template <typename T>
T HermiteInterpolate(const T& a, const T& b, const T& t1, const T& t2, float t)
{
// blending weights
const float w1 = 1.0f - 3*t*t + 2*t*t*t;
const float w2 = t*t*(3.0f-2.0f*t);
const float w3 = t*t*t - 2*t*t + t;
const float w4 = t*t*(t-1.0f);
// return weighted combination
return a*w1 + b*w2 + t1*w3 + t2*w4;
}
template <typename T>
T HermiteTangent(const T& a, const T& b, const T& t1, const T& t2, float t)
{
// first derivative blend weights
const float w1 = 6.0f*t*t-6*t;
const float w2 = -6.0f*t*t + 6*t;
const float w3 = 3*t*t - 4*t + 1;
const float w4 = 3*t*t - 2*t;
// weighted combination
return a*w1 + b*w2 + t1*w3 + t2*w4;
}
template <typename T>
T HermiteSecondDerivative(const T& a, const T& b, const T& t1, const T& t2, float t)
{
// first derivative blend weights
const float w1 = 12*t - 6.0f;
const float w2 = -12.0f*t + 6;
const float w3 = 6*t - 4.0f;
const float w4 = 6*t - 2.0f;
// weighted combination
return a*w1 + b*w2 + t1*w3 + t2*w4;
}
inline float Log(float base, float x)
{
// calculate the log of a value for an arbitary base, only use if you can't use the standard bases (10, e)
return logf(x) / logf(base);
}
inline int Log2(int x)
{
int n = 0;
while (x >= 2)
{
++n;
x /= 2;
}
return n;
}
// function which maps a value to a range
template <typename T>
T RangeMap(T value, T lower, T upper)
{
assert(upper >= lower);
return (value-lower)/(upper-lower);
}
// simple colour class
class Colour
{
public:
enum Preset
{
kRed,
kGreen,
kBlue,
kWhite,
kBlack
};
Colour(float r_=0.0f, float g_=0.0f, float b_=0.0f, float a_=1.0f) : r(r_), g(g_), b(b_), a(a_) {}
Colour(float* p) : r(p[0]), g(p[1]), b(p[2]), a(p[3]) {}
Colour(uint32_t rgba)
{
a = ((rgba)&0xff)/255.0f;
r = ((rgba>>24)&0xff)/255.0f;
g = ((rgba>>16)&0xff)/255.0f;
b = ((rgba>>8)&0xff)/255.0f;
}
Colour(Preset p);
// cast operator
operator const float*() const { return &r; }
operator float*() { return &r; }
Colour operator * (float scale) const { Colour r(*this); r *= scale; return r; }
Colour operator / (float scale) const { Colour r(*this); r /= scale; return r; }
Colour operator + (const Colour& v) const { Colour r(*this); r += v; return r; }
Colour operator - (const Colour& v) const { Colour r(*this); r -= v; return r; }
Colour operator * (const Colour& scale) const { Colour r(*this); r *= scale; return r;}
Colour& operator *=(float scale) {r *= scale; g *= scale; b*= scale; a*= scale; return *this;}
Colour& operator /=(float scale) {float s(1.0f/scale); r *= s; g *= s; b *= s; a *=s; return *this;}
Colour& operator +=(const Colour& v) {r += v.r; g += v.g; b += v.b; a += v.a; return *this;}
Colour& operator -=(const Colour& v) {r -= v.r; g -= v.g; b -= v.b; a -= v.a; return *this;}
Colour& operator *=(const Colour& v) {r *= v.r; g *= v.g; b *= v.b; a *= v.a; return *this;}
float r, g, b, a;
};
inline bool operator == (const Colour& lhs, const Colour& rhs)
{
return lhs.r == rhs.r && lhs.g == rhs.g && lhs.b == rhs.b && lhs.a == rhs.a;
}
inline bool operator != (const Colour& lhs, const Colour& rhs)
{
return !(lhs == rhs);
}
inline Colour ToneMap(const Colour& s)
{
//return Colour(s.r / (s.r+1.0f), s.g / (s.g+1.0f), s.b / (s.b+1.0f), 1.0f);
float Y = 0.3333f*(s.r + s.g + s.b);
return s / (1.0f + Y);
}
// lhs scalar scale
inline Colour operator * (float lhs, const Colour& rhs)
{
Colour r(rhs);
r *= lhs;
return r;
}
inline Colour YxyToXYZ(float Y, float x, float y)
{
float X = x * (Y / y);
float Z = (1.0f - x - y) * Y / y;
return Colour(X, Y, Z, 1.0f);
}
inline Colour HSVToRGB( float h, float s, float v )
{
float r, g, b;
int i;
float f, p, q, t;
if( s == 0 ) {
// achromatic (grey)
r = g = b = v;
}
else
{
h *= 6.0f; // sector 0 to 5
i = int(floor( h ));
f = h - i; // factorial part of h
p = v * ( 1 - s );
q = v * ( 1 - s * f );
t = v * ( 1 - s * ( 1 - f ) );
switch( i ) {
case 0:
r = v;
g = t;
b = p;
break;
case 1:
r = q;
g = v;
b = p;
break;
case 2:
r = p;
g = v;
b = t;
break;
case 3:
r = p;
g = q;
b = v;
break;
case 4:
r = t;
g = p;
b = v;
break;
default: // case 5:
r = v;
g = p;
b = q;
break;
};
}
return Colour(r, g, b);
}
inline Colour XYZToLinear(float x, float y, float z)
{
float c[4];
c[0] = 3.240479f * x + -1.537150f * y + -0.498535f * z;
c[1] = -0.969256f * x + 1.875991f * y + 0.041556f * z;
c[2] = 0.055648f * x + -0.204043f * y + 1.057311f * z;
c[3] = 1.0f;
return Colour(c);
}
inline uint32_t ColourToRGBA8(const Colour& c)
{
union SmallColor
{
uint8_t u8[4];
uint32_t u32;
};
SmallColor s;
s.u8[0] = (uint8_t)(Clamp(c.r, 0.0f, 1.0f) * 255);
s.u8[1] = (uint8_t)(Clamp(c.g, 0.0f, 1.0f) * 255);
s.u8[2] = (uint8_t)(Clamp(c.b, 0.0f, 1.0f) * 255);
s.u8[3] = (uint8_t)(Clamp(c.a, 0.0f, 1.0f) * 255);
return s.u32;
}
inline Colour LinearToSrgb(const Colour& c)
{
const float kInvGamma = 1.0f/2.2f;
return Colour(powf(c.r, kInvGamma), powf(c.g, kInvGamma), powf(c.b, kInvGamma), c.a);
}
inline Colour SrgbToLinear(const Colour& c)
{
const float kInvGamma = 2.2f;
return Colour(powf(c.r, kInvGamma), powf(c.g, kInvGamma), powf(c.b, kInvGamma), c.a);
}
// intersection routines
inline bool IntersectRaySphere(const Point3& sphereOrigin, float sphereRadius, const Point3& rayOrigin, const Vec3& rayDir, float& t, Vec3* hitNormal=NULL)
{
Vec3 d(sphereOrigin-rayOrigin);
float deltaSq = LengthSq(d);
float radiusSq = sphereRadius*sphereRadius;
// if the origin is inside the sphere return no intersection
if (deltaSq > radiusSq)
{
float dprojr = Dot(d, rayDir);
// if ray pointing away from sphere no intersection
if (dprojr < 0.0f)
return false;
// bit of Pythagoras to get closest point on ray
float dSq = deltaSq-dprojr*dprojr;
if (dSq > radiusSq)
return false;
else
{
// length of the half cord
float thc = sqrt(radiusSq-dSq);
// closest intersection
t = dprojr - thc;
// calculate normal if requested
if (hitNormal)
*hitNormal = Normalize((rayOrigin+rayDir*t)-sphereOrigin);
return true;
}
}
else
{
return false;
}
}
template <typename T>
CUDA_CALLABLE inline bool SolveQuadratic(T a, T b, T c, T& minT, T& maxT)
{
if (a == 0.0f && b == 0.0f)
{
minT = maxT = 0.0f;
return true;
}
T discriminant = b*b - T(4.0)*a*c;
if (discriminant < 0.0f)
{
return false;
}
// numerical receipes 5.6 (this method ensures numerical accuracy is preserved)
T t = T(-0.5) * (b + Sign(b)*Sqrt(discriminant));
minT = t / a;
maxT = c / t;
if (minT > maxT)
{
Swap(minT, maxT);
}
return true;
}
// alternative ray sphere intersect, returns closest and furthest t values
inline bool IntersectRaySphere(const Point3& sphereOrigin, float sphereRadius, const Point3& rayOrigin, const Vector3& rayDir, float& minT, float &maxT, Vec3* hitNormal=NULL)
{
Vector3 q = rayOrigin-sphereOrigin;
float a = 1.0f;
float b = 2.0f*Dot(q, rayDir);
float c = Dot(q, q)-(sphereRadius*sphereRadius);
bool r = SolveQuadratic(a, b, c, minT, maxT);
if (minT < 0.0)
minT = 0.0f;
// calculate the normal of the closest hit
if (hitNormal && r)
{
*hitNormal = Normalize((rayOrigin+rayDir*minT)-sphereOrigin);
}
return r;
}
inline bool IntersectRayPlane(const Point3& p, const Vector3& dir, const Plane& plane, float& t)
{
float d = Dot(plane, dir);
if (d == 0.0f)
{
return false;
}
else
{
t = -Dot(plane, p) / d;
}
return (t > 0.0f);
}
inline bool IntersectLineSegmentPlane(const Vec3& start, const Vec3& end, const Plane& plane, Vec3& out)
{
Vec3 u(end - start);
float dist = -Dot(plane, start) / Dot(plane, u);
if (dist > 0.0f && dist < 1.0f)
{
out = (start + u * dist);
return true;
}
else
return false;
}
// Moller and Trumbore's method
inline bool IntersectRayTriTwoSided(const Vec3& p, const Vec3& dir, const Vec3& a, const Vec3& b, const Vec3& c, float& t, float& u, float& v, float& w, float& sign)//Vec3* normal)
{
Vector3 ab = b - a;
Vector3 ac = c - a;
Vector3 n = Cross(ab, ac);
float d = Dot(-dir, n);
float ood = 1.0f / d; // No need to check for division by zero here as infinity aritmetic will save us...
Vector3 ap = p - a;
t = Dot(ap, n) * ood;
if (t < 0.0f)
return false;
Vector3 e = Cross(-dir, ap);
v = Dot(ac, e) * ood;
if (v < 0.0f || v > 1.0f) // ...here...
return false;
w = -Dot(ab, e) * ood;
if (w < 0.0f || v + w > 1.0f) // ...and here
return false;
u = 1.0f - v - w;
//if (normal)
//*normal = n;
sign = d;
return true;
}
// mostly taken from Real Time Collision Detection - p192
inline bool IntersectRayTri(const Point3& p, const Vec3& dir, const Point3& a, const Point3& b, const Point3& c, float& t, float& u, float& v, float& w, Vec3* normal)
{
const Vec3 ab = b-a;
const Vec3 ac = c-a;
// calculate normal
Vec3 n = Cross(ab, ac);
// need to solve a system of three equations to give t, u, v
float d = Dot(-dir, n);
// if dir is parallel to triangle plane or points away from triangle
if (d <= 0.0f)
return false;
Vec3 ap = p-a;
t = Dot(ap, n);
// ignores tris behind
if (t < 0.0f)
return false;
// compute barycentric coordinates
Vec3 e = Cross(-dir, ap);
v = Dot(ac, e);
if (v < 0.0f || v > d) return false;
w = -Dot(ab, e);
if (w < 0.0f || v + w > d) return false;
float ood = 1.0f / d;
t *= ood;
v *= ood;
w *= ood;
u = 1.0f-v-w;
// optionally write out normal (todo: this branch is a performance concern, should probably remove)
if (normal)
*normal = n;
return true;
}
//mostly taken from Real Time Collision Detection - p192
CUDA_CALLABLE inline bool IntersectSegmentTri(const Vec3& p, const Vec3& q, const Vec3& a, const Vec3& b, const Vec3& c, float& t, float& u, float& v, float& w, Vec3* normal, float expand)
{
const Vec3 ab = b-a;
const Vec3 ac = c-a;
const Vec3 qp = p-q;
// calculate normal
Vec3 n = Cross(ab, ac);
// need to solve a system of three equations to give t, u, v
float d = Dot(qp, n);
// if dir is parallel to triangle plane or points away from triangle
if (d <= 0.0f)
return false;
Vec3 ap = p-a;
t = Dot(ap, n);
// ignores tris behind
if (t < 0.0f)
return false;
// ignores tris beyond segment
if (t > d)
return false;
// compute barycentric coordinates
Vec3 e = Cross(qp, ap);
v = Dot(ac, e);
if (v < 0.0f || v > d) return false;
w = -Dot(ab, e);
if (w < 0.0f || v + w > d) return false;
float ood = 1.0f / d;
t *= ood;
v *= ood;
w *= ood;
u = 1.0f-v-w;
// optionally write out normal (todo: this branch is a performance concern, should probably remove)
if (normal)
*normal = n;
return true;
}
CUDA_CALLABLE inline float ScalarTriple(const Vec3& a, const Vec3& b, const Vec3& c) { return Dot(Cross(a, b), c); }
// intersects a line (through points p and q, against a triangle a, b, c - mostly taken from Real Time Collision Detection - p186
CUDA_CALLABLE inline bool IntersectLineTri(const Vec3& p, const Vec3& q, const Vec3& a, const Vec3& b, const Vec3& c)//, float& t, float& u, float& v, float& w, Vec3* normal, float expand)
{
const Vec3 pq = q-p;
const Vec3 pa = a-p;
const Vec3 pb = b-p;
const Vec3 pc = c-p;
Vec3 m = Cross(pq, pc);
float u = Dot(pb, m);
if (u< 0.0f) return false;
float v = -Dot(pa, m);
if (v < 0.0f) return false;
float w = ScalarTriple(pq, pb, pa);
if (w < 0.0f) return false;
return true;
}
CUDA_CALLABLE inline Vec3 ClosestPointToAABB(const Vec3& p, const Vec3& lower, const Vec3& upper)
{
Vec3 c;
for (int i=0; i < 3; ++i)
{
float v = p[i];
if (v < lower[i]) v = lower[i];
if (v > upper[i]) v = upper[i];
c[i] = v;
}
return c;
}
// RTCD 5.1.5, page 142
CUDA_CALLABLE inline Vec3 ClosestPointOnTriangle(const Vec3& a, const Vec3& b, const Vec3& c, const Vec3& p, float& v, float& w)
{
Vec3 ab = b-a;
Vec3 ac = c-a;
Vec3 ap = p-a;
float d1 = Dot(ab, ap);
float d2 = Dot(ac, ap);
if (d1 <= 0.0f && d2 <= 0.0f)
{
v = 0.0f;
w = 0.0f;
return a;
}
Vec3 bp = p-b;
float d3 = Dot(ab, bp);
float d4 = Dot(ac, bp);
if (d3 >= 0.0f && d4 <= d3)
{
v = 1.0f;
w = 0.0f;
return b;
}
float vc = d1*d4 - d3*d2;
if (vc <= 0.0f && d1 >= 0.0f && d3 <= 0.0f)
{
v = d1 / (d1-d3);
w = 0.0f;
return a + v*ab;
}
Vec3 cp =p-c;
float d5 = Dot(ab, cp);
float d6 = Dot(ac, cp);
if (d6 >= 0.0f && d5 <= d6)
{
v = 0.0f;
w = 1.0f;
return c;
}
float vb = d5*d2 - d1*d6;
if (vb <= 0.0f && d2 >= 0.0f && d6 <= 0.0f)
{
v = 0.0f;
w = d2 / (d2 - d6);
return a + w * ac;
}
float va = d3*d6 - d5*d4;
if (va <= 0.0f && (d4 -d3) >= 0.0f && (d5-d6) >= 0.0f)
{
w = (d4-d3)/((d4-d3) + (d5-d6));
v = 1.0f-w;
return b + w * (c-b);
}
float denom = 1.0f / (va + vb + vc);
v = vb * denom;
w = vc * denom;
return a + ab*v + ac*w;
}
CUDA_CALLABLE inline float SqDistPointSegment(Vec3 a, Vec3 b, Vec3 c)
{
Vec3 ab = b-a, ac=c-a, bc=c-b;
float e = Dot(ac, ab);
if (e <= 0.0f)
return Dot(ac, ac);
float f = Dot(ab, ab);
if (e >= f)
return Dot(bc, bc);
return Dot(ac, ac) - e*e/f;
}
CUDA_CALLABLE inline bool PointInTriangle(Vec3 a, Vec3 b, Vec3 c, Vec3 p)
{
a -= p; b -= p; c-= p;
/*
float eps = 0.0f;
float ab = Dot(a, b);
float ac = Dot(a, c);
float bc = Dot(b, c);
float cc = Dot(c, c);
if (bc *ac - cc * ab <= eps)
return false;
float bb = Dot(b, b);
if (ab * bc - ac*bb <= eps)
return false;
return true;
*/
Vec3 u = Cross(b, c);
Vec3 v = Cross(c, a);
if (Dot(u, v) <= 0.0f)
return false;
Vec3 w = Cross(a, b);
if (Dot(u, w) <= 0.0f)
return false;
return true;
}
CUDA_CALLABLE inline void ClosestPointBetweenLineSegments(const Vec3& p, const Vec3& q, const Vec3& r, const Vec3& s, float& u, float& v)
{
Vec3 d1 = q-p;
Vec3 d2 = s-r;
Vec3 rp = p-r;
float a = Dot(d1, d1);
float c = Dot(d1, rp);
float e = Dot(d2, d2);
float f = Dot(d2, rp);
float b = Dot(d1, d2);
float denom = a*e - b*b;
if (denom != 0.0f)
u = Clamp((b*f - c*e)/denom, 0.0f, 1.0f);
else
{
u = 0.0f;
}
v = (b*u + f)/e;
if (v < 0.0f)
{
v = 0.0f;
u = Clamp(-c/a, 0.0f, 1.0f);
}
else if (v > 1.0f)
{
v = 1.0f;
u = Clamp((b-c)/a, 0.0f, 1.0f);
}
}
CUDA_CALLABLE inline float minf(const float a, const float b) { return a < b ? a : b; }
CUDA_CALLABLE inline float maxf(const float a, const float b) { return a > b ? a : b; }
CUDA_CALLABLE inline bool IntersectRayAABBOmpf(const Vec3& pos, const Vector3& rcp_dir, const Vector3& min, const Vector3& max, float& t) {
float
l1 = (min.x - pos.x) * rcp_dir.x,
l2 = (max.x - pos.x) * rcp_dir.x,
lmin = minf(l1,l2),
lmax = maxf(l1,l2);
l1 = (min.y - pos.y) * rcp_dir.y;
l2 = (max.y - pos.y) * rcp_dir.y;
lmin = maxf(minf(l1,l2), lmin);
lmax = minf(maxf(l1,l2), lmax);
l1 = (min.z - pos.z) * rcp_dir.z;
l2 = (max.z - pos.z) * rcp_dir.z;
lmin = maxf(minf(l1,l2), lmin);
lmax = minf(maxf(l1,l2), lmax);
//return ((lmax > 0.f) & (lmax >= lmin));
//return ((lmax > 0.f) & (lmax > lmin));
bool hit = ((lmax >= 0.f) & (lmax >= lmin));
if (hit)
t = lmin;
return hit;
}
CUDA_CALLABLE inline bool IntersectRayAABB(const Vec3& start, const Vector3& dir, const Vector3& min, const Vector3& max, float& t, Vector3* normal)
{
//! calculate candidate plane on each axis
float tx = -1.0f, ty = -1.0f, tz = -1.0f;
bool inside = true;
//! use unrolled loops
//! x
if (start.x < min.x)
{
if (dir.x != 0.0f)
tx = (min.x-start.x)/dir.x;
inside = false;
}
else if (start.x > max.x)
{
if (dir.x != 0.0f)
tx = (max.x-start.x)/dir.x;
inside = false;
}
//! y
if (start.y < min.y)
{
if (dir.y != 0.0f)
ty = (min.y-start.y)/dir.y;
inside = false;
}
else if (start.y > max.y)
{
if (dir.y != 0.0f)
ty = (max.y-start.y)/dir.y;
inside = false;
}
//! z
if (start.z < min.z)
{
if (dir.z != 0.0f)
tz = (min.z-start.z)/dir.z;
inside = false;
}
else if (start.z > max.z)
{
if (dir.z != 0.0f)
tz = (max.z-start.z)/dir.z;
inside = false;
}
//! if point inside all planes
if (inside)
{
t = 0.0f;
return true;
}
//! we now have t values for each of possible intersection planes
//! find the maximum to get the intersection point
float tmax = tx;
int taxis = 0;
if (ty > tmax)
{
tmax = ty;
taxis = 1;
}
if (tz > tmax)
{
tmax = tz;
taxis = 2;
}
if (tmax < 0.0f)
return false;
//! check that the intersection point lies on the plane we picked
//! we don't test the axis of closest intersection for precision reasons
//! no eps for now
float eps = 0.0f;
Vec3 hit = start + dir*tmax;
if ((hit.x < min.x-eps || hit.x > max.x+eps) && taxis != 0)
return false;
if ((hit.y < min.y-eps || hit.y > max.y+eps) && taxis != 1)
return false;
if ((hit.z < min.z-eps || hit.z > max.z+eps) && taxis != 2)
return false;
//! output results
t = tmax;
return true;
}
// construct a plane equation such that ax + by + cz + dw = 0
CUDA_CALLABLE inline Vec4 PlaneFromPoints(const Vec3& p, const Vec3& q, const Vec3& r)
{
Vec3 e0 = q-p;
Vec3 e1 = r-p;
Vec3 n = SafeNormalize(Cross(e0, e1));
return Vec4(n.x, n.y, n.z, -Dot(p, n));
}
CUDA_CALLABLE inline bool IntersectPlaneAABB(const Vec4& plane, const Vec3& center, const Vec3& extents)
{
float radius = Abs(extents.x*plane.x) + Abs(extents.y*plane.y) + Abs(extents.z*plane.z);
float delta = Dot(center, Vec3(plane)) + plane.w;
return Abs(delta) <= radius;
}
// 2d rectangle class
class Rect
{
public:
Rect() : m_left(0), m_right(0), m_top(0), m_bottom(0) {}
Rect(uint32_t left, uint32_t right, uint32_t top, uint32_t bottom) : m_left(left), m_right(right), m_top(top), m_bottom(bottom)
{
assert(left <= right);
assert(top <= bottom);
}
uint32_t Width() const { return m_right - m_left; }
uint32_t Height() const { return m_bottom - m_top; }
// expand rect x units in each direction
void Expand(uint32_t x)
{
m_left -= x;
m_right += x;
m_top -= x;
m_bottom += x;
}
uint32_t Left() const { return m_left; }
uint32_t Right() const { return m_right; }
uint32_t Top() const { return m_top; }
uint32_t Bottom() const { return m_bottom; }
bool Contains(uint32_t x, uint32_t y) const
{
return (x >= m_left) && (x <= m_right) && (y >= m_top) && (y <= m_bottom);
}
uint32_t m_left;
uint32_t m_right;
uint32_t m_top;
uint32_t m_bottom;
};
// doesn't really belong here but efficient (and I believe correct) in place random shuffle based on the Fisher-Yates / Knuth algorithm
template <typename T>
void RandomShuffle(T begin, T end)
{
assert(end > begin);
uint32_t n = distance(begin, end);
for (uint32_t i=0; i < n; ++i)
{
// pick a random number between 0 and n-1
uint32_t r = Rand() % (n-i);
// swap that location with the current randomly selected position
swap(*(begin+i), *(begin+(i+r)));
}
}
CUDA_CALLABLE inline Quat QuatFromAxisAngle(const Vec3& axis, float angle)
{
Vec3 v = Normalize(axis);
float half = angle*0.5f;
float w = cosf(half);
const float sin_theta_over_two = sinf(half);
v *= sin_theta_over_two;
return Quat(v.x, v.y, v.z, w);
}
// rotate by quaternion (q, w)
CUDA_CALLABLE inline Vec3 rotate(const Vec3& q, float w, const Vec3& x)
{
return 2.0f*(x*(w*w-0.5f) + Cross(q, x)*w + q*Dot(q, x));
}
// rotate x by inverse transform in (q, w)
CUDA_CALLABLE inline Vec3 rotateInv(const Vec3& q, float w, const Vec3& x)
{
return 2.0f*(x*(w*w-0.5f) - Cross(q, x)*w + q*Dot(q, x));
}
CUDA_CALLABLE inline void TransformBounds(const Quat& q, Vec3 extents, Vec3& newExtents)
{
Matrix33 transform(q);
transform.cols[0] *= extents.x;
transform.cols[1] *= extents.y;
transform.cols[2] *= extents.z;
float ex = fabsf(transform.cols[0].x) + fabsf(transform.cols[1].x) + fabsf(transform.cols[2].x);
float ey = fabsf(transform.cols[0].y) + fabsf(transform.cols[1].y) + fabsf(transform.cols[2].y);
float ez = fabsf(transform.cols[0].z) + fabsf(transform.cols[1].z) + fabsf(transform.cols[2].z);
newExtents = Vec3(ex, ey, ez);
}
CUDA_CALLABLE inline void TransformBounds(const Vec3& localLower, const Vec3& localUpper, const Vec3& translation, const Quat& rotation, float scale, Vec3& lower, Vec3& upper)
{
Matrix33 transform(rotation);
Vec3 extents = (localUpper-localLower)*scale;
transform.cols[0] *= extents.x;
transform.cols[1] *= extents.y;
transform.cols[2] *= extents.z;
float ex = fabsf(transform.cols[0].x) + fabsf(transform.cols[1].x) + fabsf(transform.cols[2].x);
float ey = fabsf(transform.cols[0].y) + fabsf(transform.cols[1].y) + fabsf(transform.cols[2].y);
float ez = fabsf(transform.cols[0].z) + fabsf(transform.cols[1].z) + fabsf(transform.cols[2].z);
Vec3 center = (localUpper+localLower)*0.5f*scale;
lower = rotation*center + translation - Vec3(ex, ey, ez)*0.5f;
upper = rotation*center + translation + Vec3(ex, ey, ez)*0.5f;
}
// Poisson sample the volume of a sphere with given separation
inline int PoissonSample3D(float radius, float separation, Vec3* points, int maxPoints, int maxAttempts)
{
// naive O(n^2) dart throwing algorithm to generate a Poisson distribution
int c = 0;
while (c < maxPoints)
{
int a = 0;
while (a < maxAttempts)
{
const Vec3 p = UniformSampleSphereVolume()*radius;
// test against points already generated
int i=0;
for (; i < c; ++i)
{
Vec3 d = p-points[i];
// reject if closer than separation
if (LengthSq(d) < separation*separation)
break;
}
// sample passed all tests, accept
if (i == c)
{
points[c] = p;
++c;
break;
}
++a;
}
// exit if we reached the max attempts and didn't manage to add a point
if (a == maxAttempts)
break;
}
return c;
}
// Generates an optimally dense sphere packing at the origin (implicit sphere at the origin)
inline int TightPack3D(float radius, float separation, Vec3* points, int maxPoints)
{
int dim = int(ceilf(radius/separation));
int c = 0;
for (int z=-dim; z <= dim; ++z)
{
for (int y=-dim; y <= dim; ++y)
{
for (int x=-dim; x <= dim; ++x)
{
float xpos = x*separation + (((y+z)&1)?separation*0.5f:0.0f);
float ypos = y*sqrtf(0.75f)*separation;
float zpos = z*sqrtf(0.75f)*separation;
Vec3 p(xpos, ypos, zpos);
// skip center
if (LengthSq(p) == 0.0f)
continue;
if (c < maxPoints && Length(p) <= radius)
{
points[c] = p;
++c;
}
}
}
}
return c;
}
struct Bounds
{
CUDA_CALLABLE inline Bounds() : lower( FLT_MAX)
, upper(-FLT_MAX) {}
CUDA_CALLABLE inline Bounds(const Vec3& lower, const Vec3& upper) : lower(lower), upper(upper) {}
CUDA_CALLABLE inline Vec3 GetCenter() const { return 0.5f*(lower+upper); }
CUDA_CALLABLE inline Vec3 GetEdges() const { return upper-lower; }
CUDA_CALLABLE inline void Expand(float r)
{
lower -= Vec3(r);
upper += Vec3(r);
}
CUDA_CALLABLE inline void Expand(const Vec3& r)
{
lower -= r;
upper += r;
}
CUDA_CALLABLE inline bool Empty() const { return lower.x >= upper.x || lower.y >= upper.y || lower.z >= upper.z; }
CUDA_CALLABLE inline bool Overlaps(const Vec3& p) const
{
if (p.x < lower.x ||
p.y < lower.y ||
p.z < lower.z ||
p.x > upper.x ||
p.y > upper.y ||
p.z > upper.z)
{
return false;
}
else
{
return true;
}
}
CUDA_CALLABLE inline bool Overlaps(const Bounds& b) const
{
if (lower.x > b.upper.x ||
lower.y > b.upper.y ||
lower.z > b.upper.z ||
upper.x < b.lower.x ||
upper.y < b.lower.y ||
upper.z < b.lower.z)
{
return false;
}
else
{
return true;
}
}
Vec3 lower;
Vec3 upper;
};
CUDA_CALLABLE inline Bounds Union(const Bounds& a, const Vec3& b)
{
return Bounds(Min(a.lower, b), Max(a.upper, b));
}
CUDA_CALLABLE inline Bounds Union(const Bounds& a, const Bounds& b)
{
return Bounds(Min(a.lower, b.lower), Max(a.upper, b.upper));
}
CUDA_CALLABLE inline Bounds Intersection(const Bounds& a, const Bounds& b)
{
return Bounds(Max(a.lower, b.lower), Min(a.upper, b.upper));
}
================================================
FILE: core/matnn.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
template <int m, int n, typename T=double>
class XMatrix
{
public:
XMatrix()
{
memset(data, 0, sizeof(*this));
}
XMatrix(const XMatrix<m, n>& a)
{
memcpy(data, a.data, sizeof(*this));
}
template <typename OtherT>
XMatrix(const OtherT* ptr)
{
for (int j=0; j < n; ++j)
for (int i=0; i < m; ++i)
data[j][i] = *(ptr++);
}
const XMatrix<m,n>& operator=(const XMatrix<m,n>& a)
{
memcpy(data, a.data, sizeof(*this));
return *this;
}
template <typename OtherT>
void SetCol(int j, const XMatrix<m, 1, OtherT>& c)
{
for (int i=0; i < m; ++i)
data[j][i] = c(i, 0);
}
template <typename OtherT>
void SetRow(int i, const XMatrix<1, n, OtherT>& r)
{
for (int j=0; j < m; ++j)
data[j][i] = r(0, j);
}
T& operator()(int row, int col) { return data[col][row]; }
const T& operator()(int row, int col) const { return data[col][row]; }
void SetIdentity()
{
for (int i=0; i < m; ++i)
{
for (int j=0; j < n; ++j)
{
if (i == j)
data[i][j] = 1.0;
else
data[i][j] = 0.0;
}
}
}
// column major storage
T data[n][m];
};
template <int m, int n, typename T>
XMatrix<m, n, T> operator-(const XMatrix<m, n, T>& lhs, const XMatrix<m, n, T>& rhs)
{
XMatrix<m, n> d;
for (int i=0; i < m; ++i)
for (int j=0; j < n; ++j)
d(i, j) = lhs(i,j)-rhs(i,j);
return d;
}
template <int m, int n, typename T>
XMatrix<m, n, T> operator+(const XMatrix<m, n, T>& lhs, const XMatrix<m, n, T>& rhs)
{
XMatrix<m, n> d;
for (int i=0; i < m; ++i)
for (int j=0; j < n; ++j)
d(i, j) = lhs(i,j)+rhs(i,j);
return d;
}
template <int m, int n, int o, typename T>
XMatrix<m, o> Multiply(const XMatrix<m, n, T>& lhs, const XMatrix<n, o, T>& rhs)
{
XMatrix<m, o> ret;
for (int i=0; i < m; ++i)
{
for (int j=0; j < o; ++j)
{
T sum = 0.0f;
for (int k=0; k < n; ++k)
{
sum += lhs(i, k)*rhs(k, j);
}
ret(i, j) = sum;
}
}
return ret;
}
template <int m, int n>
XMatrix<n, m> Transpose(const XMatrix<m, n>& a)
{
XMatrix<n, m> ret;
for (int i=0; i < m; ++i)
{
for (int j=0; j < n; ++j)
{
ret(j, i) = a(i, j);
}
}
return ret;
}
// matrix to swap row i and j when multiplied on the right
template <int n>
XMatrix<n,n> Permutation(int i, int j)
{
XMatrix<n, n> m;
m.SetIdentity();
m(i, i) = 0.0;
m(i, j) = 1.0;
m(j, j) = 0.0;
m(j, i) = 1.0;
return m;
}
template <int m, int n>
void PrintMatrix(const char* name, XMatrix<m, n> a)
{
printf("%s = [\n", name);
for (int i=0; i < m; ++i)
{
printf ("[ ");
for (int j=0; j < n; ++j)
{
printf("% .4f", float(a(i, j)));
if (j < n-1)
printf(" ");
}
printf(" ]\n");
}
printf("]\n");
}
template <int n, typename T>
XMatrix<n, n, T> LU(const XMatrix<n ,n, T>& m, XMatrix<n,n, T>& L)
{
XMatrix<n,n> U = m;
L.SetIdentity();
// for each row
for (int j=0; j < n; ++j)
{
XMatrix<n,n> Li, LiInv;
Li.SetIdentity();
LiInv.SetIdentity();
T pivot = U(j, j);
if (pivot == 0.0)
return U;
assert(pivot != 0.0);
// zero our all entries below pivot
for (int i=j+1; i < n; ++i)
{
T l = -U(i, j)/pivot;
Li(i,j) = l;
// create inverse of L1..Ln as we go (this is L)
L(i,j) = -l;
}
U = Multiply(Li, U);
}
return U;
}
template <int m, typename T>
XMatrix<m, 1, T> Solve(const XMatrix<m, m, T>& L, const XMatrix<m, m, T>& U, const XMatrix<m, 1, T>& b)
{
XMatrix<m, 1> y;
XMatrix<m, 1> x;
// Ly = b (forward substitution)
for (int i=0; i < m; ++i)
{
T sum = 0.0;
for (int j=0; j < i; ++j)
{
sum += y(j, 0)*L(i, j);
}
assert(L(i,i) != 0.0);
y(i, 0) = (b(i,0) - sum) / L(i, i);
}
// Ux = y (back substitution)
for (int i=m-1; i >= 0; --i)
{
T sum = 0.0;
for (int j=i+1; j < m; ++j)
{
sum += x(j, 0)*U(i, j);
}
assert(U(i,i) != 0.0);
x(i, 0) = (y(i, 0) - sum) / U(i,i);
}
return x;
}
template <int n, typename T>
T Determinant(const XMatrix<n, n, T>& A, XMatrix<n, n, T>& L, XMatrix<n, n, T>& U)
{
U = LU(A, L);
// determinant is the product of diagonal entries of U (assume L has 1s on diagonal)
T det = 1.0;
for (int i=0; i < n; ++i)
det *= U(i, i);
return det;
}
template <int n, typename T>
XMatrix<n, n, T> Inverse(const XMatrix<n, n, T>& A, T& det)
{
XMatrix<n,n> L, U;
det = Determinant(A, L, U);
XMatrix<n,n> Inv;
if (det != 0.0f)
{
for (int i=0; i < n; ++i)
{
// solve for each column of the identity matrix
XMatrix<n, 1> I;
I(i, 0) = 1.0;
XMatrix<n, 1> x = Solve(L, U, I);
Inv.SetCol(i, x);
}
}
return Inv;
}
template <int m, int n, typename T>
T FrobeniusNorm(const XMatrix<m, n, T>& A)
{
T sum = 0.0;
for (int i=0; i < m; ++i)
for (int j=0; j < n; ++j)
sum += A(i,j)*A(i,j);
return sqrt(sum);
}
================================================
FILE: core/mesh.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "mesh.h"
#include "platform.h"
#include <map>
#include <fstream>
#include <iostream>
using namespace std;
void Mesh::DuplicateVertex(uint32_t i)
{
assert(m_positions.size() > i);
m_positions.push_back(m_positions[i]);
if (m_normals.size() > i)
m_normals.push_back(m_normals[i]);
if (m_colours.size() > i)
m_colours.push_back(m_colours[i]);
if (m_texcoords[0].size() > i)
m_texcoords[0].push_back(m_texcoords[0][i]);
if (m_texcoords[1].size() > i)
m_texcoords[1].push_back(m_texcoords[1][i]);
}
void Mesh::Normalize(float s)
{
Vec3 lower, upper;
GetBounds(lower, upper);
Vec3 edges = upper-lower;
Transform(TranslationMatrix(Point3(-lower)));
float maxEdge = max(edges.x, max(edges.y, edges.z));
Transform(ScaleMatrix(s/maxEdge));
}
void Mesh::CalculateNormals()
{
m_normals.resize(0);
m_normals.resize(m_positions.size());
int numTris = int(GetNumFaces());
for (int i=0; i < numTris; ++i)
{
int a = m_indices[i*3+0];
int b = m_indices[i*3+1];
int c = m_indices[i*3+2];
Vec3 n = Cross(m_positions[b]-m_positions[a], m_positions[c]-m_positions[a]);
m_normals[a] += n;
m_normals[b] += n;
m_normals[c] += n;
}
int numVertices = int(GetNumVertices());
for (int i=0; i < numVertices; ++i)
m_normals[i] = ::Normalize(m_normals[i]);
}
namespace
{
enum PlyFormat
{
eAscii,
eBinaryBigEndian
};
template <typename T>
T PlyRead(ifstream& s, PlyFormat format)
{
T data = eAscii;
switch (format)
{
case eAscii:
{
s >> data;
break;
}
case eBinaryBigEndian:
{
char c[sizeof(T)];
s.read(c, sizeof(T));
reverse(c, c+sizeof(T));
data = *(T*)c;
break;
}
default:
assert(0);
}
return data;
}
} // namespace anonymous
Mesh* ImportMesh(const char* path)
{
std::string ext = GetExtension(path);
Mesh* mesh = NULL;
if (ext == "ply")
mesh = ImportMeshFromPly(path);
else if (ext == "obj")
mesh = ImportMeshFromObj(path);
return mesh;
}
Mesh* ImportMeshFromBin(const char* path)
{
double start = GetSeconds();
FILE* f = fopen(path, "rb");
if (f)
{
int numVertices;
int numIndices;
size_t len;
len = fread(&numVertices, sizeof(numVertices), 1, f);
len = fread(&numIndices, sizeof(numIndices), 1, f);
Mesh* m = new Mesh();
m->m_positions.resize(numVertices);
m->m_normals.resize(numVertices);
m->m_indices.resize(numIndices);
len = fread(&m->m_positions[0], sizeof(Vec3)*numVertices, 1, f);
len = fread(&m->m_normals[0], sizeof(Vec3)*numVertices, 1, f);
len = fread(&m->m_indices[0], sizeof(int)*numIndices, 1, f);
(void)len;
fclose(f);
double end = GetSeconds();
printf("Imported mesh %s in %f ms\n", path, (end-start)*1000.0f);
return m;
}
return NULL;
}
void ExportMeshToBin(const char* path, const Mesh* m)
{
FILE* f = fopen(path, "wb");
if (f)
{
int numVertices = int(m->m_positions.size());
int numIndices = int(m->m_indices.size());
fwrite(&numVertices, sizeof(numVertices), 1, f);
fwrite(&numIndices, sizeof(numIndices), 1, f);
// write data blocks
fwrite(&m->m_positions[0], sizeof(Vec3)*numVertices, 1, f);
fwrite(&m->m_normals[0], sizeof(Vec3)*numVertices, 1, f);
fwrite(&m->m_indices[0], sizeof(int)*numIndices, 1, f);
fclose(f);
}
}
Mesh* ImportMeshFromPly(const char* path)
{
ifstream file(path, ios_base::in | ios_base::binary);
if (!file)
return NULL;
// some scratch memory
const uint32_t kMaxLineLength = 1024;
char buffer[kMaxLineLength];
//double startTime = GetSeconds();
file >> buffer;
if (strcmp(buffer, "ply") != 0)
return NULL;
PlyFormat format = eAscii;
uint32_t numFaces = 0;
uint32_t numVertices = 0;
const uint32_t kMaxProperties = 16;
uint32_t numProperties = 0;
float properties[kMaxProperties];
bool vertexElement = false;
while (file)
{
file >> buffer;
if (strcmp(buffer, "element") == 0)
{
file >> buffer;
if (strcmp(buffer, "face") == 0)
{
vertexElement = false;
file >> numFaces;
}
else if (strcmp(buffer, "vertex") == 0)
{
vertexElement = true;
file >> numVertices;
}
}
else if (strcmp(buffer, "format") == 0)
{
file >> buffer;
if (strcmp(buffer, "ascii") == 0)
{
format = eAscii;
}
else if (strcmp(buffer, "binary_big_endian") == 0)
{
format = eBinaryBigEndian;
}
else
{
printf("Ply: unknown format\n");
return NULL;
}
}
else if (strcmp(buffer, "property") == 0)
{
if (vertexElement)
++numProperties;
}
else if (strcmp(buffer, "end_header") == 0)
{
break;
}
}
// eat newline
char nl;
file.read(&nl, 1);
// debug
#if ENABLE_VERBOSE_OUTPUT
printf ("Loaded mesh: %s numFaces: %d numVertices: %d format: %d numProperties: %d\n", path, numFaces, numVertices, format, numProperties);
#endif
Mesh* mesh = new Mesh;
mesh->m_positions.resize(numVertices);
mesh->m_normals.resize(numVertices);
mesh->m_colours.resize(numVertices, Colour(1.0f, 1.0f, 1.0f, 1.0f));
mesh->m_indices.reserve(numFaces*3);
// read vertices
for (uint32_t v=0; v < numVertices; ++v)
{
for (uint32_t i=0; i < numProperties; ++i)
{
properties[i] = PlyRead<float>(file, format);
}
mesh->m_positions[v] = Point3(properties[0], properties[1], properties[2]);
mesh->m_normals[v] = Vector3(0.0f, 0.0f, 0.0f);
}
// read indices
for (uint32_t f=0; f < numFaces; ++f)
{
uint32_t numIndices = (format == eAscii)?PlyRead<uint32_t>(file, format):PlyRead<uint8_t>(file, format);
uint32_t indices[4];
for (uint32_t i=0; i < numIndices; ++i)
{
indices[i] = PlyRead<uint32_t>(file, format);
}
switch (numIndices)
{
case 3:
mesh->m_indices.push_back(indices[0]);
mesh->m_indices.push_back(indices[1]);
mesh->m_indices.push_back(indices[2]);
break;
case 4:
mesh->m_indices.push_back(indices[0]);
mesh->m_indices.push_back(indices[1]);
mesh->m_indices.push_back(indices[2]);
mesh->m_indices.push_back(indices[2]);
mesh->m_indices.push_back(indices[3]);
mesh->m_indices.push_back(indices[0]);
break;
default:
assert(!"invalid number of indices, only support tris and quads");
break;
};
// calculate vertex normals as we go
Point3& v0 = mesh->m_positions[indices[0]];
Point3& v1 = mesh->m_positions[indices[1]];
Point3& v2 = mesh->m_positions[indices[2]];
Vector3 n = SafeNormalize(Cross(v1-v0, v2-v0), Vector3(0.0f, 1.0f, 0.0f));
for (uint32_t i=0; i < numIndices; ++i)
{
mesh->m_normals[indices[i]] += n;
}
}
for (uint32_t i=0; i < numVertices; ++i)
{
mesh->m_normals[i] = SafeNormalize(mesh->m_normals[i], Vector3(0.0f, 1.0f, 0.0f));
}
//cout << "Imported mesh " << path << " in " << (GetSeconds()-startTime)*1000.f << "ms" << endl;
return mesh;
}
// map of Material name to Material
struct VertexKey
{
VertexKey() : v(0), vt(0), vn(0) {}
uint32_t v, vt, vn;
bool operator == (const VertexKey& rhs) const
{
return v == rhs.v && vt == rhs.vt && vn == rhs.vn;
}
bool operator < (const VertexKey& rhs) const
{
if (v != rhs.v)
return v < rhs.v;
else if (vt != rhs.vt)
return vt < rhs.vt;
else
return vn < rhs.vn;
}
};
Mesh* ImportMeshFromObj(const char* path)
{
ifstream file(path);
if (!file)
return NULL;
Mesh* m = new Mesh();
vector<Point3> positions;
vector<Vector3> normals;
vector<Vector2> texcoords;
vector<Vector3> colors;
vector<uint32_t>& indices = m->m_indices;
//typedef unordered_map<VertexKey, uint32_t, MemoryHash<VertexKey> > VertexMap;
typedef map<VertexKey, uint32_t> VertexMap;
VertexMap vertexLookup;
// some scratch memory
const uint32_t kMaxLineLength = 1024;
char buffer[kMaxLineLength];
//double startTime = GetSeconds();
while (file)
{
file >> buffer;
if (strcmp(buffer, "vn") == 0)
{
// normals
float x, y, z;
file >> x >> y >> z;
normals.push_back(Vector3(x, y, z));
}
else if (strcmp(buffer, "vt") == 0)
{
// texture coords
float u, v;
file >> u >> v;
texcoords.push_back(Vector2(u, v));
}
else if (buffer[0] == 'v')
{
// positions
float x, y, z;
file >> x >> y >> z;
positions.push_back(Point3(x, y, z));
}
else if (buffer[0] == 's' || buffer[0] == 'g' || buffer[0] == 'o')
{
// ignore smoothing groups, groups and objects
char linebuf[256];
file.getline(linebuf, 256);
}
else if (strcmp(buffer, "mtllib") == 0)
{
// ignored
std::string MaterialFile;
file >> MaterialFile;
}
else if (strcmp(buffer, "usemtl") == 0)
{
// read Material name
std::string materialName;
file >> materialName;
}
else if (buffer[0] == 'f')
{
// faces
uint32_t faceIndices[4];
uint32_t faceIndexCount = 0;
for (int i=0; i < 4; ++i)
{
VertexKey key;
file >> key.v;
if (!file.eof())
{
// failed to read another index continue on
if (file.fail())
{
file.clear();
break;
}
if (file.peek() == '/')
{
file.ignore();
if (file.peek() != '/')
{
file >> key.vt;
}
if (file.peek() == '/')
{
file.ignore();
file >> key.vn;
}
}
// find / add vertex, index
VertexMap::iterator iter = vertexLookup.find(key);
if (iter != vertexLookup.end())
{
faceIndices[faceIndexCount++] = iter->second;
}
else
{
// add vertex
uint32_t newIndex = uint32_t(m->m_positions.size());
faceIndices[faceIndexCount++] = newIndex;
vertexLookup.insert(make_pair(key, newIndex));
// push back vertex data
assert(key.v > 0);
m->m_positions.push_back(positions[key.v-1]);
// obj format doesn't support mesh colours so add default value
m->m_colours.push_back(Colour(1.0f, 1.0f, 1.0f));
// normal [optional]
if (key.vn)
{
m->m_normals.push_back(normals[key.vn-1]);
}
// texcoord [optional]
if (key.vt)
{
m->m_texcoords[0].push_back(texcoords[key.vt-1]);
}
}
}
}
if (faceIndexCount == 3)
{
// a triangle
indices.insert(indices.end(), faceIndices, faceIndices+3);
}
else if (faceIndexCount == 4)
{
// a quad, triangulate clockwise
indices.insert(indices.end(), faceIndices, faceIndices+3);
indices.push_back(faceIndices[2]);
indices.push_back(faceIndices[3]);
indices.push_back(faceIndices[0]);
}
else
{
cout << "Face with more than 4 vertices are not supported" << endl;
}
}
else if (buffer[0] == '#')
{
// comment
char linebuf[256];
file.getline(linebuf, 256);
}
}
// calculate normals if none specified in file
m->m_normals.resize(m->m_positions.size());
const uint32_t numFaces = uint32_t(indices.size())/3;
for (uint32_t i=0; i < numFaces; ++i)
{
uint32_t a = indices[i*3+0];
uint32_t b = indices[i*3+1];
uint32_t c = indices[i*3+2];
Point3& v0 = m->m_positions[a];
Point3& v1 = m->m_positions[b];
Point3& v2 = m->m_positions[c];
Vector3 n = SafeNormalize(Cross(v1-v0, v2-v0), Vector3(0.0f, 1.0f, 0.0f));
m->m_normals[a] += n;
m->m_normals[b] += n;
m->m_normals[c] += n;
}
for (uint32_t i=0; i < m->m_normals.size(); ++i)
{
m->m_normals[i] = SafeNormalize(m->m_normals[i], Vector3(0.0f, 1.0f, 0.0f));
}
//cout << "Imported mesh " << path << " in " << (GetSeconds()-startTime)*1000.f << "ms" << endl;
return m;
}
void ExportToObj(const char* path, const Mesh& m)
{
ofstream file(path);
if (!file)
return;
file << "# positions" << endl;
for (uint32_t i=0; i < m.m_positions.size(); ++i)
{
Point3 v = m.m_positions[i];
file << "v " << v.x << " " << v.y << " " << v.z << endl;
}
file << "# texcoords" << endl;
for (uint32_t i=0; i < m.m_texcoords[0].size(); ++i)
{
Vec2 t = m.m_texcoords[0][i];
file << "vt " << t.x << " " << t.y << endl;
}
file << "# normals" << endl;
for (uint32_t i=0; i < m.m_normals.size(); ++i)
{
Vec3 n = m.m_normals[0][i];
file << "vn " << n.x << " " << n.y << " " << n.z << endl;
}
file << "# faces" << endl;
for (uint32_t i=0; i < m.m_indices.size()/3; ++i)
{
uint32_t j = i+1;
// no sharing, assumes there is a unique position, texcoord and normal for each vertex
file << "f " << j << "/" << j << "/" << j << endl;
}
}
void Mesh::AddMesh(const Mesh& m)
{
uint32_t offset = uint32_t(m_positions.size());
// add new vertices
m_positions.insert(m_positions.end(), m.m_positions.begin(), m.m_positions.end());
m_normals.insert(m_normals.end(), m.m_normals.begin(), m.m_normals.end());
m_colours.insert(m_colours.end(), m.m_colours.begin(), m.m_colours.end());
// add new indices with offset
for (uint32_t i=0; i < m.m_indices.size(); ++i)
{
m_indices.push_back(m.m_indices[i]+offset);
}
}
void Mesh::Transform(const Matrix44& m)
{
for (uint32_t i=0; i < m_positions.size(); ++i)
{
m_positions[i] = m*m_positions[i];
m_normals[i] = m*m_normals[i];
}
}
void Mesh::GetBounds(Vector3& outMinExtents, Vector3& outMaxExtents) const
{
Point3 minExtents(FLT_MAX);
Point3 maxExtents(-FLT_MAX);
// calculate face bounds
for (uint32_t i=0; i < m_positions.size(); ++i)
{
const Point3& a = m_positions[i];
minExtents = Min(a, minExtents);
maxExtents = Max(a, maxExtents);
}
outMinExtents = Vector3(minExtents);
outMaxExtents = Vector3(maxExtents);
}
Mesh* CreateTriMesh(float size, float y)
{
uint32_t indices[] = { 0, 1, 2 };
Point3 positions[3];
Vector3 normals[3];
positions[0] = Point3(-size, y, size);
positions[1] = Point3(size, y, size);
positions[2] = Point3(size, y, -size);
normals[0] = Vector3(0.0f, 1.0f, 0.0f);
normals[1] = Vector3(0.0f, 1.0f, 0.0f);
normals[2] = Vector3(0.0f, 1.0f, 0.0f);
Mesh* m = new Mesh();
m->m_indices.insert(m->m_indices.begin(), indices, indices + 3);
m->m_positions.insert(m->m_positions.begin(), positions, positions + 3);
m->m_normals.insert(m->m_normals.begin(), normals, normals + 3);
return m;
}
Mesh* CreateCubeMesh()
{
const Point3 vertices[24] =
{
Point3(0.5, 0.5, 0.5),
Point3(-0.5, 0.5, 0.5),
Point3(0.5, -0.5, 0.5),
Point3(-0.5, -0.5, 0.5),
Point3(0.5, 0.5, -0.5),
Point3(-0.5, 0.5, -0.5),
Point3(0.5, -0.5, -0.5),
Point3(-0.5, -0.5, -0.5),
Point3(0.5, 0.5, 0.5),
Point3(0.5, -0.5, 0.5),
Point3(0.5, 0.5, 0.5),
Point3(0.5, 0.5, -0.5),
Point3(-0.5, 0.5, 0.5),
Point3(-0.5, 0.5, -0.5),
Point3(0.5, -0.5, -0.5),
Point3(0.5, 0.5, -0.5),
Point3(-0.5, -0.5, -0.5),
Point3(0.5, -0.5, -0.5),
Point3(-0.5, -0.5, 0.5),
Point3(0.5, -0.5, 0.5),
Point3(-0.5, -0.5, -0.5),
Point3(-0.5, -0.5, 0.5),
Point3(-0.5, 0.5, -0.5),
Point3(-0.5, 0.5, 0.5)
};
const Vec3 normals[24] =
{
Vec3(0.0f, 0.0f, 1.0f),
Vec3(0.0f, 0.0f, 1.0f),
Vec3(0.0f, 0.0f, 1.0f),
Vec3(0.0f, 0.0f, 1.0f),
Vec3(1.0f, 0.0f, 0.0f),
Vec3(0.0f, 1.0f, 0.0f),
Vec3(1.0f, 0.0f, 0.0f),
Vec3(0.0f, 0.0f, -1.0f),
Vec3(1.0f, 0.0f, 0.0f),
Vec3(1.0f, 0.0f, 0.0f),
Vec3(0.0f, 1.0f, 0.0f),
Vec3(0.0f, 1.0f, 0.0f),
Vec3(0.0f, 1.0f, 0.0f),
Vec3(0.0f, 0.0f, -1.0f),
Vec3(0.0f, 0.0f, -1.0f),
Vec3(-0.0f, -0.0f, -1.0f),
Vec3(0.0f, -1.0f, 0.0f),
Vec3(0.0f, -1.0f, 0.0f),
Vec3(0.0f, -1.0f, 0.0f),
Vec3(-0.0f, -1.0f, -0.0f),
Vec3(-1.0f, 0.0f, 0.0f),
Vec3(-1.0f, 0.0f, 0.0f),
Vec3(-1.0f, 0.0f, 0.0f),
Vec3(-1.0f, -0.0f, -0.0f)
};
const int indices[36] =
{
0, 1, 2,
3, 2, 1,
8, 9, 4,
6, 4, 9,
10, 11, 12,
5, 12, 11,
7, 13, 14,
15, 14, 13,
16, 17, 18,
19, 18, 17,
20, 21, 22,
23, 22, 21
};
Mesh* m = new Mesh();
m->m_positions.assign(vertices, vertices+24);
m->m_normals.assign(normals, normals+24);
m->m_indices.assign(indices, indices+36);
return m;
}
Mesh* CreateQuadMesh(float size, float y)
{
uint32_t indices[] = { 0, 1, 2, 2, 3, 0 };
Point3 positions[4];
Vector3 normals[4];
positions[0] = Point3(-size, y, size);
positions[1] = Point3(size, y, size);
positions[2] = Point3(size, y, -size);
positions[3] = Point3(-size, y, -size);
normals[0] = Vector3(0.0f, 1.0f, 0.0f);
normals[1] = Vector3(0.0f, 1.0f, 0.0f);
normals[2] = Vector3(0.0f, 1.0f, 0.0f);
normals[3] = Vector3(0.0f, 1.0f, 0.0f);
Mesh* m = new Mesh();
m->m_indices.insert(m->m_indices.begin(), indices, indices+6);
m->m_positions.insert(m->m_positions.begin(), positions, positions+4);
m->m_normals.insert(m->m_normals.begin(), normals, normals+4);
return m;
}
Mesh* CreateDiscMesh(float radius, uint32_t segments)
{
const uint32_t numVerts = 1 + segments;
Mesh* m = new Mesh();
m->m_positions.resize(numVerts);
m->m_normals.resize(numVerts, Vec3(0.0f, 1.0f, 0.0f));
m->m_positions[0] = Point3(0.0f);
m->m_positions[1] = Point3(0.0f, 0.0f, radius);
for (uint32_t i=1; i <= segments; ++i)
{
uint32_t nextVert = (i+1)%numVerts;
if (nextVert == 0)
nextVert = 1;
m->m_positions[nextVert] = Point3(radius*Sin((float(i)/segments)*k2Pi), 0.0f, radius*Cos((float(i)/segments)*k2Pi));
m->m_indices.push_back(0);
m->m_indices.push_back(i);
m->m_indices.push_back(nextVert);
}
return m;
}
Mesh* CreateTetrahedron(float ground, float height)
{
Mesh* m = new Mesh();
const float dimValue = 1.0f / sqrtf(2.0f);
const Point3 vertices[4] =
{
Point3(-1.0f, ground, -dimValue),
Point3(1.0f, ground, -dimValue),
Point3(0.0f, ground + height, dimValue),
Point3(0.0f, ground, dimValue)
};
const int indices[12] =
{
//winding order is counter-clockwise
0, 2, 1,
2, 3, 1,
2, 0, 3,
3, 0, 1
};
m->m_positions.assign(vertices, vertices+4);
m->m_indices.assign(indices, indices+12);
m->CalculateNormals();
return m;
}
Mesh* CreateSphere(int slices, int segments, float radius)
{
float dTheta = kPi / slices;
float dPhi = k2Pi / segments;
int vertsPerRow = segments + 1;
Mesh* mesh = new Mesh();
for (int i = 0; i <= slices; ++i)
{
float theta = dTheta*i;
for (int j = 0; j <= segments; ++j)
{
float phi = dPhi*j;
float x = sinf(theta)*cosf(phi);
float y = cosf(theta);
float z = sinf(theta)*sinf(phi);
mesh->m_positions.push_back(Point3(x, y, z)*radius);
mesh->m_normals.push_back(Vec3(x, y, z));
if (i > 0 && j > 0)
{
int a = i*vertsPerRow + j;
int b = (i - 1)*vertsPerRow + j;
int c = (i - 1)*vertsPerRow + j - 1;
int d = i*vertsPerRow + j - 1;
// add a quad for this slice
mesh->m_indices.push_back(b);
mesh->m_indices.push_back(a);
mesh->m_indices.push_back(d);
mesh->m_indices.push_back(b);
mesh->m_indices.push_back(d);
mesh->m_indices.push_back(c);
}
}
}
return mesh;
}
Mesh* CreateCapsule(int slices, int segments, float radius, float halfHeight)
{
float dTheta = kPi / (slices * 2);
float dPhi = k2Pi / segments;
int vertsPerRow = segments + 1;
Mesh* mesh = new Mesh();
float theta = 0.0f;
for (int i = 0; i <= 2 * slices + 1; ++i)
{
for (int j = 0; j <= segments; ++j)
{
float phi = dPhi*j;
float x = sinf(theta)*cosf(phi);
float y = cosf(theta);
float z = sinf(theta)*sinf(phi);
// add y offset based on which hemisphere we're in
float yoffset = (i < slices) ? halfHeight : -halfHeight;
mesh->m_positions.push_back(Point3(x, y, z)*radius + Vec3(0.0f, yoffset, 0.0f));
mesh->m_normals.push_back(Vec3(x, y, z));
if (i > 0 && j > 0)
{
int a = i*vertsPerRow + j;
int b = (i - 1)*vertsPerRow + j;
int c = (i - 1)*vertsPerRow + j - 1;
int d = i*vertsPerRow + j - 1;
// add a quad for this slice
mesh->m_indices.push_back(b);
mesh->m_indices.push_back(a);
mesh->m_indices.push_back(d);
mesh->m_indices.push_back(b);
mesh->m_indices.push_back(d);
mesh->m_indices.push_back(c);
}
}
// don't update theta for the middle slice
if (i != slices)
theta += dTheta;
}
return mesh;
}
================================================
FILE: core/mesh.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
#include <vector>
#include "core.h"
#include "maths.h"
struct Mesh
{
void AddMesh(const Mesh& m);
uint32_t GetNumVertices() const { return uint32_t(m_positions.size()); }
uint32_t GetNumFaces() const { return uint32_t(m_indices.size()) / 3; }
void DuplicateVertex(uint32_t i);
void CalculateNormals();
void Transform(const Matrix44& m);
void Normalize(float s=1.0f); // scale so bounds in any dimension equals s and lower bound = (0,0,0)
void GetBounds(Vector3& minExtents, Vector3& maxExtents) const;
std::vector<Point3> m_positions;
std::vector<Vector3> m_normals;
std::vector<Vector2> m_texcoords[2];
std::vector<Colour> m_colours;
std::vector<uint32_t> m_indices;
};
// create mesh from file
Mesh* ImportMeshFromObj(const char* path);
Mesh* ImportMeshFromPly(const char* path);
Mesh* ImportMeshFromBin(const char* path);
// just switches on filename
Mesh* ImportMesh(const char* path);
// save a mesh in a flat binary format
void ExportMeshToBin(const char* path, const Mesh* m);
// create procedural primitives
Mesh* CreateTriMesh(float size, float y=0.0f);
Mesh* CreateCubeMesh();
Mesh* CreateQuadMesh(float size, float y=0.0f);
Mesh* CreateDiscMesh(float radius, uint32_t segments);
Mesh* CreateTetrahedron(float ground=0.0f, float height=1.0f); //fixed but not used
Mesh* CreateSphere(int slices, int segments, float radius = 1.0f);
Mesh* CreateCapsule(int slices, int segments, float radius = 1.0f, float halfHeight = 1.0f);
================================================
FILE: core/perlin.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "perlin.h"
#include <cmath>
namespace Perlin
{
// types.
typedef int int32_t;
typedef float real64;
//
// Fast math trickery....
//
#define _doublemagicroundeps (.5-1.4e-11) // almost .5f = .5f - 1e^(number of exp bit)
#define _doublemagic double (6755399441055744.0) // 2^52 * 1.5, uses limited precision to floor
//! TODO: not sure if this is endian safe
// fast floor float->int conversion routine.
inline int32_t Floor2Int(real64 val)
{
#if 0
val -= _doublemagicroundeps;
val += _doublemagic;
return ((int32_t*)&val)[0];
#else
return (int32_t)floorf(val);
#endif
}
inline real64 Lerp(real64 t, real64 v1, real64 v2)
{
return v1 + t*(v2 - v1);
}
// like cubic fade but has both first-order and second-order derivatives of 0.0 at [0.0,1.0]
inline real64 PerlinFade( real64 val ) {
real64 val3 = val*val*val;
real64 val4 = val3*val;
return 6.0f*val4*val - 15.0f*val4 + 10.0f*val3;
}
//
// Perlin Noise Stuff
//
// Implementation of Ken Perlins 2002 "Improved Perlin Noise".
// Mostly taken from pbrt implementation in "Physically Based Rendering" by Matt Pharr and Greg Humpreys
// which was inturn taken from Ken Perlins example Java code from [http://mrl.nyu.edu/~perlin/noise/]
//
//
// Perlin Noise Permutation Data
//
#define NOISE_PERM_SIZE 256
static unsigned char NoisePerm[2 * NOISE_PERM_SIZE] = {
151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96,
53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142,
// Rest of noise permutation table
8, 99, 37, 240, 21, 10, 23,
190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33,
88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166,
77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244,
102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196,
135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123,
5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42,
223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,
129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228,
251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107,
49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254,
138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180,
151, 160, 137, 91, 90, 15,
131, 13, 201, 95, 96, 53, 194, 233, 7, 225, 140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23,
190, 6, 148, 247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32, 57, 177, 33,
88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175, 74, 165, 71, 134, 139, 48, 27, 166,
77, 146, 158, 231, 83, 111, 229, 122, 60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244,
102, 143, 54, 65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169, 200, 196,
135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, 3, 64, 52, 217, 226, 250, 124, 123,
5, 202, 38, 147, 118, 126, 255, 82, 85, 212, 207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42,
223, 183, 170, 213, 119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,
129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104, 218, 246, 97, 228,
251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, 241, 81, 51, 145, 235, 249, 14, 239, 107,
49, 192, 214, 31, 181, 199, 106, 157, 184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254,
138, 236, 205, 93, 222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180
};
// 1d gradient function.
static inline real64 Grad1d(int32_t x, real64 dx)
{
int32_t h = NoisePerm[x];
h &= 3;
return ((h&1) ? -dx : dx);
}
// 2d gradient function.
static inline real64 Grad2d(int32_t x, int32_t y, real64 dx, real64 dy)
{
int32_t h = NoisePerm[NoisePerm[x]+y];
h &= 3;
return ((h&1) ? -dx : dx) + ((h&2) ? -dy : dy);
}
// 3d gradient function.
static inline real64 Grad3d(int32_t x, int32_t y, int32_t z, real64 dx, real64 dy, real64 dz)
{
int32_t h = NoisePerm[NoisePerm[NoisePerm[x]+y]+z];
h &= 15;
// Ken Perlins original impl
real64 u = h<8 ? dx : dy;
real64 v = h<4 ? dy : (h==12 || h==14) ? dx : dz;
return ((h&1) ? -u : u) + ((h&2) ? -v : v);
// (will this run faster without having all those branches?)
/*
// or how about just this....
static const real64 GRADS[16][3] = { {1.0, 1.0, 0.0}, {-1.0, 1.0, 0.0}, {1.0, -1.0, 0.0}, {-1.0, -1.0, 0.0}, // the 12 grads
{1.0, 0.0, 1.0}, {-1.0, 0.0, 1.0}, {1.0, 0.0, -1.0}, {-1.0, 0.0, -1.0},
{0.0, 1.0, 1.0}, {0.0, -1.0, 1.0}, {0.0, 1.0, -1.0}, {0.0, -1.0, -1.0},
{-1.0, 1.0, 0.0}, {1.0, 1.0, 0.0}, {0.0, -1.0, 1.0}, {0.0, -1.0, -1.0} }; // 8 more "padding" items to make this array of size 16.
return GRADS[h][0]*dx + GRADS[h][1]*dy + GRADS[h][2]*dz;
*/
}
// 4d version from java
/*
static double grad(int hash, double x, double y, double z, double w) {
int h = hash & 31; // CONVERT LO 5 BITS OF HASH TO 32 GRAD DIRECTIONS.
double a=y,b=z,c=w; // X,Y,Z
switch (h >> 3) { // OR, DEPENDING ON HIGH ORDER 2 BITS:
case 1: a=w;b=x;c=y;break; // W,X,Y
case 2: a=z;b=w;c=x;break; // Z,W,X
case 3: a=y;b=z;c=w;break; // Y,Z,W
}
return ((h&4)==0 ? -a:a) + ((h&2)==0 ? -b:b) + ((h&1)==0 ? -c:c);
}
*/
static real64 PerlinNoise3DFunctionPeriodic(real64 x, real64 y, real64 z, int px, int py, int pz)
{
// Compute noise cell coordinates and offsets
int32_t ix = Floor2Int(x);
int32_t iy = Floor2Int(y);
int32_t iz = Floor2Int(z);
real64 dx = x - ix, dy = y - iy, dz = z - iz;
int32_t ix0 = (ix%px) & (NOISE_PERM_SIZE-1);
int32_t iy0 = (iy%py) & (NOISE_PERM_SIZE-1);
int32_t iz0 = (iz%pz) & (NOISE_PERM_SIZE-1);
int32_t ix1 = ((ix+1)%px) & (NOISE_PERM_SIZE-1);
int32_t iy1 = ((iy+1)%py) & (NOISE_PERM_SIZE-1);
int32_t iz1 = ((iz+1)%pz) & (NOISE_PERM_SIZE-1);
real64 w000 = Grad3d(ix0, iy0, iz0, dx, dy, dz);
real64 w100 = Grad3d(ix1, iy0, iz0, dx-1, dy, dz);
real64 w010 = Grad3d(ix0, iy1, iz0, dx, dy-1, dz);
real64 w110 = Grad3d(ix1, iy1, iz0, dx-1, dy-1, dz);
real64 w001 = Grad3d(ix0, iy0, iz1, dx, dy, dz-1);
real64 w101 = Grad3d(ix1, iy0, iz1, dx-1, dy, dz-1);
real64 w011 = Grad3d(ix0, iy1, iz1, dx, dy-1, dz-1);
real64 w111 = Grad3d(ix1, iy1, iz1, dx-1, dy-1, dz-1);
// Compute trilinear interpolation of weights
real64 wx = PerlinFade(dx);
real64 wy = PerlinFade(dy);
real64 wz = PerlinFade(dz);
real64 x00 = Lerp(wx, w000, w100);
real64 x10 = Lerp(wx, w010, w110);
real64 x01 = Lerp(wx, w001, w101);
real64 x11 = Lerp(wx, w011, w111);
real64 y0 = Lerp(wy, x00, x10);
real64 y1 = Lerp(wy, x01, x11);
return Lerp(wz, y0, y1);
}
static real64 PerlinNoise3DFunction(real64 x, real64 y, real64 z)
{
// Compute noise cell coordinates and offsets
int32_t ix = Floor2Int(x);
int32_t iy = Floor2Int(y);
int32_t iz = Floor2Int(z);
real64 dx = x - ix, dy = y - iy, dz = z - iz;
// Compute gradient weights
ix &= (NOISE_PERM_SIZE-1);
iy &= (NOISE_PERM_SIZE-1);
iz &= (NOISE_PERM_SIZE-1);
real64 w000 = Grad3d(ix, iy, iz, dx, dy, dz);
real64 w100 = Grad3d(ix+1, iy, iz, dx-1, dy, dz);
real64 w010 = Grad3d(ix, iy+1, iz, dx, dy-1, dz);
real64 w110 = Grad3d(ix+1, iy+1, iz, dx-1, dy-1, dz);
real64 w001 = Grad3d(ix, iy, iz+1, dx, dy, dz-1);
real64 w101 = Grad3d(ix+1, iy, iz+1, dx-1, dy, dz-1);
real64 w011 = Grad3d(ix, iy+1, iz+1, dx, dy-1, dz-1);
real64 w111 = Grad3d(ix+1, iy+1, iz+1, dx-1, dy-1, dz-1);
// Compute trilinear interpolation of weights
real64 wx = PerlinFade(dx);
real64 wy = PerlinFade(dy);
real64 wz = PerlinFade(dz);
real64 x00 = Lerp(wx, w000, w100);
real64 x10 = Lerp(wx, w010, w110);
real64 x01 = Lerp(wx, w001, w101);
real64 x11 = Lerp(wx, w011, w111);
real64 y0 = Lerp(wy, x00, x10);
real64 y1 = Lerp(wy, x01, x11);
return Lerp(wz, y0, y1);
}
static real64 PerlinNoise2DFunction(real64 x, real64 y)
{
// Compute noise cell coordinates and offsets
int32_t ix = Floor2Int(x);
int32_t iy = Floor2Int(y);
real64 dx = x - ix, dy = y - iy;
// Compute gradient weights
ix &= (NOISE_PERM_SIZE-1);
iy &= (NOISE_PERM_SIZE-1);
real64 w00 = Grad2d(ix, iy, dx, dy);
real64 w10 = Grad2d(ix+1, iy, dx-1.0f, dy);
real64 w01 = Grad2d(ix, iy+1, dx, dy-1.0f);
real64 w11 = Grad2d(ix+1, iy+1, dx-1.0f, dy-1.0f);
// Compute bilinear interpolation of weights
real64 wx = PerlinFade(dx);
real64 wy = PerlinFade(dy);
real64 x0 = Lerp(wx, w00, w10);
real64 x1 = Lerp(wx, w01, w11);
return Lerp(wy, x0, x1);
}
static real64 PerlinNoise1DFunction(real64 x)
{
// Compute noise cell coordinates and offsets
int32_t ix = Floor2Int(x);
real64 dx = x - ix;
// Compute gradient weights
ix &= (NOISE_PERM_SIZE-1);
real64 w00 = Grad1d(ix, dx);
real64 w10 = Grad1d(ix+1, dx-1.0f);
// Compute bilinear interpolation of weights
real64 wx = PerlinFade(dx);
real64 x0 = Lerp(wx, w00, w10);
return x0;
}
}
//------------------------------------------------
//! Public interfaces
float Perlin1D(float x, int octaves, float persistence)
{
float r = 0.0f;
float a = 1.0f;
int freq = 1;
for (int i=0; i < octaves; i++)
{
float fx = x*freq;
r += Perlin::PerlinNoise1DFunction(fx)*a;
//! update amplitude
a *= persistence;
freq = 2 << i;
}
return r;
}
float Perlin2D(float x, float y, int octaves, float persistence)
{
float r = 0.0f;
float a = 1.0f;
int freq = 1;
for (int i=0; i < octaves; i++)
{
float fx = x*freq;
float fy = y*freq;
r += Perlin::PerlinNoise2DFunction(fx, fy)*a;
//! update amplitude
a *= persistence;
freq = 2 << i;
}
return r;
}
float Perlin3D(float x, float y, float z, int octaves, float persistence)
{
float r = 0.0f;
float a = 1.0f;
int freq = 1;
for (int i=0; i < octaves; i++)
{
float fx = x*freq;
float fy = y*freq;
float fz = z*freq;
r += Perlin::PerlinNoise3DFunction(fx, fy, fz)*a;
//! update amplitude
a *= persistence;
freq = 2 << i;
}
return r;
}
float Perlin3DPeriodic(float x, float y, float z, int px, int py, int pz, int octaves, float persistence)
{
float r = 0.0f;
float a = 1.0f;
int freq = 1;
for (int i=0; i < octaves; i++)
{
float fx = x*freq;
float fy = y*freq;
float fz = z*freq;
r += Perlin::PerlinNoise3DFunctionPeriodic(fx, fy, fz, px, py, pz)*a;
//! update amplitude
a *= persistence;
freq = 2 << i;
}
return r;
}
================================================
FILE: core/perlin.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#pragma once
float Perlin1D(float x, int octaves, float persistence);
float Perlin2D(float x, float y, int octaves, float persistence);
float Perlin3D(float x, float y, float z, int octaves, float persistence);
// periodic versions of the same function, inspired by the Renderman pnoise() functions
float Perlin3DPeriodic(float x, float y, float z, int px, int py, int pz, int octaves, float persistence);
================================================
FILE: core/pfm.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "pfm.h"
#include <cassert>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#if _WIN32
#pragma warning(disable: 4996) // secure io
#pragma warning(disable: 4100) // unreferenced param
#pragma warning(disable: 4324) // structure was padded due to __declspec(align())
#endif
namespace
{
// RAII wrapper to handle file pointer clean up
struct FilePointer
{
FilePointer(FILE* ptr) : p(ptr) {}
~FilePointer() { if (p) fclose(p); }
operator FILE*() { return p; }
FILE* p;
};
}
bool PfmLoad(const char* filename, PfmImage& image)
{
FilePointer f = fopen(filename, "rb");
if (!f)
return false;
memset(&image, 0, sizeof(PfmImage));
const uint32_t kBufSize = 1024;
char buffer[kBufSize];
if (!fgets(buffer, kBufSize, f))
return false;
if (strcmp(buffer, "PF\n") != 0)
return false;
if (!fgets(buffer, kBufSize, f))
return false;
image.m_depth = 1;
sscanf(buffer, "%d %d %d", &image.m_width, &image.m_height, &image.m_depth);
if (!fgets(buffer, kBufSize, f))
return false;
sscanf(buffer, "%f", &image.m_maxDepth);
uint32_t dataStart = ftell(f);
fseek(f, 0, SEEK_END);
uint32_t dataEnd = ftell(f);
fseek(f, dataStart, SEEK_SET);
uint32_t dataSize = dataEnd-dataStart;
if (dataSize != sizeof(float)*image.m_width*image.m_height*image.m_depth)
return false;
image.m_data = new float[dataSize/4];
if (fread(image.m_data, dataSize, 1, f) != 1)
return false;
return true;
}
void PfmSave(const char* filename, const PfmImage& image)
{
FilePointer f = fopen(filename, "wb");
if (!f)
return;
fprintf(f, "PF\n");
if (image.m_depth > 1)
fprintf(f, "%d %d %d\n", image.m_width, image.m_height, image.m_depth);
else
fprintf(f, "%d %d\n", image.m_width, image.m_height);
fprintf(f, "%f\n", *std::max_element(image.m_data, image.m_data+(image.m_width*image.m_height*image.m_depth)));
fwrite(image.m_data, image.m_width*image.m_height*image.m_depth*sizeof(float), 1, f);
}
================================================
FILE: core/pfm.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "types.h"
struct PfmImage
{
// set m_depth to 1 for standard pfm compatability, > 1 will act as a volume texture (non-standard)
uint32_t m_width;
uint32_t m_height;
uint32_t m_depth;
// optional
float m_maxDepth;
float* m_data;
};
bool PfmLoad(const char* filename, PfmImage& image);
void PfmSave(const char* filename, const PfmImage& image);
================================================
FILE: core/platform.cpp
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However, NVIDIA Corporation assumes no responsibility for the consequences of use of such
// information or for any infringement of patents or other rights of third parties that may
// result from its use. No license is granted by implication or otherwise under any patent
// or patent rights of NVIDIA Corporation. Details are subject to change without notice.
// This code supersedes and replaces all information previously supplied.
// NVIDIA Corporation products are not authorized for use as critical
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
// Copyright (c) 2013-2020 NVIDIA Corporation. All rights reserved.
#include "core.h"
#include "platform.h"
#include "types.h"
#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
using namespace std;
#if defined(WIN32) || defined(WIN64)
#include <windows.h>
#include <commdlg.h>
#include <mmsystem.h>
double GetSeconds()
{
static LARGE_INTEGER lastTime;
static LARGE_INTEGER freq;
static bool first = true;
if (first)
{
QueryPerformanceCounter(&lastTime);
QueryPerformanceFrequency(&freq);
first = false;
}
static double time = 0.0;
LARGE_INTEGER t;
QueryPerformanceCounter(&t);
__int64 delta = t.QuadPart-lastTime.QuadPart;
double deltaSeconds = double(delta) / double(freq.QuadPart);
time += deltaSeconds;
lastTime = t;
return time;
}
void Sleep(double seconds)
{
::Sleep(DWORD(seconds*1000));
}
//// helper function to get exe path
//string GetExePath()
//{
// const uint32_t kMaxPathLength = 2048;
//
// char exepath[kMaxPathLength];
//
// // get exe path for file system
// uint32_t i = GetModuleFileName(NULL, exepath, kMaxPathLength);
//
// // rfind first slash
// while (i && exepath[i] != '\\' && exepath[i] != '//')
// i--;
//
// // insert null terminater to cut off exe name
// return string(&exepath[0], &exepath[i+1]);
//}
//
//string FileOpenDialog(char *filter)
//{
// HWND owner=NULL;
//
// OPENFILENAME ofn;
// char fileName[MAX_PATH] = "";
// ZeroMemory(&ofn, sizeof(ofn));
// ofn.lStructSize = sizeof(OPENFILENAME);
// ofn.hwndOwner = owner;
// ofn.lpstrFilter = filter;
// ofn.lpstrFile = fileName;
// ofn.nMaxFile = MAX_PATH;
// ofn.Flags = OFN_EXPLORER | OFN_FILEMUSTEXIST | OFN_HIDEREADONLY | OFN_NOCHANGEDIR;
// ofn.lpstrDefExt = "";
//
// string fileNameStr;
//
// if ( GetOpenFileName(&ofn) )
// fileNameStr = fileName;
//
// return fileNameStr;
//}
//
//bool FileMove(const char* src, const char* dest)
//{
// BOOL b = MoveFileEx(src, dest, MOVEFILE_REPLACE_EXISTING);
// return b == TRUE;
//}
//
//bool FileScan(const char* pattern, vector<string>& files)
//{
// HANDLE h;
// WIN32_FIND_DATA info;
//
// // build a list of files
// h = FindFirstFile(pattern, &info);
//
// if (h != INVALID_HANDLE_VALUE)
// {
// do
// {
// if (!(strcmp(info.cFileName, ".") == 0 || strcmp(info.cFileName, "..") == 0))
// {
// files.push_back(info.cFileName);
// }
// }
// while (FindNextFile(h, &info));
//
// if (GetLastError() != ERROR_NO_MORE_FILES)
// {
// return false;
// }
//
// FindClose(h);
// }
// else
// {
// return false;
// }
//
// return true;
//}
#else
// linux, mac platforms
#include <sys/time.h>
double GetSeconds()
{
// Figure out time elapsed since last call to idle function
static struct timeval last_idle_time;
static double time = 0.0;
struct timeval time_now;
gettimeofday(&time_now, NULL);
if (last_idle_time.tv_usec == 0)
last_idle_time = time_now;
float dt = (float)(time_now.tv_sec - last_idle_time.tv_sec) + 1.0e-6*(time_now.tv_usec - last_idle_time.tv_usec);
time += dt;
last_idle_time = time_now;
return time;
}
#endif
uint8_t* LoadFileToBuffer(const char* filename, uint32_t* sizeRead)
{
FILE* file = fopen(filename, "rb");
if (file)
{
fseek(file, 0, SEEK_END);
long p = ftell(file);
uint8_t* buf = new uint8_t[p];
fseek(file, 0, SEEK_SET);
uint32_t len = uint32_t(fread(buf, 1, p, file));
fclose(file);
if (sizeRead)
{
*sizeRead = len;
}
return buf;
}
else
{
std::cout << "Could not open file for reading: " << filename << std::endl;
return NULL;
}
}
string LoadFileToString(const char* filename)
{
//std::ifstream file(filename);
//return string((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
uint32_t size;
uint8_t* buf = LoadFileToBuffer(filename, &size);
if (buf)
{
string s(buf, buf+size);
delete[] buf;
return s;
}
else
{
return "";
}
}
bool SaveStringToFile(const char* filename, const char* s)
{
FILE* f = fopen(filename, "w");
if (!f)
{
std::cout << "Could not open file for writing: " << filename << std::endl;
return false;
}
else
{
fputs(s, f);
fclose(f);
return true;
}
}
string StripFilename(const char* path)
{
// simply find the last
const char* iter=path;
const char* last=NULL;
while (*iter)
{
if (*iter == '\\' || *iter== '/')
last = iter;
++iter;
}
if (last)
{
return string(path, last+1);
}
else
return string();
}
string GetExtension(const char* path)
{
const char* s = strrchr(path, '.');
if (s)
{
return string(s+1);
}
else
{
return "";
}
}
string StripExtension(const char* path)
{
const char* s = strrchr(path, '.');
if (s)
{
return string(path, s);
}
else
{
return string(path);
}
}
string NormalizePath(const char* path)
{
string p(path);
replace(p.begin(), p.end(), '\\', '/');
transform(p.begin(), p.end(), p.begin(), ::tolower);
return p;
}
// strips the path from a file name
string StripPath(const char* path)
{
// simply find the last
const char* iter=path;
const char* last=NULL;
while (*iter)
{
if (*iter == '\\' || *iter== '/')
last = iter;
++iter;
}
if (!last)
{
return string(path);
}
// eat the last slash
++last;
if (*last)
{
return string(last);
}
else
{
return string();
}
}
================================================
FILE: core/platform.h
================================================
// This code contains NVIDIA Confidential Information and is disclosed to you
// under a form of NVIDIA software license agreement provided separately to you.
//
// Notice
// NVIDIA Corporation and its licensors retain all intellectual property and
// proprietary rights in and to this software and related documentation and
// any modifications thereto. Any use, reproduction, disclosure, or
// distribution of this software and related documentation without an express
// license agreement from NVIDIA Corporation is strictly prohibited.
//
// ALL NVIDIA DESIGN SPECIFICATIONS, CODE ARE PROVIDED "AS IS.". NVIDIA MAKES
// NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
// THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT,
// MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE.
//
// Information and code furnished is believed to be accurate and reliable.
// However,
gitextract_aqyo8464/
├── .gitignore
├── LICENSE.txt
├── README.md
├── bin/
│ ├── linux64/
│ │ ├── NvFlexDemoDebugCUDA_x64
│ │ └── NvFlexDemoReleaseCUDA_x64
│ ├── win32/
│ │ ├── NvFlexDebugCUDA_x86.dll.pdb
│ │ ├── NvFlexDebugD3D_x86.dll.pdb
│ │ ├── NvFlexDemoDebugCUDA_x86.exe.pdb
│ │ ├── NvFlexDemoDebugD3D_x86.exe.pdb
│ │ ├── NvFlexDemoReleaseCUDA_x86.exe.pdb
│ │ ├── NvFlexDemoReleaseD3D_x86.exe.pdb
│ │ ├── NvFlexDeviceDebug_x86.dll.pdb
│ │ ├── NvFlexDeviceRelease_x86.dll.pdb
│ │ ├── NvFlexExtDebugCUDA_x86.dll.pdb
│ │ ├── NvFlexExtDebugD3D_x86.dll.pdb
│ │ ├── NvFlexExtReleaseCUDA_x86.dll.pdb
│ │ ├── NvFlexExtReleaseD3D_x86.dll.pdb
│ │ ├── NvFlexReleaseCUDA_x86.dll.pdb
│ │ └── NvFlexReleaseD3D_x86.dll.pdb
│ └── win64/
│ ├── NvFlexDebugCUDA_x64.dll.pdb
│ ├── NvFlexDebugD3D_x64.dll.pdb
│ ├── NvFlexDemoDebugCUDA_x64.exe.pdb
│ ├── NvFlexDemoDebugD3D_x64.exe.pdb
│ ├── NvFlexDemoReleaseCUDA_x64.exe.pdb
│ ├── NvFlexDemoReleaseD3D_x64.exe.pdb
│ ├── NvFlexDeviceDebug_x64.dll.pdb
│ ├── NvFlexDeviceRelease_x64.dll.pdb
│ ├── NvFlexExtDebugCUDA_x64.dll.pdb
│ ├── NvFlexExtDebugD3D_x64.dll.pdb
│ ├── NvFlexExtReleaseCUDA_x64.dll.pdb
│ ├── NvFlexExtReleaseD3D_x64.dll.pdb
│ ├── NvFlexReleaseCUDA_x64.dll.pdb
│ └── NvFlexReleaseD3D_x64.dll.pdb
├── core/
│ ├── aabbtree.cpp
│ ├── aabbtree.h
│ ├── cloth.h
│ ├── convex.h
│ ├── core.cpp
│ ├── core.h
│ ├── extrude.cpp
│ ├── extrude.h
│ ├── mat22.h
│ ├── mat33.h
│ ├── mat44.h
│ ├── maths.cpp
│ ├── maths.h
│ ├── matnn.h
│ ├── mesh.cpp
│ ├── mesh.h
│ ├── perlin.cpp
│ ├── perlin.h
│ ├── pfm.cpp
│ ├── pfm.h
│ ├── platform.cpp
│ ├── platform.h
│ ├── png.cpp
│ ├── png.h
│ ├── point3.h
│ ├── quat.h
│ ├── sdf.cpp
│ ├── sdf.h
│ ├── tga.cpp
│ ├── tga.h
│ ├── types.h
│ ├── vec2.h
│ ├── vec3.h
│ ├── vec4.h
│ ├── voxelize.cpp
│ └── voxelize.h
├── data/
│ ├── apple.obj
│ ├── armadillo.pfm
│ ├── armadillo.ply
│ ├── banana.obj
│ ├── bowl.obj
│ ├── bowl_high.ply
│ ├── box.ply
│ ├── box_high.ply
│ ├── box_high_weld.ply
│ ├── box_ultra_high.ply
│ ├── box_very_high.ply
│ ├── bunny.pfm
│ ├── bunny.ply
│ ├── dragon.obj
│ ├── froggy.tet
│ ├── irregular_plane.obj
│ ├── lighthouse.ply
│ ├── nv_small.ply
│ ├── pear.obj
│ ├── rocka.ply
│ ├── rockb.ply
│ ├── rockc.ply
│ ├── rockd.ply
│ ├── rocke.ply
│ ├── rockf.ply
│ ├── rope.obj
│ ├── sandcastle.obj
│ ├── softs/
│ │ └── octopus.obj
│ ├── sphere.pfm
│ ├── sphere.ply
│ ├── sphere_high.ply
│ ├── teapot.ply
│ └── torus.obj
├── demo/
│ ├── benchmark.h
│ ├── compiler/
│ │ ├── makelinux64/
│ │ │ ├── Makefile
│ │ │ ├── Makefile.flexDemoCUDA.mk
│ │ │ └── Makefile.flexExtCUDA.mk
│ │ ├── vc12win32/
│ │ │ ├── flexDemoCUDA.sln
│ │ │ ├── flexDemoCUDA.vcxproj
│ │ │ ├── flexDemoCUDA.vcxproj.filters
│ │ │ ├── flexDemoCUDA.vcxproj.user
│ │ │ ├── flexDemoD3D.sln
│ │ │ ├── flexDemoD3D.vcxproj
│ │ │ ├── flexDemoD3D.vcxproj.filters
│ │ │ └── flexDemoD3D.vcxproj.user
│ │ ├── vc12win64/
│ │ │ ├── flexDemoCUDA.sln
│ │ │ ├── flexDemoCUDA.vcxproj
│ │ │ ├── flexDemoCUDA.vcxproj.filters
│ │ │ ├── flexDemoCUDA.vcxproj.user
│ │ │ ├── flexDemoD3D.sln
│ │ │ ├── flexDemoD3D.vcxproj
│ │ │ ├── flexDemoD3D.vcxproj.filters
│ │ │ └── flexDemoD3D.vcxproj.user
│ │ ├── vc14win32/
│ │ │ ├── flexDemoD3D.sln
│ │ │ ├── flexDemoD3D.vcxproj
│ │ │ ├── flexDemoD3D.vcxproj.filters
│ │ │ └── flexDemoD3D.vcxproj.user
│ │ └── vc14win64/
│ │ ├── flexDemoCUDA.sln
│ │ ├── flexDemoCUDA.vcxproj
│ │ ├── flexDemoCUDA.vcxproj.filters
│ │ ├── flexDemoCUDA.vcxproj.user
│ │ ├── flexDemoD3D.sln
│ │ ├── flexDemoD3D.vcxproj
│ │ ├── flexDemoD3D.vcxproj.filters
│ │ └── flexDemoD3D.vcxproj.user
│ ├── d3d/
│ │ ├── appGraphCtx.h
│ │ ├── appGraphCtxLoader.cpp
│ │ ├── imguiGraph.cpp
│ │ ├── imguiGraph.h
│ │ ├── imguiGraphLoader.cpp
│ │ ├── loader.cpp
│ │ ├── loader.h
│ │ ├── loaderMacros.h
│ │ ├── renderParamsD3D.cpp
│ │ ├── renderParamsD3D.h
│ │ ├── shaderCommonD3D.h
│ │ └── shaders/
│ │ ├── blurDepthPS.hlsl
│ │ ├── compositePS.hlsl
│ │ ├── debugLinePS.hlsl
│ │ ├── debugLineVS.hlsl
│ │ ├── diffuseGS.hlsl
│ │ ├── diffusePS.hlsl
│ │ ├── diffuseVS.hlsl
│ │ ├── ellipsoidDepthGS.hlsl
│ │ ├── ellipsoidDepthPS.hlsl
│ │ ├── ellipsoidDepthVS.hlsl
│ │ ├── imguiPS.hlsl
│ │ ├── imguiVS.hlsl
│ │ ├── meshAsyncComputeBenchPS.hlsl
│ │ ├── meshPS.hlsl
│ │ ├── meshShadowPS.hlsl
│ │ ├── meshVS.hlsl
│ │ ├── passThroughVS.hlsl
│ │ ├── pointGS.hlsl
│ │ ├── pointPS.hlsl
│ │ ├── pointShadowPS.hlsl
│ │ ├── pointThicknessGS.hlsl
│ │ ├── pointThicknessPS.hlsl
│ │ ├── pointThicknessVS.hlsl
│ │ ├── pointVS.hlsl
│ │ └── shaderCommon.h
│ ├── d3d11/
│ │ ├── appD3D11Ctx.cpp
│ │ ├── appD3D11Ctx.h
│ │ ├── debugLineRenderD3D11.cpp
│ │ ├── debugLineRenderD3D11.h
│ │ ├── demoContextD3D11.cpp
│ │ ├── demoContextD3D11.h
│ │ ├── diffuseRenderD3D11.cpp
│ │ ├── diffuseRenderD3D11.h
│ │ ├── fluidRenderD3D11.cpp
│ │ ├── fluidRenderD3D11.h
│ │ ├── imguiGraphD3D11.cpp
│ │ ├── imguiGraphD3D11.h
│ │ ├── imguiInteropD3D11.cpp
│ │ ├── meshRenderD3D11.cpp
│ │ ├── meshRenderD3D11.h
│ │ ├── pointRenderD3D11.cpp
│ │ ├── pointRenderD3D11.h
│ │ ├── renderTargetD3D11.cpp
│ │ ├── renderTargetD3D11.h
│ │ ├── shadowMapD3D11.cpp
│ │ └── shadowMapD3D11.h
│ ├── d3d12/
│ │ ├── NvCoDx12CircularResourceHeap.cpp
│ │ ├── NvCoDx12CircularResourceHeap.h
│ │ ├── NvCoDx12CounterFence.cpp
│ │ ├── NvCoDx12CounterFence.h
│ │ ├── NvCoDx12DescriptorHeap.cpp
│ │ ├── NvCoDx12DescriptorHeap.h
│ │ ├── NvCoDx12Handle.h
│ │ ├── NvCoDx12HelperUtil.cpp
│ │ ├── NvCoDx12HelperUtil.h
│ │ ├── NvCoDx12RenderTarget.cpp
│ │ ├── NvCoDx12RenderTarget.h
│ │ ├── NvCoDx12Resource.cpp
│ │ ├── NvCoDx12Resource.h
│ │ ├── NvCoDx12ResourceScopeManager.cpp
│ │ ├── NvCoDx12ResourceScopeManager.h
│ │ ├── NvCoDxDebugUtil.cpp
│ │ ├── NvCoDxDebugUtil.h
│ │ ├── NvCoDxFormatUtil.cpp
│ │ ├── NvCoDxFormatUtil.h
│ │ ├── NvCoFreeList.cpp
│ │ ├── NvCoFreeList.h
│ │ ├── NvResult.h
│ │ ├── appD3D12Ctx.cpp
│ │ ├── appD3D12Ctx.h
│ │ ├── bufferD3D12.cpp
│ │ ├── bufferD3D12.h
│ │ ├── demoContextD3D12.cpp
│ │ ├── demoContextD3D12.h
│ │ ├── diffusePointRenderPipelineD3D12.cpp
│ │ ├── diffusePointRenderPipelineD3D12.h
│ │ ├── fluidCompositeRenderPipelineD3D12.cpp
│ │ ├── fluidCompositeRenderPipelineD3D12.h
│ │ ├── fluidEllipsoidRenderPipelineD3D12.cpp
│ │ ├── fluidEllipsoidRenderPipelineD3D12.h
│ │ ├── fluidSmoothRenderPipelineD3D12.cpp
│ │ ├── fluidSmoothRenderPipelineD3D12.h
│ │ ├── fluidThicknessRenderPipelineD3D12.cpp
│ │ ├── fluidThicknessRenderPipelineD3D12.h
│ │ ├── imguiGraphD3D12.cpp
│ │ ├── imguiGraphD3D12.h
│ │ ├── imguiInteropD3D12.cpp
│ │ ├── lineRenderPipelineD3D12.cpp
│ │ ├── lineRenderPipelineD3D12.h
│ │ ├── meshRenderPipelineD3D12.cpp
│ │ ├── meshRenderPipelineD3D12.h
│ │ ├── meshRenderer.cpp
│ │ ├── meshRenderer.h
│ │ ├── meshRendererD3D12.cpp
│ │ ├── meshRendererD3D12.h
│ │ ├── meshUtil.cpp
│ │ ├── meshUtil.h
│ │ ├── pipelineUtilD3D12.cpp
│ │ ├── pipelineUtilD3D12.h
│ │ ├── pointRenderPipelineD3D12.cpp
│ │ ├── pointRenderPipelineD3D12.h
│ │ ├── renderStateD3D12.cpp
│ │ └── renderStateD3D12.h
│ ├── demoContext.h
│ ├── helpers.h
│ ├── imgui.cpp
│ ├── imgui.h
│ ├── main.cpp
│ ├── opengl/
│ │ ├── demoContextOGL.h
│ │ ├── imguiRenderGL.cpp
│ │ ├── imguiRenderGL.h
│ │ ├── shader.cpp
│ │ ├── shader.h
│ │ ├── shadersGL.cpp
│ │ └── utilsGL.h
│ ├── scenes/
│ │ ├── adhesion.h
│ │ ├── armadilloshower.h
│ │ ├── bananas.h
│ │ ├── bouyancy.h
│ │ ├── bunnybath.h
│ │ ├── ccdfluid.h
│ │ ├── clothlayers.h
│ │ ├── dambreak.h
│ │ ├── darts.h
│ │ ├── debris.h
│ │ ├── deformables.h
│ │ ├── envcloth.h
│ │ ├── flag.h
│ │ ├── fluidblock.h
│ │ ├── fluidclothcoupling.h
│ │ ├── forcefield.h
│ │ ├── frictionmoving.h
│ │ ├── frictionramp.h
│ │ ├── gamemesh.h
│ │ ├── googun.h
│ │ ├── granularpile.h
│ │ ├── granularshape.h
│ │ ├── inflatable.h
│ │ ├── initialoverlap.h
│ │ ├── lighthouse.h
│ │ ├── localspacecloth.h
│ │ ├── localspacefluid.h
│ │ ├── lowdimensionalshapes.h
│ │ ├── melting.h
│ │ ├── mixedpile.h
│ │ ├── nonconvex.h
│ │ ├── parachutingbunnies.h
│ │ ├── pasta.h
│ │ ├── player.h
│ │ ├── potpourri.h
│ │ ├── rayleightaylor.h
│ │ ├── restitution.h
│ │ ├── rigidfluidcoupling.h
│ │ ├── rigidpile.h
│ │ ├── rigidrotation.h
│ │ ├── rockpool.h
│ │ ├── sdfcollision.h
│ │ ├── shapechannels.h
│ │ ├── shapecollision.h
│ │ ├── softbody.h
│ │ ├── spherecloth.h
│ │ ├── surfacetension.h
│ │ ├── tearing.h
│ │ ├── thinbox.h
│ │ ├── trianglecollision.h
│ │ ├── triggervolume.h
│ │ ├── viscosity.h
│ │ └── waterballoon.h
│ ├── scenes.h
│ ├── shaders.h
│ ├── shadersDemoContext.cpp
│ ├── shadersDemoContext.h
│ └── stb_truetype.h
├── doc/
│ ├── .buildinfo
│ ├── _sources/
│ │ ├── index.txt
│ │ ├── manual.txt
│ │ └── releasenotes.txt
│ ├── _static/
│ │ ├── api/
│ │ │ ├── _nv_flex_8h.html
│ │ │ ├── _nv_flex_8h_source.html
│ │ │ ├── _nv_flex_device_8h.html
│ │ │ ├── _nv_flex_device_8h_source.html
│ │ │ ├── _nv_flex_ext_8h.html
│ │ │ ├── _nv_flex_ext_8h_source.html
│ │ │ ├── dir_d44c64559bbebec7f509842c48db8b23.html
│ │ │ ├── doxygen.css
│ │ │ ├── dynsections.js
│ │ │ ├── files.html
│ │ │ ├── flex.css
│ │ │ ├── globals.html
│ │ │ ├── globals_enum.html
│ │ │ ├── globals_eval.html
│ │ │ ├── globals_func.html
│ │ │ ├── globals_type.html
│ │ │ ├── index.html
│ │ │ ├── jquery.js
│ │ │ ├── struct_nv_flex_solver_callback.html
│ │ │ ├── struct_nv_flex_vector.html
│ │ │ └── tabs.css
│ │ ├── application.css
│ │ ├── bootstrap.css
│ │ ├── bootstrap.js
│ │ ├── default.css
│ │ ├── doctools.js
│ │ ├── jquery.cookie.js
│ │ ├── jquery.js
│ │ ├── jquery.storageapi.js
│ │ ├── pygments.css
│ │ ├── searchtools.js
│ │ ├── sidebar.js
│ │ ├── styleguide.css
│ │ └── underscore.js
│ ├── genindex.html
│ ├── index.html
│ ├── manual.html
│ ├── objects.inv
│ ├── releasenotes.html
│ ├── search.html
│ └── searchindex.js
├── extensions/
│ ├── compiler/
│ │ ├── makeandroid_aarch64/
│ │ │ ├── Makefile
│ │ │ └── Makefile.flexExtCUDA.mk
│ │ ├── makelinux64/
│ │ │ ├── Makefile
│ │ │ └── Makefile.flexExtCUDA.mk
│ │ ├── vc12win32/
│ │ │ ├── flexExtCUDA.sln
│ │ │ ├── flexExtCUDA.vcxproj
│ │ │ ├── flexExtCUDA.vcxproj.filters
│ │ │ ├── flexExtD3D.sln
│ │ │ ├── flexExtD3D.vcxproj
│ │ │ └── flexExtD3D.vcxproj.filters
│ │ ├── vc12win64/
│ │ │ ├── flexExtCUDA.sln
│ │ │ ├── flexExtCUDA.vcxproj
│ │ │ ├── flexExtCUDA.vcxproj.filters
│ │ │ ├── flexExtD3D.sln
│ │ │ ├── flexExtD3D.vcxproj
│ │ │ └── flexExtD3D.vcxproj.filters
│ │ ├── vc14win32/
│ │ │ ├── flexExtD3D.sln
│ │ │ ├── flexExtD3D.vcxproj
│ │ │ └── flexExtD3D.vcxproj.filters
│ │ └── vc14win64/
│ │ ├── flexExtCUDA.sln
│ │ ├── flexExtCUDA.vcxproj
│ │ ├── flexExtCUDA.vcxproj.filters
│ │ ├── flexExtD3D.sln
│ │ ├── flexExtD3D.vcxproj
│ │ └── flexExtD3D.vcxproj.filters
│ ├── cuda/
│ │ └── flexExt.cu
│ ├── dx/
│ │ ├── flexExt.cpp
│ │ ├── flexExt.hlsl
│ │ ├── flexExt_dx_common.h
│ │ └── shaders/
│ │ └── flexExt.UpdateForceFields.hlsl
│ ├── flexExtCloth.cpp
│ ├── flexExtContainer.cpp
│ ├── flexExtMovingFrame.cpp
│ ├── flexExtRigid.cpp
│ └── flexExtSoft.cpp
├── external/
│ ├── D3D11/
│ │ ├── include/
│ │ │ ├── D3DX10.h
│ │ │ ├── D3DX10core.h
│ │ │ ├── D3DX10math.h
│ │ │ ├── D3DX10math.inl
│ │ │ ├── D3DX10mesh.h
│ │ │ ├── D3DX10tex.h
│ │ │ ├── D3DX11.h
│ │ │ ├── D3DX11async.h
│ │ │ ├── D3DX11core.h
│ │ │ ├── D3DX11tex.h
│ │ │ └── d3dx10async.h
│ │ └── libs/
│ │ ├── x64/
│ │ │ ├── d3d11.lib
│ │ │ ├── d3dx10.lib
│ │ │ └── d3dx11.lib
│ │ └── x86/
│ │ ├── d3d11.lib
│ │ ├── d3dx10.lib
│ │ └── d3dx11.lib
│ ├── D3D12/
│ │ ├── include/
│ │ │ ├── PIXEventsCommon.h
│ │ │ ├── PIXEventsGenerated.h
│ │ │ ├── d3d12.h
│ │ │ ├── d3d12sdklayers.h
│ │ │ ├── d3dx12.h
│ │ │ ├── dxgi.h
│ │ │ ├── dxgi1_2.h
│ │ │ ├── dxgi1_3.h
│ │ │ ├── dxgi1_4.h
│ │ │ ├── dxgitype.h
│ │ │ ├── pix3.h
│ │ │ └── pix3_win.h
│ │ └── libs/
│ │ ├── x64/
│ │ │ └── d3d12.lib
│ │ └── x86/
│ │ └── d3d12.lib
│ ├── GFSDK_Aftermath_v1.21/
│ │ ├── include/
│ │ │ ├── GFSDK_Aftermath.h
│ │ │ └── defines.h
│ │ └── lib/
│ │ ├── x64/
│ │ │ ├── GFSDK_Aftermath_Lib.x64.lib
│ │ │ └── GFSDK_Aftermath_Lib_UWP.x64.lib
│ │ └── x86/
│ │ ├── GFSDK_Aftermath_Lib.x86.lib
│ │ └── GFSDK_Aftermath_Lib_UWP.x86.lib
│ ├── NvToolsExt/
│ │ ├── include/
│ │ │ └── nvToolsExt.h
│ │ └── lib/
│ │ ├── Win32/
│ │ │ └── nvToolsExt32_1.lib
│ │ └── x64/
│ │ └── nvToolsExt64_1.lib
│ ├── SDL2-2.0.4/
│ │ ├── BUGS.txt
│ │ ├── COPYING.txt
│ │ ├── README-SDL.txt
│ │ ├── README.txt
│ │ ├── WhatsNew.txt
│ │ ├── docs/
│ │ │ ├── README-android.md
│ │ │ ├── README-cmake.md
│ │ │ ├── README-directfb.md
│ │ │ ├── README-dynapi.md
│ │ │ ├── README-emscripten.md
│ │ │ ├── README-gesture.md
│ │ │ ├── README-hg.md
│ │ │ ├── README-ios.md
│ │ │ ├── README-linux.md
│ │ │ ├── README-macosx.md
│ │ │ ├── README-nacl.md
│ │ │ ├── README-pandora.md
│ │ │ ├── README-platforms.md
│ │ │ ├── README-porting.md
│ │ │ ├── README-psp.md
│ │ │ ├── README-raspberrypi.md
│ │ │ ├── README-touch.md
│ │ │ ├── README-wince.md
│ │ │ ├── README-windows.md
│ │ │ ├── README-winrt.md
│ │ │ ├── README.md
│ │ │ └── doxyfile
│ │ ├── include/
│ │ │ ├── SDL.h
│ │ │ ├── SDL_assert.h
│ │ │ ├── SDL_atomic.h
│ │ │ ├── SDL_audio.h
│ │ │ ├── SDL_bits.h
│ │ │ ├── SDL_blendmode.h
│ │ │ ├── SDL_clipboard.h
│ │ │ ├── SDL_config.h
│ │ │ ├── SDL_cpuinfo.h
│ │ │ ├── SDL_egl.h
│ │ │ ├── SDL_endian.h
│ │ │ ├── SDL_error.h
│ │ │ ├── SDL_events.h
│ │ │ ├── SDL_filesystem.h
│ │ │ ├── SDL_gamecontroller.h
│ │ │ ├── SDL_gesture.h
│ │ │ ├── SDL_haptic.h
│ │ │ ├── SDL_hints.h
│ │ │ ├── SDL_joystick.h
│ │ │ ├── SDL_keyboard.h
│ │ │ ├── SDL_keycode.h
│ │ │ ├── SDL_loadso.h
│ │ │ ├── SDL_log.h
│ │ │ ├── SDL_main.h
│ │ │ ├── SDL_messagebox.h
│ │ │ ├── SDL_mouse.h
│ │ │ ├── SDL_mutex.h
│ │ │ ├── SDL_name.h
│ │ │ ├── SDL_opengl.h
│ │ │ ├── SDL_opengl_glext.h
│ │ │ ├── SDL_opengles.h
│ │ │ ├── SDL_opengles2.h
│ │ │ ├── SDL_opengles2_gl2.h
│ │ │ ├── SDL_opengles2_gl2ext.h
│ │ │ ├── SDL_opengles2_gl2platform.h
│ │ │ ├── SDL_opengles2_khrplatform.h
│ │ │ ├── SDL_pixels.h
│ │ │ ├── SDL_platform.h
│ │ │ ├── SDL_power.h
│ │ │ ├── SDL_quit.h
│ │ │ ├── SDL_rect.h
│ │ │ ├── SDL_render.h
│ │ │ ├── SDL_revision.h
│ │ │ ├── SDL_rwops.h
│ │ │ ├── SDL_scancode.h
│ │ │ ├── SDL_shape.h
│ │ │ ├── SDL_stdinc.h
│ │ │ ├── SDL_surface.h
│ │ │ ├── SDL_system.h
│ │ │ ├── SDL_syswm.h
│ │ │ ├── SDL_test.h
│ │ │ ├── SDL_test_assert.h
│ │ │ ├── SDL_test_common.h
│ │ │ ├── SDL_test_compare.h
│ │ │ ├── SDL_test_crc32.h
│ │ │ ├── SDL_test_font.h
│ │ │ ├── SDL_test_fuzzer.h
│ │ │ ├── SDL_test_harness.h
│ │ │ ├── SDL_test_images.h
│ │ │ ├── SDL_test_log.h
│ │ │ ├── SDL_test_md5.h
│ │ │ ├── SDL_test_random.h
│ │ │ ├── SDL_thread.h
│ │ │ ├── SDL_timer.h
│ │ │ ├── SDL_touch.h
│ │ │ ├── SDL_types.h
│ │ │ ├── SDL_version.h
│ │ │ ├── SDL_video.h
│ │ │ ├── begin_code.h
│ │ │ └── close_code.h
│ │ └── lib/
│ │ ├── x64/
│ │ │ ├── SDL2.lib
│ │ │ ├── SDL2main.lib
│ │ │ ├── SDL2test.lib
│ │ │ ├── libSDL2-2.0.so.0.4.0
│ │ │ ├── libSDL2.a
│ │ │ ├── libSDL2.la
│ │ │ ├── libSDL2_test.a
│ │ │ └── libSDL2main.a
│ │ └── x86/
│ │ ├── SDL2.lib
│ │ ├── SDL2main.lib
│ │ └── SDL2test.lib
│ ├── ags_lib/
│ │ ├── .gitattributes
│ │ ├── CHANGELOG.md
│ │ ├── LICENSE.txt
│ │ ├── README.md
│ │ ├── hlsl/
│ │ │ ├── ags_shader_intrinsics_dx11.hlsl
│ │ │ └── ags_shader_intrinsics_dx12.hlsl
│ │ ├── inc/
│ │ │ └── amd_ags.h
│ │ └── lib/
│ │ ├── amd_ags_x64.lib
│ │ └── amd_ags_x86.lib
│ ├── cub-1.3.2/
│ │ └── cub/
│ │ ├── block/
│ │ │ ├── block_discontinuity.cuh
│ │ │ ├── block_exchange.cuh
│ │ │ ├── block_histogram.cuh
│ │ │ ├── block_load.cuh
│ │ │ ├── block_radix_rank.cuh
│ │ │ ├── block_radix_sort.cuh
│ │ │ ├── block_raking_layout.cuh
│ │ │ ├── block_reduce.cuh
│ │ │ ├── block_scan.cuh
│ │ │ ├── block_shift.cuh
│ │ │ ├── block_store.cuh
│ │ │ └── specializations/
│ │ │ ├── block_histogram_atomic.cuh
│ │ │ ├── block_histogram_sort.cuh
│ │ │ ├── block_reduce_raking.cuh
│ │ │ ├── block_reduce_raking_commutative_only.cuh
│ │ │ ├── block_reduce_warp_reductions.cuh
│ │ │ ├── block_scan_raking.cuh
│ │ │ └── block_scan_warp_scans.cuh
│ │ ├── block_range/
│ │ │ ├── block_range_histo.cuh
│ │ │ ├── block_range_radix_sort_downsweep.cuh
│ │ │ ├── block_range_radix_sort_upsweep.cuh
│ │ │ ├── block_range_reduce.cuh
│ │ │ ├── block_range_reduce_by_key.cuh
│ │ │ ├── block_range_scan.cuh
│ │ │ ├── block_range_select.cuh
│ │ │ ├── block_scan_prefix_operators.cuh
│ │ │ └── specializations/
│ │ │ ├── block_range_histo_gatomic.cuh
│ │ │ ├── block_range_histo_satomic.cuh
│ │ │ └── block_range_histo_sort.cuh
│ │ ├── cub.cuh
│ │ ├── device/
│ │ │ ├── device_histogram.cuh
│ │ │ ├── device_partition.cuh
│ │ │ ├── device_radix_sort.cuh
│ │ │ ├── device_reduce.cuh
│ │ │ ├── device_scan.cuh
│ │ │ ├── device_select.cuh
│ │ │ └── dispatch/
│ │ │ ├── device_histogram_dispatch.cuh
│ │ │ ├── device_radix_sort_dispatch.cuh
│ │ │ ├── device_reduce_by_key_dispatch.cuh
│ │ │ ├── device_reduce_dispatch.cuh
│ │ │ ├── device_scan_dispatch.cuh
│ │ │ └── device_select_dispatch.cuh
│ │ ├── grid/
│ │ │ ├── grid_barrier.cuh
│ │ │ ├── grid_even_share.cuh
│ │ │ ├── grid_mapping.cuh
│ │ │ └── grid_queue.cuh
│ │ ├── host/
│ │ │ └── spinlock.cuh
│ │ ├── iterator/
│ │ │ ├── arg_index_input_iterator.cuh
│ │ │ ├── cache_modified_input_iterator.cuh
│ │ │ ├── cache_modified_output_iterator.cuh
│ │ │ ├── constant_input_iterator.cuh
│ │ │ ├── counting_input_iterator.cuh
│ │ │ ├── tex_obj_input_iterator.cuh
│ │ │ ├── tex_ref_input_iterator.cuh
│ │ │ └── transform_input_iterator.cuh
│ │ ├── thread/
│ │ │ ├── thread_load.cuh
│ │ │ ├── thread_operators.cuh
│ │ │ ├── thread_reduce.cuh
│ │ │ ├── thread_scan.cuh
│ │ │ └── thread_store.cuh
│ │ ├── util_allocator.cuh
│ │ ├── util_arch.cuh
│ │ ├── util_debug.cuh
│ │ ├── util_device.cuh
│ │ ├── util_macro.cuh
│ │ ├── util_namespace.cuh
│ │ ├── util_ptx.cuh
│ │ ├── util_type.cuh
│ │ └── warp/
│ │ ├── specializations/
│ │ │ ├── warp_reduce_shfl.cuh
│ │ │ ├── warp_reduce_smem.cuh
│ │ │ ├── warp_scan_shfl.cuh
│ │ │ └── warp_scan_smem.cuh
│ │ ├── warp_reduce.cuh
│ │ └── warp_scan.cuh
│ ├── egl_setup/
│ │ ├── egl_setup.cpp
│ │ └── egl_setup.h
│ ├── glad/
│ │ ├── include/
│ │ │ ├── KHR/
│ │ │ │ └── khrplatform.h
│ │ │ └── glad/
│ │ │ └── glad.h
│ │ └── src/
│ │ └── glad.c
│ ├── nvapi/
│ │ ├── include/
│ │ │ ├── NvApiDriverSettings.c
│ │ │ ├── NvApiDriverSettings.h
│ │ │ ├── nvHLSLExtns.h
│ │ │ ├── nvHLSLExtnsInternal.h
│ │ │ ├── nvShaderExtnEnums.h
│ │ │ ├── nvapi.h
│ │ │ ├── nvapi_lite_common.h
│ │ │ ├── nvapi_lite_d3dext.h
│ │ │ ├── nvapi_lite_salend.h
│ │ │ ├── nvapi_lite_salstart.h
│ │ │ ├── nvapi_lite_sli.h
│ │ │ ├── nvapi_lite_stereo.h
│ │ │ └── nvapi_lite_surround.h
│ │ └── lib/
│ │ ├── nvapi.lib
│ │ └── nvapi64.lib
│ ├── regal_shared/
│ │ ├── Android.mk
│ │ └── include/
│ │ └── GL/
│ │ └── Regal.h
│ ├── regal_static/
│ │ ├── Android.mk
│ │ ├── include/
│ │ │ └── GL/
│ │ │ └── Regal.h
│ │ └── lib/
│ │ └── armeabi-v7a/
│ │ ├── Regal_static.a
│ │ └── libRegal_static.a
│ └── stb_image/
│ └── stb_image.h
├── include/
│ ├── NvFlex.h
│ ├── NvFlexDevice.h
│ └── NvFlexExt.h
├── lib/
│ ├── android/
│ │ ├── libNvFlexDebugCUDA_aarch64.a
│ │ ├── libNvFlexDeviceDebug_aarch64.a
│ │ ├── libNvFlexDeviceRelease_aarch64.a
│ │ ├── libNvFlexExtDebugCUDA_aarch64.a
│ │ ├── libNvFlexExtReleaseCUDA_aarch64.a
│ │ └── libNvFlexReleaseCUDA_aarch64.a
│ ├── linux64/
│ │ ├── NvFlexDebugCUDA_x64.a
│ │ ├── NvFlexDeviceDebug_x64.a
│ │ ├── NvFlexDeviceRelease_x64.a
│ │ ├── NvFlexExtDebugCUDA_x64.a
│ │ ├── NvFlexExtReleaseCUDA_x64.a
│ │ └── NvFlexReleaseCUDA_x64.a
│ ├── win32/
│ │ ├── NvFlexDebugCUDA_x86.lib
│ │ ├── NvFlexDebugD3D_x86.lib
│ │ ├── NvFlexDeviceDebug_x86.lib
│ │ ├── NvFlexDeviceRelease_x86.lib
│ │ ├── NvFlexExtDebugCUDA_x86.lib
│ │ ├── NvFlexExtDebugD3D_x86.lib
│ │ ├── NvFlexExtReleaseCUDA_x86.lib
│ │ ├── NvFlexExtReleaseD3D_x86.lib
│ │ ├── NvFlexReleaseCUDA_x86.lib
│ │ └── NvFlexReleaseD3D_x86.lib
│ └── win64/
│ ├── NvFlexDebugCUDA_x64.lib
│ ├── NvFlexDebugD3D_x64.lib
│ ├── NvFlexDeviceDebug_x64.lib
│ ├── NvFlexDeviceRelease_x64.lib
│ ├── NvFlexExtDebugCUDA_x64.lib
│ ├── NvFlexExtDebugD3D_x64.lib
│ ├── NvFlexExtReleaseCUDA_x64.lib
│ ├── NvFlexExtReleaseD3D_x64.lib
│ ├── NvFlexReleaseCUDA_x64.lib
│ └── NvFlexReleaseD3D_x64.lib
├── release_notes.txt
├── run_cuda.bat
├── run_dx.bat
└── src/
└── dx/
└── context/
├── Context.h
├── Device.h
├── Format.h
├── NvFlexTypes.h
├── README.md
└── Vector.h
Showing preview only (368K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4242 symbols across 295 files)
FILE: core/aabbtree.cpp
type FaceSorter (line 59) | struct FaceSorter
method FaceSorter (line 61) | FaceSorter(const Vec3* positions, const uint32_t* indices, uint32_t n,...
method GetCentroid (line 80) | inline float GetCentroid(uint32_t face) const
function LongestAxis (line 95) | inline uint32_t LongestAxis(const Vector3& v)
type StackEntry (line 370) | struct StackEntry
FILE: core/aabbtree.h
function class (line 35) | class AABBTree
FILE: core/cloth.h
function class (line 39) | class ClothMesh
function Contains (line 68) | bool Contains(int index) const
function Replace (line 73) | void Replace(int oldIndex, int newIndex)
function RemoveTri (line 83) | void RemoveTri(int index)
function AddTri (line 93) | bool AddTri(int index)
function operator (line 115) | bool operator < (const Edge& rhs) const
function Contains (line 124) | struct Triangle
function ReplaceEdge (line 154) | void ReplaceEdge(int oldIndex, int newIndex)
function ReplaceVertex (line 168) | int ReplaceVertex(int oldIndex, int newIndex)
function GetOppositeVertex (line 183) | int GetOppositeVertex(int v0, int v1) const
type std (line 217) | typedef std::set<Edge> EdgeSet;
function IsSingularVertex (line 333) | int IsSingularVertex(int vertex) const
type TriangleUpdate (line 412) | struct TriangleUpdate
type VertexCopy (line 418) | struct VertexCopy
function SeparateVertex (line 424) | int SeparateVertex(int singularVertex, std::vector<TriangleUpdate>& repl...
function SplitVertex (line 559) | int SplitVertex(const Vec4* vertices, int index, Vec3 splitPlane, std::v...
FILE: core/convex.h
type ConvexMeshBuilder (line 36) | struct ConvexMeshBuilder
function det (line 51) | float det(Vec4 v0, Vec4 v1, Vec4 v2, Vec4 v3)
function Vec3 (line 64) | Vec3 intersect(Vec4 p0, Vec4 p1, Vec4 p2)
type HalfedgeMesh (line 81) | struct HalfedgeMesh
function connect (line 110) | void connect(uint16_t h0, uint16_t h1)
function addTriangle (line 116) | void addTriangle(uint16_t v0, uint16_t v1, uint16_t v2)
function removeTriangle (line 168) | uint16_t removeTriangle(uint16_t f)
function visible (line 210) | bool visible(uint16_t v, uint16_t f)
FILE: core/core.h
function IsPowerOfTwo (line 84) | inline bool IsPowerOfTwo(int n)
function Align (line 101) | inline uint32_t Align(uint32_t val, uint32_t alignment)
function IsAligned (line 108) | inline bool IsAligned(void* p, uint32_t alignment)
FILE: core/extrude.cpp
function Extrude (line 32) | void Extrude(const Vec3* points, int numPoints, std::vector<Vec3>& verti...
FILE: core/mat22.h
type Matrix22 (line 32) | struct Matrix22
function CUDA_CALLABLE (line 47) | CUDA_CALLABLE float operator()(int i, int j) const { return static_cast<...
function CUDA_CALLABLE (line 48) | CUDA_CALLABLE float& operator()(int i, int j) { return static_cast<float...
function Matrix22 (line 52) | static inline Matrix22 Identity() { static const Matrix22 sIdentity(Vec2...
function CUDA_CALLABLE (line 55) | CUDA_CALLABLE inline Matrix22 Multiply(float s, const Matrix22& m)
function CUDA_CALLABLE (line 63) | CUDA_CALLABLE inline Matrix22 Multiply(const Matrix22& a, const Matrix22...
function CUDA_CALLABLE (line 71) | CUDA_CALLABLE inline Matrix22 Add(const Matrix22& a, const Matrix22& b)
function CUDA_CALLABLE (line 76) | CUDA_CALLABLE inline Vec2 Multiply(const Matrix22& a, const Vec2& x)
function CUDA_CALLABLE (line 91) | CUDA_CALLABLE inline float Determinant(const Matrix22& m)
function CUDA_CALLABLE (line 96) | CUDA_CALLABLE inline Matrix22 Inverse(const Matrix22& m, float& det)
function CUDA_CALLABLE (line 117) | CUDA_CALLABLE inline Matrix22 Transpose(const Matrix22& a)
function CUDA_CALLABLE (line 127) | CUDA_CALLABLE inline float Trace(const Matrix22& a)
function CUDA_CALLABLE (line 132) | CUDA_CALLABLE inline Matrix22 RotationMatrix(float theta)
function CUDA_CALLABLE (line 138) | CUDA_CALLABLE inline Matrix22 Outer(const Vec2& a, const Vec2& b)
function CUDA_CALLABLE (line 143) | CUDA_CALLABLE inline Matrix22 QRDecomposition(const Matrix22& m)
function CUDA_CALLABLE (line 151) | CUDA_CALLABLE inline Matrix22 PolarDecomposition(const Matrix22& m)
FILE: core/mat33.h
type Matrix33 (line 35) | struct Matrix33
function CUDA_CALLABLE (line 52) | CUDA_CALLABLE float operator()(int i, int j) const { return static_cast<...
function CUDA_CALLABLE (line 53) | CUDA_CALLABLE float& operator()(int i, int j) { return static_cast<float...
function CUDA_CALLABLE (line 57) | CUDA_CALLABLE static inline Matrix33 Identity() { const Matrix33 sIdent...
function CUDA_CALLABLE (line 60) | CUDA_CALLABLE inline Matrix33 Multiply(float s, const Matrix33& m)
function CUDA_CALLABLE (line 69) | CUDA_CALLABLE inline Vec3 Multiply(const Matrix33& a, const Vec3& x)
function CUDA_CALLABLE (line 76) | CUDA_CALLABLE inline Matrix33 Multiply(const Matrix33& a, const Matrix33...
function CUDA_CALLABLE (line 85) | CUDA_CALLABLE inline Matrix33 Add(const Matrix33& a, const Matrix33& b)
function CUDA_CALLABLE (line 90) | CUDA_CALLABLE inline float Determinant(const Matrix33& m)
function CUDA_CALLABLE (line 95) | CUDA_CALLABLE inline Matrix33 Transpose(const Matrix33& a)
function CUDA_CALLABLE (line 105) | CUDA_CALLABLE inline float Trace(const Matrix33& a)
function CUDA_CALLABLE (line 110) | CUDA_CALLABLE inline Matrix33 Outer(const Vec3& a, const Vec3& b)
function CUDA_CALLABLE (line 115) | CUDA_CALLABLE inline Matrix33 Inverse(const Matrix33& a, bool& success)
FILE: core/mat44.h
function CUDA_CALLABLE (line 37) | CUDA_CALLABLE XMatrix44(const T* d) { assert(d); memcpy(columns, d, size...
function CUDA_CALLABLE (line 38) | CUDA_CALLABLE XMatrix44(T c11, T c21, T c31, T c41,
function CUDA_CALLABLE (line 64) | CUDA_CALLABLE XMatrix44(const Vec4& c1, const Vec4& c2, const Vec4& c3, ...
function CUDA_CALLABLE (line 122) | CUDA_CALLABLE void MatrixMultiply(const T* __restrict lhs, const T* __re...
function CUDA_CALLABLE (line 140) | CUDA_CALLABLE void SetCol(int index, const Vec4& c)
function CUDA_CALLABLE (line 149) | CUDA_CALLABLE void SetAxis(uint32_t index, const XVector3<T>& a)
function CUDA_CALLABLE (line 157) | CUDA_CALLABLE void SetTranslation(const Point3& p)
function CUDA_CALLABLE (line 165) | CUDA_CALLABLE const Vec3& GetAxis(int i) const { return *reinterpret_cas...
function CUDA_CALLABLE (line 166) | CUDA_CALLABLE const Vec4& GetCol(int i) const { return *reinterpret_cast...
function CUDA_CALLABLE (line 169) | CUDA_CALLABLE Vec4 GetRow(int i) const { return Vec4(columns[0][i], colu...
function CUDA_CALLABLE (line 272) | CUDA_CALLABLE inline XMatrix44<float> Outer(const Vec4& a, const Vec4& b)
type XMatrix44 (line 278) | typedef XMatrix44<float> Mat44;
type XMatrix44 (line 279) | typedef XMatrix44<float> Matrix44;
FILE: core/maths.cpp
function RandInit (line 33) | void RandInit()
FILE: core/maths.h
function CUDA_CALLABLE (line 51) | CUDA_CALLABLE inline float DegToRad(float t)
function CUDA_CALLABLE (line 56) | CUDA_CALLABLE inline float RadToDeg(float t)
function CUDA_CALLABLE (line 61) | CUDA_CALLABLE inline float Sin(float theta)
function CUDA_CALLABLE (line 66) | CUDA_CALLABLE inline float Cos(float theta)
function CUDA_CALLABLE (line 71) | CUDA_CALLABLE inline void SinCos(float theta, float& s, float& c)
function CUDA_CALLABLE (line 78) | CUDA_CALLABLE inline float Tan(float theta)
function CUDA_CALLABLE (line 83) | CUDA_CALLABLE inline float Sqrt(float x)
function CUDA_CALLABLE (line 88) | CUDA_CALLABLE inline double Sqrt(double x)
function CUDA_CALLABLE (line 93) | CUDA_CALLABLE inline float ASin(float theta)
function CUDA_CALLABLE (line 98) | CUDA_CALLABLE inline float ACos(float theta)
function CUDA_CALLABLE (line 103) | CUDA_CALLABLE inline float ATan(float theta)
function CUDA_CALLABLE (line 108) | CUDA_CALLABLE inline float ATan2(float x, float y)
function CUDA_CALLABLE (line 113) | CUDA_CALLABLE inline float Abs(float x)
function CUDA_CALLABLE (line 118) | CUDA_CALLABLE inline float Pow(float b, float e)
function CUDA_CALLABLE (line 123) | CUDA_CALLABLE inline float Sgn(float x)
function CUDA_CALLABLE (line 128) | CUDA_CALLABLE inline float Sign(float x)
function CUDA_CALLABLE (line 133) | CUDA_CALLABLE inline double Sign(double x)
function CUDA_CALLABLE (line 138) | CUDA_CALLABLE inline float Mod(float x, float y)
function CUDA_CALLABLE (line 178) | CUDA_CALLABLE inline float InvSqrt(float x)
function CUDA_CALLABLE (line 184) | CUDA_CALLABLE inline int Round(float f)
function class (line 249) | class Plane : public Vec4
function Mat44 (line 497) | inline Mat44 ViewMatrix(const Point3& pos)
function Mat44 (line 509) | inline Mat44 LookAtMatrix(const Point3& viewer, const Point3& target)
function Mat44 (line 526) | inline Mat44 RotationMatrix(float angle, const Vec3& axis)
function Mat44 (line 557) | inline Mat44 RotationMatrix(Quat q)
function Mat44 (line 570) | inline Mat44 TranslationMatrix(const Point3& t)
function Mat44 (line 577) | inline Mat44 OrthographicMatrix(float left, float right, float bottom, f...
function Mat44 (line 590) | inline Mat44 ProjectionMatrix(float fov, float aspect, float znear, floa...
function class (line 606) | class Rotation
function Rotation (line 616) | Rotation operator + (const Rotation& rhs) const { Rotation lhs(*this); l...
function Rotation (line 617) | Rotation operator - (const Rotation& rhs) const { Rotation lhs(*this); l...
function Mat44 (line 625) | inline Mat44 ScaleMatrix(const Vector3& s)
function Mat44 (line 636) | inline Mat44 TransformMatrix(const Rotation& r, const Point3& p)
function class (line 660) | class Transform
function Rotation (line 715) | inline Rotation AlignToVector(const Vec3& vector)
function Vec2 (line 722) | inline Vec2 AngleToVector(float a)
function VectorToAngle (line 727) | inline float VectorToAngle(const Vec2& v)
function CUDA_CALLABLE (line 732) | CUDA_CALLABLE inline float SmoothStep(float a, float b, float t)
function Log (line 779) | inline float Log(float base, float x)
function Log2 (line 785) | inline int Log2(int x)
function class (line 806) | class Colour
function operator (line 831) | operator const float*() const { return &r; }
function operator (line 832) | operator float*() { return &r; }
function Colour (line 834) | Colour operator * (float scale) const { Colour r(*this); r *= scale; ret...
function Colour (line 835) | Colour operator / (float scale) const { Colour r(*this); r /= scale; ret...
function Colour (line 836) | Colour operator + (const Colour& v) const { Colour r(*this); r += v; ret...
function Colour (line 837) | Colour operator - (const Colour& v) const { Colour r(*this); r -= v; ret...
function Colour (line 838) | Colour operator * (const Colour& scale) const { Colour r(*this); r *= sc...
function operator (line 850) | inline bool operator == (const Colour& lhs, const Colour& rhs)
function operator (line 855) | inline bool operator != (const Colour& lhs, const Colour& rhs)
function Colour (line 860) | inline Colour ToneMap(const Colour& s)
function Colour (line 868) | inline Colour operator * (float lhs, const Colour& rhs)
function Colour (line 875) | inline Colour YxyToXYZ(float Y, float x, float y)
function Colour (line 883) | inline Colour HSVToRGB( float h, float s, float v )
function Colour (line 938) | inline Colour XYZToLinear(float x, float y, float z)
function ColourToRGBA8 (line 949) | inline uint32_t ColourToRGBA8(const Colour& c)
function Colour (line 966) | inline Colour LinearToSrgb(const Colour& c)
function Colour (line 972) | inline Colour SrgbToLinear(const Colour& c)
function SolveQuadratic (line 1021) | bool SolveQuadratic(T a, T b, T c, T& minT, T& maxT)
function IntersectRayPlane (line 1072) | inline bool IntersectRayPlane(const Point3& p, const Vector3& dir, const...
function IntersectLineSegmentPlane (line 1088) | inline bool IntersectLineSegmentPlane(const Vec3& start, const Vec3& end...
function IntersectRayTriTwoSided (line 1104) | inline bool IntersectRayTriTwoSided(const Vec3& p, const Vec3& dir, cons...
function IntersectRayTri (line 1137) | inline bool IntersectRayTri(const Point3& p, const Vec3& dir, const Poin...
function CUDA_CALLABLE (line 1181) | CUDA_CALLABLE inline bool IntersectSegmentTri(const Vec3& p, const Vec3&...
function CUDA_CALLABLE (line 1229) | CUDA_CALLABLE inline float ScalarTriple(const Vec3& a, const Vec3& b, co...
function CUDA_CALLABLE (line 1232) | CUDA_CALLABLE inline bool IntersectLineTri(const Vec3& p, const Vec3& q,...
function CUDA_CALLABLE (line 1252) | CUDA_CALLABLE inline Vec3 ClosestPointToAABB(const Vec3& p, const Vec3& ...
function CUDA_CALLABLE (line 1269) | CUDA_CALLABLE inline Vec3 ClosestPointOnTriangle(const Vec3& a, const V...
function CUDA_CALLABLE (line 1335) | CUDA_CALLABLE inline float SqDistPointSegment(Vec3 a, Vec3 b, Vec3 c)
function CUDA_CALLABLE (line 1350) | CUDA_CALLABLE inline bool PointInTriangle(Vec3 a, Vec3 b, Vec3 c, Vec3 p)
function CUDA_CALLABLE (line 1386) | CUDA_CALLABLE inline void ClosestPointBetweenLineSegments(const Vec3& p,...
function CUDA_CALLABLE (line 1421) | CUDA_CALLABLE inline float minf(const float a, const float b) { return a...
function CUDA_CALLABLE (line 1422) | CUDA_CALLABLE inline float maxf(const float a, const float b) { return a...
function CUDA_CALLABLE (line 1424) | CUDA_CALLABLE inline bool IntersectRayAABBOmpf(const Vec3& pos, const Ve...
function CUDA_CALLABLE (line 1451) | CUDA_CALLABLE inline bool IntersectRayAABB(const Vec3& start, const Vect...
function CUDA_CALLABLE (line 1549) | CUDA_CALLABLE inline Vec4 PlaneFromPoints(const Vec3& p, const Vec3& q, ...
function CUDA_CALLABLE (line 1559) | CUDA_CALLABLE inline bool IntersectPlaneAABB(const Vec4& plane, const Ve...
function class (line 1568) | class Rect
function Expand (line 1584) | void Expand(uint32_t x)
function Contains (line 1597) | bool Contains(uint32_t x, uint32_t y) const
function CUDA_CALLABLE (line 1626) | CUDA_CALLABLE inline Quat QuatFromAxisAngle(const Vec3& axis, float angle)
function CUDA_CALLABLE (line 1641) | CUDA_CALLABLE inline Vec3 rotate(const Vec3& q, float w, const Vec3& x)
function CUDA_CALLABLE (line 1647) | CUDA_CALLABLE inline Vec3 rotateInv(const Vec3& q, float w, const Vec3& x)
function CUDA_CALLABLE (line 1652) | CUDA_CALLABLE inline void TransformBounds(const Quat& q, Vec3 extents, V...
function CUDA_CALLABLE (line 1667) | CUDA_CALLABLE inline void TransformBounds(const Vec3& localLower, const ...
function PoissonSample3D (line 1688) | inline int PoissonSample3D(float radius, float separation, Vec3* points,...
function TightPack3D (line 1730) | inline int TightPack3D(float radius, float separation, Vec3* points, int...
type Bounds (line 1765) | struct Bounds
function CUDA_CALLABLE (line 1775) | CUDA_CALLABLE inline void Expand(float r)
function CUDA_CALLABLE (line 1781) | CUDA_CALLABLE inline void Expand(const Vec3& r)
function CUDA_CALLABLE (line 1789) | CUDA_CALLABLE inline bool Overlaps(const Vec3& p) const
function CUDA_CALLABLE (line 1806) | CUDA_CALLABLE inline bool Overlaps(const Bounds& b) const
function CUDA_CALLABLE (line 1827) | CUDA_CALLABLE inline Bounds Union(const Bounds& a, const Vec3& b)
function CUDA_CALLABLE (line 1832) | CUDA_CALLABLE inline Bounds Union(const Bounds& a, const Bounds& b)
function CUDA_CALLABLE (line 1837) | CUDA_CALLABLE inline Bounds Intersection(const Bounds& a, const Bounds& b)
FILE: core/matnn.h
function n (line 204) | n, T> LU(const XMatrix<n ,n, T>& m, XMatrix<n,n, T>& L)
function n (line 293) | n, T> Inverse(const XMatrix<n, n, T>& A, T& det)
FILE: core/mesh.cpp
type PlyFormat (line 97) | enum PlyFormat
function T (line 104) | T PlyRead(ifstream& s, PlyFormat format)
function Mesh (line 133) | Mesh* ImportMesh(const char* path)
function Mesh (line 148) | Mesh* ImportMeshFromBin(const char* path)
function ExportMeshToBin (line 186) | void ExportMeshToBin(const char* path, const Mesh* m)
function Mesh (line 207) | Mesh* ImportMeshFromPly(const char* path)
type VertexKey (line 370) | struct VertexKey
method VertexKey (line 372) | VertexKey() : v(0), vt(0), vn(0) {}
function Mesh (line 392) | Mesh* ImportMeshFromObj(const char* path)
function ExportToObj (line 597) | void ExportToObj(const char* path, const Mesh& m)
function Mesh (line 682) | Mesh* CreateTriMesh(float size, float y)
function Mesh (line 704) | Mesh* CreateCubeMesh()
function Mesh (line 787) | Mesh* CreateQuadMesh(float size, float y)
function Mesh (line 811) | Mesh* CreateDiscMesh(float radius, uint32_t segments)
function Mesh (line 839) | Mesh* CreateTetrahedron(float ground, float height)
function Mesh (line 870) | Mesh* CreateSphere(int slices, int segments, float radius)
function Mesh (line 916) | Mesh* CreateCapsule(int slices, int segments, float radius, float halfHe...
FILE: core/mesh.h
type Mesh (line 35) | struct Mesh
FILE: core/perlin.cpp
type Perlin (line 32) | namespace Perlin
function Floor2Int (line 48) | inline int32_t Floor2Int(real64 val)
function real64 (line 61) | inline real64 Lerp(real64 t, real64 v1, real64 v2)
function real64 (line 68) | inline real64 PerlinFade( real64 val ) {
function real64 (line 120) | static inline real64 Grad1d(int32_t x, real64 dx)
function real64 (line 128) | static inline real64 Grad2d(int32_t x, int32_t y, real64 dx, real64 dy)
function real64 (line 135) | static inline real64 Grad3d(int32_t x, int32_t y, int32_t z, real64 dx...
function real64 (line 170) | static real64 PerlinNoise3DFunctionPeriodic(real64 x, real64 y, real64...
function real64 (line 207) | static real64 PerlinNoise3DFunction(real64 x, real64 y, real64 z)
function real64 (line 240) | static real64 PerlinNoise2DFunction(real64 x, real64 y)
function real64 (line 262) | static real64 PerlinNoise1DFunction(real64 x)
function Perlin1D (line 282) | float Perlin1D(float x, int octaves, float persistence)
function Perlin2D (line 303) | float Perlin2D(float x, float y, int octaves, float persistence)
function Perlin3D (line 325) | float Perlin3D(float x, float y, float z, int octaves, float persistence)
function Perlin3DPeriodic (line 347) | float Perlin3DPeriodic(float x, float y, float z, int px, int py, int pz...
FILE: core/pfm.cpp
type FilePointer (line 44) | struct FilePointer
method FilePointer (line 46) | FilePointer(FILE* ptr) : p(ptr) {}
function PfmLoad (line 55) | bool PfmLoad(const char* filename, PfmImage& image)
function PfmSave (line 101) | void PfmSave(const char* filename, const PfmImage& image)
FILE: core/pfm.h
type PfmImage (line 30) | struct PfmImage
FILE: core/platform.cpp
function GetSeconds (line 48) | double GetSeconds()
function Sleep (line 78) | void Sleep(double seconds)
function GetSeconds (line 171) | double GetSeconds()
function string (line 222) | string LoadFileToString(const char* filename)
function SaveStringToFile (line 242) | bool SaveStringToFile(const char* filename, const char* s)
function string (line 260) | string StripFilename(const char* path)
function string (line 282) | string GetExtension(const char* path)
function string (line 295) | string StripExtension(const char* path)
function string (line 308) | string NormalizePath(const char* path)
function string (line 318) | string StripPath(const char* path)
FILE: core/platform.h
function std (line 51) | inline std::string GetFilePathByPlatform(const char* path)
function std (line 73) | inline std::string GetFilePathByPlatform(const char* path)
function std (line 168) | inline std::string ExpandPath(const char* p)
function std (line 184) | inline std::string GetTempDirectory()
function std (line 192) | inline std::string DataPath(const char* p)
function std (line 199) | inline std::string ExpandPath(const char* p)
function std (line 204) | inline std::string DataPath(const char* p)
FILE: core/png.cpp
function PngLoad (line 9) | bool PngLoad(const char* filename, PngImage& image)
function PngFree (line 35) | void PngFree(PngImage& image)
function HdrLoad (line 40) | bool HdrLoad(const char* filename, HdrImage& image)
function HdrFree (line 66) | void HdrFree(HdrImage& image)
FILE: core/png.h
type PngImage (line 5) | struct PngImage
type HdrImage (line 17) | struct HdrImage
FILE: core/point3.h
function class (line 34) | class Point3
function operator (line 48) | operator float* () { return &x; }
function Set (line 52) | void Set(float x_, float y_, float z_) { Validate(); x = x_; y = y_; z =...
function Point3 (line 54) | Point3 operator * (float scale) const { Point3 r(*this); r *= scale; Val...
function Point3 (line 55) | Point3 operator / (float scale) const { Point3 r(*this); r /= scale; Val...
function Point3 (line 56) | Point3 operator + (const Vec3& v) const { Point3 r(*this); r += v; Valid...
function Point3 (line 57) | Point3 operator - (const Vec3& v) const { Point3 r(*this); r -= v; Valid...
function operator (line 64) | bool operator != (const Point3& v) const { return (x != v.x || y != v.y ...
function Validate (line 71) | void Validate() const
function Point3 (line 105) | inline Point3 Max(const Point3& a, const Point3& b)
function Point3 (line 110) | inline Point3 Min(const Point3& a, const Point3& b)
FILE: core/quat.h
type Matrix33 (line 32) | struct Matrix33
function CUDA_CALLABLE (line 52) | CUDA_CALLABLE XQuat<T> operator * (T scale) const { XQuat<T> r(*this); r...
function CUDA_CALLABLE (line 53) | CUDA_CALLABLE XQuat<T> operator / (T scale) const { XQuat<T> r(*this); r...
function CUDA_CALLABLE (line 54) | CUDA_CALLABLE XQuat<T> operator + (const XQuat<T>& v) const { XQuat<T> r...
function CUDA_CALLABLE (line 55) | CUDA_CALLABLE XQuat<T> operator - (const XQuat<T>& v) const { XQuat<T> r...
function CUDA_CALLABLE (line 56) | CUDA_CALLABLE XQuat<T> operator * (XQuat<T> q) const
function CUDA_CALLABLE (line 109) | CUDA_CALLABLE inline Vec3 Rotate(const Quat& q, const Vec3& x)
function CUDA_CALLABLE (line 115) | CUDA_CALLABLE inline Vec3 RotateInv(const Quat& q, const Vec3& x)
function CUDA_CALLABLE (line 120) | CUDA_CALLABLE inline Quat Inverse(const Quat& q)
function CUDA_CALLABLE (line 125) | CUDA_CALLABLE inline Quat Normalize(const Quat& q)
FILE: core/sdf.cpp
function Sqr (line 38) | inline float Sqr(float x) { return x*x; }
function Clamp (line 39) | inline int Clamp(int x, int lower, int upper) { return min(max(lower, x)...
function Sample (line 41) | uint32_t Sample(const uint32_t* image, uint32_t w, uint32_t h, int x, in...
function Sample (line 46) | uint32_t Sample(const uint32_t* image, uint32_t w, uint32_t h, uint32_t ...
function EdgeDetect (line 52) | bool EdgeDetect(const uint32_t* img, uint32_t w, uint32_t h, int x, int y)
function EdgeDetect (line 72) | bool EdgeDetect(const uint32_t* img, uint32_t w, uint32_t h, uint32_t d,...
type Coord2D (line 105) | struct Coord2D
function MakeSDF (line 116) | void MakeSDF(const uint32_t* img, uint32_t w, uint32_t h, float* output)
type Coord3D (line 191) | struct Coord3D
function MakeSDF (line 202) | void MakeSDF(const uint32_t* img, uint32_t w, uint32_t h, uint32_t d, fl...
FILE: core/tga.cpp
type TgaHeader (line 37) | struct TgaHeader
function memwrite (line 60) | void memwrite(void* src, uint32_t size, unsigned char*& buffer)
function TgaSave (line 69) | bool TgaSave(const char* filename, const TgaImage& image, bool rle)
function TgaSave (line 83) | bool TgaSave(FILE* f, const TgaImage& image, bool rle)
function TgaLoad (line 146) | bool TgaLoad(const char* filename, TgaImage& image)
function TgaFree (line 260) | void TgaFree(const TgaImage& image)
FILE: core/tga.h
type TgaImage (line 36) | struct TgaImage
FILE: core/vec2.h
function CUDA_CALLABLE (line 66) | CUDA_CALLABLE XVector2() : x(0.0f), y(0.0f) { VEC2_VALIDATE(); }
type XVector2 (line 106) | typedef XVector2<float> Vec2;
type XVector2 (line 107) | typedef XVector2<float> Vector2;
FILE: core/vec3.h
function CUDA_CALLABLE (line 65) | CUDA_CALLABLE inline XVector3<T> operator * (T scale) const { XVector3<T...
function CUDA_CALLABLE (line 66) | CUDA_CALLABLE inline XVector3<T> operator / (T scale) const { XVector3<T...
function CUDA_CALLABLE (line 67) | CUDA_CALLABLE inline XVector3<T> operator + (const XVector3<T>& v) const...
function CUDA_CALLABLE (line 68) | CUDA_CALLABLE inline XVector3<T> operator - (const XVector3<T>& v) const...
function CUDA_CALLABLE (line 69) | CUDA_CALLABLE inline XVector3<T> operator /(const XVector3<T>& v) const ...
function CUDA_CALLABLE (line 70) | CUDA_CALLABLE inline XVector3<T> operator *(const XVector3<T>& v) const ...
type XVector3 (line 93) | typedef XVector3<float> Vector3;
function CUDA_CALLABLE (line 116) | CUDA_CALLABLE inline float Dot3(const float* v1, const float * v2)
function CUDA_CALLABLE (line 128) | CUDA_CALLABLE inline Vec3 Cross(const Vec3& b, const Vec3& c)
FILE: core/vec4.h
function CUDA_CALLABLE (line 68) | CUDA_CALLABLE XVector4<T> operator * (T scale) const { XVector4<T> r(*th...
function CUDA_CALLABLE (line 69) | CUDA_CALLABLE XVector4<T> operator / (T scale) const { XVector4<T> r(*th...
function CUDA_CALLABLE (line 70) | CUDA_CALLABLE XVector4<T> operator + (const XVector4<T>& v) const { XVec...
function CUDA_CALLABLE (line 71) | CUDA_CALLABLE XVector4<T> operator - (const XVector4<T>& v) const { XVec...
function CUDA_CALLABLE (line 72) | CUDA_CALLABLE XVector4<T> operator * (XVector4<T> scale) const { XVector...
type XVector4 (line 89) | typedef XVector4<float> Vec4;
FILE: core/voxelize.cpp
function Voxelize (line 31) | void Voxelize(const Vec3* vertices, int numVertices, const int* indices,...
FILE: core/voxelize.h
type Mesh (line 30) | struct Mesh
FILE: demo/benchmark.h
type GpuTimers (line 49) | struct GpuTimers
type TimerTotals (line 64) | struct TimerTotals
function WriteSceneResults (line 241) | void WriteSceneResults(TimerTotals& totals)
function GoToNextScene (line 355) | int GoToNextScene()
function BenchmarkUpdate (line 378) | int BenchmarkUpdate()
function BenchmarkInit (line 418) | int BenchmarkInit()
function BenchmarkUpdateGraph (line 425) | void BenchmarkUpdateGraph()
FILE: demo/d3d/appGraphCtx.h
type SDL_Window (line 19) | struct SDL_Window
type AppGraphCtx (line 21) | struct AppGraphCtx
type AppGraphColor (line 23) | struct AppGraphColor
FILE: demo/d3d/appGraphCtxLoader.cpp
type AppCtxFunctionSet (line 36) | struct AppCtxFunctionSet
function loadAppGraphCtx (line 54) | void loadAppGraphCtx(AppGraphCtxType type)
function unloadAppGraphCtx (line 66) | void unloadAppGraphCtx()
FILE: demo/d3d/imguiGraph.cpp
function imguifree (line 36) | void imguifree(void* ptr, void* /*userptr*/)
function RGBA (line 55) | inline unsigned int RGBA(unsigned char r, unsigned char g, unsigned char...
function drawPolygon (line 60) | static void drawPolygon(const float* coords, unsigned numCoords, float r...
function drawRect (line 128) | static void drawRect(float x, float y, float w, float h, float fth, unsi...
function drawRoundedRect (line 157) | static void drawRoundedRect(float x, float y, float w, float h, float r,...
function drawLine (line 193) | static void drawLine(float x0, float y0, float x1, float y1, float r, fl...
function imguiGraphInit (line 230) | bool imguiGraphInit(const char* fontpath, float defaultFontHeight, const...
function imguiGraphUpdate (line 281) | void imguiGraphUpdate(const ImguiGraphDesc* desc)
function imguiGraphDestroy (line 286) | void imguiGraphDestroy()
function getBakedQuad (line 293) | static void getBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, int ...
function getTextLength (line 315) | static float getTextLength(stbtt_bakedchar *chardata, const char* text)
function drawText (line 345) | static void drawText(float x, float y, const char *text, int align, unsi...
function imguiGraphDraw (line 401) | void imguiGraphDraw()
FILE: demo/d3d/imguiGraph.h
type ImguiGraphDesc (line 17) | struct ImguiGraphDesc
FILE: demo/d3d/imguiGraphLoader.cpp
type AppGraphCtx (line 22) | struct AppGraphCtx
type ImguiFunctionSet (line 46) | struct ImguiFunctionSet
function loadImgui (line 64) | void loadImgui(AppGraphCtxType type)
function unloadImgui (line 76) | void unloadImgui()
FILE: demo/d3d/loader.cpp
function loadModules (line 17) | void loadModules(AppGraphCtxType type)
function unloadModules (line 23) | void unloadModules()
FILE: demo/d3d/loader.h
type AppGraphCtxType (line 11) | enum AppGraphCtxType
FILE: demo/d3d/renderParamsD3D.cpp
function Matrix44 (line 33) | Matrix44 RenderParamsUtilD3D::convertGLToD3DProjection(const Matrix44& p...
FILE: demo/d3d/renderParamsD3D.h
type ShadowMapD3D (line 20) | struct ShadowMapD3D
type DirectX (line 22) | typedef DirectX::XMFLOAT3 float3;
type DirectX (line 23) | typedef DirectX::XMFLOAT4 float4;
type DirectX (line 24) | typedef DirectX::XMFLOAT4X4 float4x4;
type DiffuseDrawParamsD3D (line 26) | struct DiffuseDrawParamsD3D
type FluidRenderMode (line 50) | enum FluidRenderMode
type FluidCullMode (line 57) | enum FluidCullMode
type FluidDrawStage (line 65) | enum FluidDrawStage
type FluidDrawParamsD3D (line 73) | struct FluidDrawParamsD3D
type MeshRenderMode (line 116) | enum MeshRenderMode
type MeshCullMode (line 123) | enum MeshCullMode
type MeshDrawStage (line 131) | enum MeshDrawStage
type MeshDrawParamsD3D (line 139) | struct MeshDrawParamsD3D
type PointRenderMode (line 173) | enum PointRenderMode
type PointCullMode (line 180) | enum PointCullMode
type PointDrawStage (line 188) | enum PointDrawStage
type PointDrawParamsD3D (line 196) | struct PointDrawParamsD3D
type ShadowParamsD3D (line 223) | struct ShadowParamsD3D
type RenderParamsUtilD3D (line 232) | struct RenderParamsUtilD3D
FILE: demo/d3d/shaderCommonD3D.h
type ShadowMap (line 6) | struct ShadowMap
function namespace (line 8) | namespace Hlsl {
FILE: demo/d3d/shaders/shaderCommon.h
type MeshShaderConst (line 1) | struct MeshShaderConst
type DebugRenderConst (line 31) | struct DebugRenderConst
type MeshVertexIn (line 39) | struct MeshVertexIn
type MeshVertexOut (line 47) | struct MeshVertexOut
type PointShaderConst (line 65) | struct PointShaderConst
type PointVertexIn (line 89) | struct PointVertexIn
type PointVertexOut (line 96) | struct PointVertexOut
type PointGeoOut (line 104) | struct PointGeoOut
type FluidShaderConst (line 118) | struct FluidShaderConst
type FluidVertexIn (line 157) | struct FluidVertexIn
type FluidVertexOut (line 165) | struct FluidVertexOut
type FluidGeoOut (line 176) | struct FluidGeoOut
type PassthroughVertexOut (line 185) | struct PassthroughVertexOut
type DiffuseShaderConst (line 193) | struct DiffuseShaderConst
type DiffuseVertexIn (line 222) | struct DiffuseVertexIn
type DiffuseVertexOut (line 228) | struct DiffuseVertexOut
type DiffuseGeometryOut (line 238) | struct DiffuseGeometryOut
FILE: demo/d3d11/appD3D11Ctx.cpp
function COMRelease (line 32) | void inline COMRelease(T& t)
function COMRelease (line 39) | void inline COMRelease(T& t, UINT arraySize)
function AppGraphCtx (line 75) | AppGraphCtx* AppGraphCtxCreateD3D11(int deviceID)
function AppGraphCtxUpdateSizeD3D11 (line 167) | bool AppGraphCtxUpdateSizeD3D11(AppGraphCtx* contextIn, SDL_Window* wind...
function AppGraphCtxInitRenderTargetD3D11 (line 224) | void AppGraphCtxInitRenderTargetD3D11(AppGraphCtx* contextIn, SDL_Window...
function AppGraphCtxReleaseRenderTargetD3D11 (line 369) | void AppGraphCtxReleaseRenderTargetD3D11(AppGraphCtx* contextIn)
function AppGraphCtxReleaseD3D11 (line 394) | void AppGraphCtxReleaseD3D11(AppGraphCtx* context)
function AppGraphCtxFrameStartD3D11 (line 401) | void AppGraphCtxFrameStartD3D11(AppGraphCtx* contextIn, AppGraphColor cl...
function AppGraphCtxFramePresentD3D11 (line 418) | void AppGraphCtxFramePresentD3D11(AppGraphCtx* contextIn, bool fullsync)
function AppGraphCtxWaitForFramesD3D11 (line 427) | void AppGraphCtxWaitForFramesD3D11(AppGraphCtx* context, unsigned int ma...
function AppGraphCtxProfileEnableD3D11 (line 432) | void AppGraphCtxProfileEnableD3D11(AppGraphCtx* contextIn, bool enabled)
function AppGraphCtxProfileBeginD3D11 (line 438) | void AppGraphCtxProfileBeginD3D11(AppGraphCtx* contextIn, const char* la...
function AppGraphCtxProfileEndD3D11 (line 444) | void AppGraphCtxProfileEndD3D11(AppGraphCtx* contextIn, const char* label)
function AppGraphCtxProfileGetD3D11 (line 450) | bool AppGraphCtxProfileGetD3D11(AppGraphCtx* contextIn, const char** pla...
type TimerCPU (line 460) | struct TimerCPU
method TimerCPU (line 465) | TimerCPU()
method getDeltaTime (line 471) | double getDeltaTime()
type TimerGPU (line 480) | struct TimerGPU
method TimerGPU (line 485) | TimerGPU() {}
type Timer (line 493) | struct Timer
method Timer (line 502) | Timer() {}
type TimerValue (line 506) | struct TimerValue
type Stat (line 512) | struct Stat
method Stat (line 522) | Stat() {}
method push (line 523) | void push(float time)
method pull (line 543) | float pull(float frameTime)
method push (line 561) | void push(float cpuTime, float gpuTime)
method pull (line 567) | void pull(float frameTime)
type AppGraphProfilerD3D11 (line 575) | struct AppGraphProfilerD3D11
function AppGraphProfilerD3D11 (line 607) | AppGraphProfilerD3D11* appGraphCreateProfilerD3D11(AppGraphCtx* ctx)
function appGraphReleaseProfiler (line 612) | void appGraphReleaseProfiler(AppGraphProfilerD3D11* profiler)
function appGraphProfilerD3D11FrameBegin (line 617) | void appGraphProfilerD3D11FrameBegin(AppGraphProfilerD3D11* p)
function appGraphProfilerD3D11FrameEnd (line 642) | void appGraphProfilerD3D11FrameEnd(AppGraphProfilerD3D11* p)
function appGraphProfilerD3D11Enable (line 654) | void appGraphProfilerD3D11Enable(AppGraphProfilerD3D11* p, bool enabled)
function appGraphProfilerD3D11Begin (line 659) | void appGraphProfilerD3D11Begin(AppGraphProfilerD3D11* p, const char* la...
function appGraphProfilerD3D11End (line 683) | void appGraphProfilerD3D11End(AppGraphProfilerD3D11* p, const char* label)
function appGraphProfilerD3D11Flush (line 707) | bool appGraphProfilerD3D11Flush(AppGraphProfilerD3D11* p)
function appGraphProfilerD3D11Get (line 766) | bool appGraphProfilerD3D11Get(AppGraphProfilerD3D11* p, const char** pla...
function AppGraphCtxDedicatedVideoMemoryD3D11 (line 786) | size_t AppGraphCtxDedicatedVideoMemoryD3D11(AppGraphCtx* contextIn)
FILE: demo/d3d11/appD3D11Ctx.h
type AppGraphProfilerD3D11 (line 18) | struct AppGraphProfilerD3D11
type AppGraphCtxD3D11 (line 20) | struct AppGraphCtxD3D11
function AppGraphCtxD3D11 (line 49) | inline AppGraphCtxD3D11* cast_to_AppGraphCtxD3D11(AppGraphCtx* appctx)
function AppGraphCtx (line 54) | inline AppGraphCtx* cast_from_AppGraphCtxD3D11(AppGraphCtxD3D11* appctx)
FILE: demo/d3d11/debugLineRenderD3D11.h
type DebugLineRenderD3D11 (line 9) | struct DebugLineRenderD3D11
FILE: demo/d3d11/demoContextD3D11.cpp
function COMRelease (line 34) | void inline COMRelease(T& t)
function COMRelease (line 41) | void inline COMRelease(T& t, UINT arraySize)
function DemoContext (line 54) | DemoContext* CreateDemoContextD3D11()
function Matrix44 (line 94) | Matrix44 ConvertToD3DProjection(const Matrix44& proj)
function __checkDxErrors (line 107) | inline void __checkDxErrors(HRESULT err, const char *file, const int line)
function FluidRenderer (line 418) | FluidRenderer* DemoContextD3D11::createFluidRenderer(uint32_t width, uin...
function FluidRenderBuffers (line 432) | FluidRenderBuffers* DemoContextD3D11::createFluidRenderBuffers(int numPa...
function ShadowMap (line 566) | ShadowMap* DemoContextD3D11::shadowCreate()
function GpuMesh (line 837) | GpuMesh* DemoContextD3D11::createGpuMesh(const Mesh* m)
function DiffuseRenderBuffers (line 1050) | DiffuseRenderBuffers* DemoContextD3D11::createDiffuseRenderBuffers(int n...
FILE: demo/d3d11/demoContextD3D11.h
function DemoContext (line 14) | struct DemoContextD3D11 : public DemoContext
FILE: demo/d3d11/diffuseRenderD3D11.h
type DiffuseRenderBuffersD3D11 (line 24) | struct DiffuseRenderBuffersD3D11
type DiffuseRendererD3D11 (line 51) | struct DiffuseRendererD3D11
FILE: demo/d3d11/fluidRenderD3D11.cpp
type PassthroughVertex (line 47) | struct PassthroughVertex
FILE: demo/d3d11/fluidRenderD3D11.h
type FluidRenderBuffersD3D11 (line 24) | struct FluidRenderBuffersD3D11
type FluidRendererD3D11 (line 64) | struct FluidRendererD3D11
FILE: demo/d3d11/imguiGraphD3D11.cpp
function COMRelease (line 22) | void inline COMRelease(T& t)
type Vertex (line 38) | struct Vertex
type Scissor (line 55) | struct Scissor
type Params (line 72) | struct Params
function imguiGraphContextDestroyD3D11 (line 80) | void imguiGraphContextDestroyD3D11()
function imguiGraphContextInitD3D11 (line 92) | void imguiGraphContextInitD3D11(const ImguiGraphDesc* descIn)
function imguiGraphContextUpdateD3D11 (line 207) | void imguiGraphContextUpdateD3D11(const ImguiGraphDesc* descIn)
function imguiGraphRecordBeginD3D11 (line 217) | void imguiGraphRecordBeginD3D11()
function imguiGraphFlush (line 289) | static void imguiGraphFlush()
function imguiGraphRecordEndD3D11 (line 326) | void imguiGraphRecordEndD3D11()
function imguiGraphEnableScissorD3D11 (line 348) | void imguiGraphEnableScissorD3D11(int x, int y, int width, int height)
function imguiGraphDisableScissorD3D11 (line 363) | void imguiGraphDisableScissorD3D11()
function imguiGraphVertex2fD3D11 (line 380) | void imguiGraphVertex2fD3D11(float x, float y)
function imguiGraphVertex2fvD3D11 (line 386) | void imguiGraphVertex2fvD3D11(const float* v)
function imguiGraphTexCoord2fD3D11 (line 401) | void imguiGraphTexCoord2fD3D11(float u, float v)
function imguiGraphColor4ubD3D11 (line 407) | void imguiGraphColor4ubD3D11(uint8_t red, uint8_t green, uint8_t blue, u...
function imguiGraphColor4ubvD3D11 (line 415) | void imguiGraphColor4ubvD3D11(const uint8_t* v)
function imguiGraphFontTextureEnableD3D11 (line 423) | void imguiGraphFontTextureEnableD3D11()
function imguiGraphFontTextureDisableD3D11 (line 428) | void imguiGraphFontTextureDisableD3D11()
function imguiGraphFontTextureInitD3D11 (line 434) | void imguiGraphFontTextureInitD3D11(unsigned char* data)
function imguiGraphFontTextureReleaseD3D11 (line 473) | void imguiGraphFontTextureReleaseD3D11()
FILE: demo/d3d11/imguiGraphD3D11.h
type ID3D11Device (line 18) | struct ID3D11Device
type ID3D11DeviceContext (line 19) | struct ID3D11DeviceContext
type ImguiGraphDescD3D11 (line 21) | struct ImguiGraphDescD3D11
function ImguiGraphDescD3D11 (line 33) | inline const ImguiGraphDescD3D11* cast_to_imguiGraphDescD3D11(const Imgu...
function ImguiGraphDesc (line 38) | inline ImguiGraphDesc* cast_from_imguiGraphDescD3D11(ImguiGraphDescD3D11...
FILE: demo/d3d11/imguiInteropD3D11.cpp
function imguiInteropGraphInitD3D11 (line 26) | bool imguiInteropGraphInitD3D11(imguiGraphInit_t func, const char* fontp...
function imguiInteropGraphUpdateD3D11 (line 40) | void imguiInteropGraphUpdateD3D11(imguiGraphUpdate_t func, AppGraphCtx* ...
FILE: demo/d3d11/meshRenderD3D11.cpp
type AsyncComputeBench (line 35) | namespace AsyncComputeBench
FILE: demo/d3d11/meshRenderD3D11.h
type GpuMeshD3D11 (line 24) | struct GpuMeshD3D11
type MeshRendererD3D11 (line 52) | struct MeshRendererD3D11
FILE: demo/d3d11/pointRenderD3D11.h
type PointRendererD3D11 (line 20) | struct PointRendererD3D11
FILE: demo/d3d11/renderTargetD3D11.cpp
function D3D11_TEXTURE2D_DESC (line 17) | static D3D11_TEXTURE2D_DESC _getTextureDesc(DXGI_FORMAT format, UINT wid...
function D3D11_DEPTH_STENCIL_VIEW_DESC (line 38) | static D3D11_DEPTH_STENCIL_VIEW_DESC _getDsvDesc(DXGI_FORMAT format, D3D...
function D3D11_SHADER_RESOURCE_VIEW_DESC (line 48) | static D3D11_SHADER_RESOURCE_VIEW_DESC _getSrvDesc(DXGI_FORMAT format)
function HRESULT (line 59) | HRESULT RenderTargetD3D11::init(ID3D11Device* device, int width, int hei...
FILE: demo/d3d11/renderTargetD3D11.h
type RenderTargetD3D11 (line 23) | struct RenderTargetD3D11
FILE: demo/d3d11/shadowMapD3D11.cpp
function D3D11_TEXTURE2D_DESC (line 17) | static D3D11_TEXTURE2D_DESC _getTextureDesc(DXGI_FORMAT format, UINT wid...
function D3D11_DEPTH_STENCIL_VIEW_DESC (line 38) | static D3D11_DEPTH_STENCIL_VIEW_DESC _getDsvDesc(DXGI_FORMAT format, D3D...
function D3D11_SHADER_RESOURCE_VIEW_DESC (line 48) | static D3D11_SHADER_RESOURCE_VIEW_DESC _getSrvDesc(DXGI_FORMAT format)
function HRESULT (line 59) | HRESULT ShadowMapD3D11::init(ID3D11Device* device, int resolution)
FILE: demo/d3d11/shadowMapD3D11.h
type ShadowMapD3D11 (line 23) | struct ShadowMapD3D11
FILE: demo/d3d12/NvCoDx12CircularResourceHeap.cpp
type nvidia (line 10) | namespace nvidia {
type Common (line 11) | namespace Common {
FILE: demo/d3d12/NvCoDx12CircularResourceHeap.h
function namespace (line 26) | namespace nvidia {
function Cursor (line 174) | inline Cursor allocateConstantBuffer(size_t size) { return allocate(size...
function Cursor (line 176) | inline Cursor allocateVertexBuffer(size_t size) { return allocate(size, ...
function Cursor (line 179) | inline Cursor newConstantBuffer(const void* data, size_t size) { Cursor ...
function Cursor (line 182) | Cursor newConstantBuffer(const T& in) { return newConstantBuffer(&in, si...
function D3D12_GPU_VIRTUAL_ADDRESS (line 191) | D3D12_GPU_VIRTUAL_ADDRESS getGpuHandle(const Cursor& cursor) const { re...
type Block (line 200) | struct Block
type PendingEntry (line 206) | struct PendingEntry
FILE: demo/d3d12/NvCoDx12CounterFence.cpp
type nvidia (line 10) | namespace nvidia {
type Common (line 11) | namespace Common {
FILE: demo/d3d12/NvCoDx12CounterFence.h
function namespace (line 26) | namespace nvidia {
FILE: demo/d3d12/NvCoDx12DescriptorHeap.cpp
type nvidia (line 10) | namespace nvidia {
type Common (line 11) | namespace Common {
FILE: demo/d3d12/NvCoDx12DescriptorHeap.h
function namespace (line 21) | namespace nvidia {
FILE: demo/d3d12/NvCoDx12Handle.h
function namespace (line 20) | namespace nvidia {
FILE: demo/d3d12/NvCoDx12HelperUtil.cpp
type nvidia (line 13) | namespace nvidia {
type Common (line 14) | namespace Common {
FILE: demo/d3d12/NvCoDx12HelperUtil.h
function namespace (line 26) | namespace nvidia {
FILE: demo/d3d12/NvCoDx12RenderTarget.cpp
type nvidia (line 7) | namespace nvidia {
type Common (line 8) | namespace Common {
function DXGI_FORMAT (line 238) | DXGI_FORMAT Dx12RenderTarget::getSrvFormat(BufferType type) const
function DXGI_FORMAT (line 243) | DXGI_FORMAT Dx12RenderTarget::getTargetFormat(BufferType type) const
function D3D12_SHADER_RESOURCE_VIEW_DESC (line 248) | D3D12_SHADER_RESOURCE_VIEW_DESC Dx12RenderTarget::calcDefaultSrvDesc...
FILE: demo/d3d12/NvCoDx12RenderTarget.h
function namespace (line 10) | namespace nvidia {
FILE: demo/d3d12/NvCoDx12Resource.cpp
type nvidia (line 16) | namespace nvidia {
type Common (line 17) | namespace Common {
function D3D12_RESOURCE_BARRIER (line 32) | D3D12_RESOURCE_BARRIER& Dx12BarrierSubmitter::_expandOne()
function DXGI_FORMAT (line 81) | DXGI_FORMAT Dx12ResourceBase::calcFormat(DxFormatUtil::UsageType usa...
function ID3D12Resource (line 145) | ID3D12Resource* Dx12Resource::detach()
FILE: demo/d3d12/NvCoDx12Resource.h
function namespace (line 14) | namespace nvidia {
type Dx12ResourceBase (line 47) | struct Dx12ResourceBase
function restore (line 65) | inline void restore(Dx12BarrierSubmitter& submitter) { transition(m_prev...
function restore (line 67) | inline void restore(Dx12BarrierSubmitter& submitter) { (void)submitter; }
function Dx12ResourceBase (line 89) | struct Dx12Resource: public Dx12ResourceBase
function D3D12_SHADER_BYTECODE (line 128) | struct Dx12Blob : public D3D12_SHADER_BYTECODE
FILE: demo/d3d12/NvCoDx12ResourceScopeManager.cpp
type nvidia (line 12) | namespace nvidia {
type Common (line 13) | namespace Common {
function ID3D12Resource (line 60) | ID3D12Resource* Dx12ResourceScopeManager::newUploadResource(const D3...
FILE: demo/d3d12/NvCoDx12ResourceScopeManager.h
function namespace (line 24) | namespace nvidia {
FILE: demo/d3d12/NvCoDxDebugUtil.cpp
type nvidia (line 10) | namespace nvidia {
type Common (line 11) | namespace Common {
FILE: demo/d3d12/NvCoDxDebugUtil.h
function namespace (line 23) | namespace nvidia {
FILE: demo/d3d12/NvCoDxFormatUtil.cpp
type nvidia (line 12) | namespace nvidia {
type Common (line 13) | namespace Common {
function DXGI_FORMAT (line 15) | DXGI_FORMAT DxFormatUtil::calcResourceFormat(UsageType usage, int us...
function DXGI_FORMAT (line 32) | DXGI_FORMAT DxFormatUtil::calcFormat(UsageType usage, DXGI_FORMAT fo...
FILE: demo/d3d12/NvCoDxFormatUtil.h
function namespace (line 7) | namespace nvidia {
FILE: demo/d3d12/NvCoFreeList.cpp
type nvidia (line 15) | namespace nvidia {
type Common (line 16) | namespace Common {
FILE: demo/d3d12/NvCoFreeList.h
function namespace (line 18) | namespace nvidia {
FILE: demo/d3d12/NvResult.h
type NvResult (line 47) | typedef int NvResult;
function namespace (line 130) | namespace nvidia {
FILE: demo/d3d12/appD3D12Ctx.cpp
function COMRelease (line 32) | void inline COMRelease(T& t)
function COMRelease (line 39) | void inline COMRelease(T& t, UINT arraySize)
function AppGraphCtx (line 90) | AppGraphCtx* AppGraphCtxCreateD3D12(int deviceID)
function AppGraphCtxInitRenderTargetD3D12 (line 260) | void AppGraphCtxInitRenderTargetD3D12(AppGraphCtx* contextIn, SDL_Window...
function AppGraphCtxUpdateSizeD3D12 (line 474) | bool AppGraphCtxUpdateSizeD3D12(AppGraphCtx* contextIn, SDL_Window* wind...
function AppGraphCtxReleaseRenderTargetD3D12 (line 534) | void AppGraphCtxReleaseRenderTargetD3D12(AppGraphCtx* contextIn)
function AppGraphCtxReleaseD3D12 (line 573) | void AppGraphCtxReleaseD3D12(AppGraphCtx* context)
function AppGraphCtxFrameStartD3D12 (line 580) | void AppGraphCtxFrameStartD3D12(AppGraphCtx* contextIn, AppGraphColor cl...
function AppGraphCtxFramePresentD3D12 (line 631) | void AppGraphCtxFramePresentD3D12(AppGraphCtx* contextIn, bool fullsync)
function AppGraphCtxWaitForFramesD3D12 (line 670) | void AppGraphCtxWaitForFramesD3D12(AppGraphCtx* contextIn, unsigned int ...
function AppGraphCtxProfileEnableD3D12 (line 725) | void AppGraphCtxProfileEnableD3D12(AppGraphCtx* contextIn, bool enabled)
function AppGraphCtxProfileBeginD3D12 (line 731) | void AppGraphCtxProfileBeginD3D12(AppGraphCtx* contextIn, const char* la...
function AppGraphCtxProfileEndD3D12 (line 737) | void AppGraphCtxProfileEndD3D12(AppGraphCtx* contextIn, const char* label)
function AppGraphCtxProfileGetD3D12 (line 743) | bool AppGraphCtxProfileGetD3D12(AppGraphCtx* contextIn, const char** pla...
function AppDescriptorReserveHandleD3D12 (line 774) | AppDescriptorReserveHandleD3D12 AppDynamicDescriptorHeapD3D12::reserveDe...
type TimerCPU (line 804) | struct TimerCPU
method TimerCPU (line 809) | TimerCPU()
method getDeltaTime (line 815) | double getDeltaTime()
type TimerGPU (line 824) | struct TimerGPU
method TimerGPU (line 831) | TimerGPU() {}
type Timer (line 839) | struct Timer
method Timer (line 848) | Timer() {}
type TimerValue (line 852) | struct TimerValue
type Stat (line 858) | struct Stat
method Stat (line 868) | Stat() {}
method push (line 869) | void push(float time)
method pull (line 889) | float pull(float frameTime)
method push (line 907) | void push(float cpuTime, float gpuTime)
method pull (line 913) | void pull(float frameTime)
type HeapPropsReadback (line 920) | struct HeapPropsReadback : public D3D12_HEAP_PROPERTIES
method HeapPropsReadback (line 922) | HeapPropsReadback()
type ResourceDescBuffer (line 931) | struct ResourceDescBuffer : public D3D12_RESOURCE_DESC
method ResourceDescBuffer (line 933) | ResourceDescBuffer(UINT64 size)
type AppGraphProfilerD3D12 (line 950) | struct AppGraphProfilerD3D12
function AppGraphProfilerD3D12 (line 979) | AppGraphProfilerD3D12* appGraphCreateProfilerD3D12(AppGraphCtx* ctx)
function appGraphReleaseProfiler (line 984) | void appGraphReleaseProfiler(AppGraphProfilerD3D12* profiler)
function appGraphProfilerD3D12FrameBegin (line 989) | void appGraphProfilerD3D12FrameBegin(AppGraphProfilerD3D12* p)
function appGraphProfilerD3D12FrameEnd (line 1001) | void appGraphProfilerD3D12FrameEnd(AppGraphProfilerD3D12* p)
function appGraphProfilerD3D12Enable (line 1009) | void appGraphProfilerD3D12Enable(AppGraphProfilerD3D12* p, bool enabled)
function appGraphProfilerD3D12Begin (line 1014) | void appGraphProfilerD3D12Begin(AppGraphProfilerD3D12* p, const char* la...
function appGraphProfilerD3D12End (line 1048) | void appGraphProfilerD3D12End(AppGraphProfilerD3D12* p, const char* label)
function appGraphProfilerD3D12Flush (line 1074) | bool appGraphProfilerD3D12Flush(AppGraphProfilerD3D12* p)
function appGraphProfilerD3D12Get (line 1132) | bool appGraphProfilerD3D12Get(AppGraphProfilerD3D12* p, const char** pla...
function AppGraphCtxDedicatedVideoMemoryD3D12 (line 1152) | size_t AppGraphCtxDedicatedVideoMemoryD3D12(AppGraphCtx* contextIn)
function AppGraphCtxBeginGpuWork (line 1158) | void AppGraphCtxBeginGpuWork(AppGraphCtxD3D12* context)
function AppGraphCtxEndGpuWork (line 1170) | void AppGraphCtxEndGpuWork(AppGraphCtxD3D12* context)
function AppGraphCtxPrepareRenderTarget (line 1195) | void AppGraphCtxPrepareRenderTarget(AppGraphCtxD3D12* context)
function AppGraphCtxWaitForGPU (line 1208) | void AppGraphCtxWaitForGPU(AppGraphCtxD3D12* context)
FILE: demo/d3d12/appD3D12Ctx.h
type IDXGISwapChain3 (line 18) | struct IDXGISwapChain3
type AppGraphProfilerD3D12 (line 20) | struct AppGraphProfilerD3D12
type AppDescriptorReserveHandleD3D12 (line 22) | struct AppDescriptorReserveHandleD3D12
type AppDynamicDescriptorHeapD3D12 (line 30) | struct AppDynamicDescriptorHeapD3D12
type AppGraphCtxD3D12 (line 46) | struct AppGraphCtxD3D12
function AppGraphCtxD3D12 (line 122) | inline AppGraphCtxD3D12* cast_to_AppGraphCtxD3D12(AppGraphCtx* appctx)
function AppGraphCtx (line 127) | inline AppGraphCtx* cast_from_AppGraphCtxD3D12(AppGraphCtxD3D12* appctx)
function ScopeGpuWork (line 167) | struct ScopeGpuWork
FILE: demo/d3d12/bufferD3D12.cpp
type FlexSample (line 16) | namespace FlexSample {
FILE: demo/d3d12/bufferD3D12.h
function namespace (line 12) | namespace FlexSample {
FILE: demo/d3d12/demoContextD3D12.cpp
function DemoContext (line 56) | DemoContext* CreateDemoContextD3D12()
type FlexSample (line 61) | namespace FlexSample {
function COMRelease (line 83) | void inline COMRelease(T& t)
function FluidRenderer (line 1421) | FluidRenderer* DemoContextD3D12::createFluidRenderer(uint32_t width, u...
function FluidRenderBuffers (line 1432) | FluidRenderBuffers* DemoContextD3D12::createFluidRenderBuffers(int num...
function ShadowMap (line 1448) | ShadowMap* DemoContextD3D12::shadowCreate()
function GpuMesh (line 1468) | GpuMesh* DemoContextD3D12::createGpuMesh(const Mesh* m)
function DiffuseRenderBuffers (line 1482) | DiffuseRenderBuffers* DemoContextD3D12::createDiffuseRenderBuffers(int...
FILE: demo/d3d12/demoContextD3D12.h
function namespace (line 31) | namespace FlexSample {
type FluidRenderBuffersD3D12 (line 42) | struct FluidRenderBuffersD3D12
type DiffuseRenderBuffersD3D12 (line 80) | struct DiffuseRenderBuffersD3D12
function DemoContext (line 107) | struct DemoContextD3D12: public DemoContext
FILE: demo/d3d12/diffusePointRenderPipelineD3D12.cpp
type FlexSample (line 20) | namespace FlexSample {
function D3D12_FILL_MODE (line 34) | static D3D12_FILL_MODE _getFillMode(DiffusePointRenderPipelineD3D12::P...
function D3D12_CULL_MODE (line 39) | static D3D12_CULL_MODE _getCullMode(DiffusePointRenderPipelineD3D12::P...
function _initRasterizerDesc (line 44) | static void _initRasterizerDesc(DiffusePointRenderPipelineD3D12::Pipel...
function _initPipelineStateDesc (line 51) | static void _initPipelineStateDesc(DiffusePointRenderPipelineD3D12::Pi...
FILE: demo/d3d12/diffusePointRenderPipelineD3D12.h
function namespace (line 21) | namespace FlexSample {
FILE: demo/d3d12/fluidCompositeRenderPipelineD3D12.cpp
type FlexSample (line 23) | namespace FlexSample {
function _initPipelineStateDesc (line 30) | static void _initPipelineStateDesc(FluidCompositeRenderPipelineD3D12::...
FILE: demo/d3d12/fluidCompositeRenderPipelineD3D12.h
function namespace (line 23) | namespace FlexSample {
FILE: demo/d3d12/fluidEllipsoidRenderPipelineD3D12.cpp
type FlexSample (line 20) | namespace FlexSample {
function _initPipelineStateDesc (line 35) | static void _initPipelineStateDesc(FluidEllipsoidRenderPipelineD3D12::...
FILE: demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h
function namespace (line 21) | namespace FlexHlsl {
function namespace (line 25) | namespace FlexSample {
FILE: demo/d3d12/fluidSmoothRenderPipelineD3D12.cpp
type FlexSample (line 19) | namespace FlexSample {
function _initPipelineStateDesc (line 27) | static void _initPipelineStateDesc(FluidSmoothRenderPipelineD3D12::Pip...
FILE: demo/d3d12/fluidSmoothRenderPipelineD3D12.h
function namespace (line 22) | namespace FlexSample {
FILE: demo/d3d12/fluidThicknessRenderPipelineD3D12.cpp
type FlexSample (line 20) | namespace FlexSample {
function _initPipelineStateDesc (line 35) | static void _initPipelineStateDesc(FluidThicknessRenderPipelineD3D12::...
FILE: demo/d3d12/fluidThicknessRenderPipelineD3D12.h
function namespace (line 21) | namespace FlexHlsl {
function namespace (line 25) | namespace FlexSample {
FILE: demo/d3d12/imguiGraphD3D12.cpp
function COMRelease (line 23) | void inline COMRelease(T& t)
type Vertex (line 34) | struct Vertex
type Scissor (line 49) | struct Scissor
type Params (line 69) | struct Params
function imguiGraphContextInitD3D12 (line 79) | void imguiGraphContextInitD3D12(const ImguiGraphDesc* descIn)
function imguiGraphContextUpdateD3D12 (line 314) | void imguiGraphContextUpdateD3D12(const ImguiGraphDesc* descIn)
function imguiGraphContextDestroyD3D12 (line 321) | void imguiGraphContextDestroyD3D12()
function imguiGraphRecordBeginD3D12 (line 329) | void imguiGraphRecordBeginD3D12()
function imguiGraphFlush (line 393) | static void imguiGraphFlush()
function imguiGraphRecordEndD3D12 (line 414) | void imguiGraphRecordEndD3D12()
function imguiGraphEnableScissorD3D12 (line 432) | void imguiGraphEnableScissorD3D12(int x, int y, int width, int height)
function imguiGraphDisableScissorD3D12 (line 447) | void imguiGraphDisableScissorD3D12()
function imguiGraphVertex2fD3D12 (line 464) | void imguiGraphVertex2fD3D12(float x, float y)
function imguiGraphVertex2fvD3D12 (line 470) | void imguiGraphVertex2fvD3D12(const float* v)
function imguiGraphTexCoord2fD3D12 (line 485) | void imguiGraphTexCoord2fD3D12(float u, float v)
function imguiGraphColor4ubD3D12 (line 491) | void imguiGraphColor4ubD3D12(uint8_t red, uint8_t green, uint8_t blue, u...
function imguiGraphColor4ubvD3D12 (line 499) | void imguiGraphColor4ubvD3D12(const uint8_t* v)
function imguiGraphFontTextureEnableD3D12 (line 507) | void imguiGraphFontTextureEnableD3D12()
function imguiGraphFontTextureDisableD3D12 (line 512) | void imguiGraphFontTextureDisableD3D12()
function imguiGraphFontTextureInitD3D12 (line 518) | void imguiGraphFontTextureInitD3D12(unsigned char* data)
function imguiGraphFontTextureReleaseD3D12 (line 660) | void imguiGraphFontTextureReleaseD3D12()
FILE: demo/d3d12/imguiGraphD3D12.h
type ImguiDescriptorReserveHandleD3D12 (line 18) | struct ImguiDescriptorReserveHandleD3D12
type ImguiDynamicDescriptorHeapD3D12 (line 26) | struct ImguiDynamicDescriptorHeapD3D12
type ImguiGraphDescD3D12 (line 32) | struct ImguiGraphDescD3D12
function ImguiGraphDescD3D12 (line 49) | inline const ImguiGraphDescD3D12* cast_to_imguiGraphDescD3D12(const Imgu...
function ImguiGraphDesc (line 54) | inline ImguiGraphDesc* cast_from_imguiGraphDescD3D12(ImguiGraphDescD3D12...
FILE: demo/d3d12/imguiInteropD3D12.cpp
type AppGraphCtx (line 22) | struct AppGraphCtx
function imguiInteropUpdateDesc (line 26) | inline void imguiInteropUpdateDesc(ImguiGraphDescD3D12& desc, AppGraphCt...
function imguiInteropGraphInitD3D12 (line 47) | bool imguiInteropGraphInitD3D12(imguiGraphInit_t func, const char* fontp...
function imguiInteropGraphUpdateD3D12 (line 55) | void imguiInteropGraphUpdateD3D12(imguiGraphUpdate_t func, AppGraphCtx* ...
FILE: demo/d3d12/lineRenderPipelineD3D12.cpp
type FlexSample (line 18) | namespace FlexSample {
FILE: demo/d3d12/lineRenderPipelineD3D12.h
function namespace (line 22) | namespace FlexSample {
FILE: demo/d3d12/meshRenderPipelineD3D12.cpp
type FlexSample (line 20) | namespace FlexSample {
type AsyncComputeBench (line 23) | namespace AsyncComputeBench
function D3D12_FILL_MODE (line 70) | static D3D12_FILL_MODE _getFillMode(MeshRenderPipelineD3D12::PipelineS...
function D3D12_CULL_MODE (line 79) | static D3D12_CULL_MODE _getCullMode(MeshRenderPipelineD3D12::PipelineS...
function _initRasterizerDesc (line 99) | static void _initRasterizerDesc(MeshRenderPipelineD3D12::PipelineState...
function _initPipelineStateDesc (line 107) | static void _initPipelineStateDesc(MeshRenderPipelineD3D12::PipelineSt...
FILE: demo/d3d12/meshRenderPipelineD3D12.h
function namespace (line 22) | namespace FlexSample {
FILE: demo/d3d12/meshRenderer.cpp
type FlexSample (line 13) | namespace FlexSample {
FILE: demo/d3d12/meshRenderer.h
function namespace (line 7) | namespace FlexSample {
type MeshData (line 45) | struct MeshData
type MeshData2 (line 67) | struct MeshData2
type LineData (line 90) | struct LineData
type PointData (line 110) | struct PointData
type RenderMesh (line 137) | struct RenderMesh
type RenderAllocation (line 144) | struct RenderAllocation
type MeshRenderer (line 160) | struct MeshRenderer
FILE: demo/d3d12/meshRendererD3D12.cpp
type FlexSample (line 3) | namespace FlexSample {
function D3D12_VERTEX_BUFFER_VIEW (line 79) | D3D12_VERTEX_BUFFER_VIEW MeshRendererD3D12::_newImmediateVertexBuffer(...
function D3D12_VERTEX_BUFFER_VIEW (line 96) | D3D12_VERTEX_BUFFER_VIEW MeshRendererD3D12::_newStridedImmediateVertex...
function D3D12_INDEX_BUFFER_VIEW (line 131) | D3D12_INDEX_BUFFER_VIEW MeshRendererD3D12::_newImmediateIndexBuffer(co...
function RenderMesh (line 304) | RenderMesh* MeshRendererD3D12::createMesh(const MeshData& meshData)
function RenderMesh (line 315) | RenderMesh* MeshRendererD3D12::createMesh(const MeshData2& meshData)
FILE: demo/d3d12/meshRendererD3D12.h
type ShadowMap (line 10) | struct ShadowMap
function namespace (line 12) | namespace FlexSample {
FILE: demo/d3d12/meshUtil.cpp
type FlexSample (line 13) | namespace FlexSample {
function RenderMesh (line 15) | RenderMesh* MeshUtil::createRenderMesh(MeshRenderer* renderer, const M...
FILE: demo/d3d12/meshUtil.h
type Vec4 (line 11) | typedef ::Vec4 FlexVec4;
type Vec3 (line 12) | typedef ::Vec3 FlexVec3;
type Vec2 (line 13) | typedef ::Vec2 FlexVec2;
function namespace (line 15) | namespace FlexSample {
FILE: demo/d3d12/pipelineUtilD3D12.cpp
type FlexSample (line 5) | namespace FlexSample {
FILE: demo/d3d12/pipelineUtilD3D12.h
function namespace (line 21) | namespace FlexSample {
FILE: demo/d3d12/pointRenderPipelineD3D12.cpp
type FlexSample (line 20) | namespace FlexSample {
function D3D12_FILL_MODE (line 37) | static D3D12_FILL_MODE _getFillMode(PointRenderPipelineD3D12::Pipeline...
function D3D12_CULL_MODE (line 42) | static D3D12_CULL_MODE _getCullMode(PointRenderPipelineD3D12::Pipeline...
function _initRasterizerDesc (line 47) | static void _initRasterizerDesc(PointRenderPipelineD3D12::PipelineStat...
function _initPipelineStateDesc (line 54) | static void _initPipelineStateDesc(PointRenderPipelineD3D12::PipelineS...
FILE: demo/d3d12/pointRenderPipelineD3D12.h
function namespace (line 22) | namespace FlexSample {
FILE: demo/d3d12/renderStateD3D12.cpp
type FlexSample (line 4) | namespace FlexSample {
function RenderStateD3D12 (line 49) | RenderStateD3D12 RenderStateManagerD3D12::getState()
FILE: demo/d3d12/renderStateD3D12.h
function namespace (line 21) | namespace FlexSample {
type RenderStateD3D12 (line 33) | struct RenderStateD3D12
type RenderStateManagerD3D12 (line 47) | struct RenderStateManagerD3D12
FILE: demo/demoContext.h
function class (line 35) | class DemoContext
FILE: demo/helpers.h
function SampleSDF (line 37) | float SampleSDF(const float* sdf, int dim, int x, int y, int z)
function Vec3 (line 47) | Vec3 SampleSDFGrad(const float* sdf, int dim, int x, int y, int z)
function GetParticleBounds (line 65) | void GetParticleBounds(Vec3& lower, Vec3& upper)
function SkinMesh (line 403) | void SkinMesh()
function AddPlinth (line 461) | void AddPlinth()
function AddSphere (line 472) | void AddSphere(float radius, Vec3 position, Quat rotation)
function AddCapsule (line 489) | void AddCapsule(float radius, float halfHeight, Vec3 position, Quat rota...
function CreateSDF (line 507) | void CreateSDF(const Mesh* mesh, uint32_t dim, Vec3 lower, Vec3 upper, f...
function AddRandomConvex (line 533) | void AddRandomConvex(int numPlanes, Vec3 position, float minDist, float ...
function CreateRandomBody (line 635) | void CreateRandomBody(int numPlanes, Vec3 position, float minDist, float...
function NvFlexTriangleMeshId (line 703) | NvFlexTriangleMeshId CreateTriangleMesh(Mesh* m)
function AddTriangleMesh (line 734) | void AddTriangleMesh(NvFlexTriangleMeshId mesh, Vec3 translation, Quat r...
function AddSDF (line 814) | void AddSDF(NvFlexDistanceFieldId sdf, Vec3 translation, Quat rotation, ...
function GridIndex (line 828) | inline int GridIndex(int x, int y, int dx) { return y*dx + x; }
function CreateSpringGrid (line 830) | void CreateSpringGrid(Vec3 lower, int dx, int dy, int dz, float radius, ...
type Tri (line 973) | struct Tri
type TriKey (line 996) | struct TriKey
function CreateTetMesh (line 1026) | void CreateTetMesh(const char* filename, Vec3 lower, float scale, float ...
function PickParticle (line 1137) | int PickParticle(Vec3 origin, Vec3 dir, Vec4* particles, int* phases, in...
function CalculateRigidCentersOfMass (line 1171) | void CalculateRigidCentersOfMass(const Vec4* restPositions, int numRestP...
function CalculateRigidLocalPositions (line 1214) | void CalculateRigidLocalPositions(const Vec4* restPositions, const int* ...
function DrawImguiString (line 1234) | void DrawImguiString(int x, int y, Vec3 color, int align, const char* s,...
function DrawShadowedText (line 1252) | void DrawShadowedText(int x, int y, Vec3 color, int align, const char* s...
function DrawRect (line 1267) | void DrawRect(float x, float y, float w, float h, Vec3 color)
function DrawShadowedRect (line 1272) | void DrawShadowedRect(float x, float y, float w, float h, Vec3 color)
function DrawLine (line 1278) | void DrawLine(float x0, float y0, float x1, float y1, float r, Vec3 color)
function DrawShadowedLine (line 1283) | void DrawShadowedLine(float x0, float y0, float x1, float y1, float r, V...
function Vec3 (line 1291) | Vec3 CalculateMean(const Vec3* particles, const int* indices, int numInd...
function CalculateRadius (line 1304) | float CalculateRadius(const Vec3* particles, Vec3 center, const int* ind...
type Cluster (line 1318) | struct Cluster
type Seed (line 1327) | struct Seed
function CreateSkinning (line 1471) | void CreateSkinning(const Vec3* vertices, int numVertices, const Vec3* c...
function SampleMesh (line 1550) | void SampleMesh(Mesh* mesh, Vec3 lower, Vec3 scale, float rotation, floa...
function ClearShapes (line 1675) | void ClearShapes()
function UpdateShapes (line 1685) | void UpdateShapes()
function GetShapeBounds (line 1692) | void GetShapeBounds(Vec3& totalLower, Vec3& totalUpper)
FILE: demo/imgui.cpp
function resetGfxCmdQueue (line 49) | static void resetGfxCmdQueue()
function addGfxCmdScissor (line 55) | static void addGfxCmdScissor(int x, int y, int w, int h)
function addGfxCmdRect (line 69) | static void addGfxCmdRect(float x, float y, float w, float h, unsigned i...
function addGfxCmdLine (line 84) | static void addGfxCmdLine(float x0, float y0, float x1, float y1, float ...
function addGfxCmdRoundedRect (line 99) | static void addGfxCmdRoundedRect(float x, float y, float w, float h, flo...
function addGfxCmdTriangle (line 114) | static void addGfxCmdTriangle(int x, int y, int w, int h, int flags, uns...
function addGfxCmdText (line 128) | static void addGfxCmdText(int x, int y, int align, const char* text, uns...
type GuiState (line 143) | struct GuiState
method GuiState (line 145) | GuiState() :
function setStateLeft (line 177) | void setStateLeft(bool bLeftDown)
function anyActive (line 184) | inline bool anyActive()
function isActive (line 189) | inline bool isActive(unsigned int id)
function isHot (line 194) | inline bool isHot(unsigned int id)
function inRect (line 199) | inline bool inRect(int x, int y, int w, int h, bool checkScroll = true)
function clearInput (line 204) | inline void clearInput()
function clearActive (line 211) | inline void clearActive()
function setActive (line 218) | inline void setActive(unsigned int id)
function setHot (line 224) | inline void setHot(unsigned int id)
function buttonLogic (line 235) | static bool buttonLogic(unsigned int id, bool over)
function updateInput (line 274) | static void updateInput(int mx, int my, unsigned char mbut, int scroll)
function imguiBeginFrame (line 287) | void imguiBeginFrame(int mx, int my, unsigned char mbut, int scroll)
function imguiEndFrame (line 308) | void imguiEndFrame()
function imguiGfxCmd (line 313) | const imguiGfxCmd* imguiGetRenderQueue()
function imguiGetRenderQueueSize (line 318) | int imguiGetRenderQueueSize()
function imguiBeginScrollArea (line 345) | bool imguiBeginScrollArea(const char* name, int x, int y, int w, int h, ...
function imguiEndScrollArea (line 376) | void imguiEndScrollArea()
function imguiButton (line 448) | bool imguiButton(const char* text, bool enabled)
function imguiItem (line 471) | bool imguiItem(const char* text, bool enabled, unsigned int color)
function imguiCheck (line 496) | bool imguiCheck(const char* text, bool checked, bool enabled)
function imguiCollapse (line 529) | bool imguiCollapse(const char* text, const char* subtext, bool checked, ...
function imguiLabel (line 562) | void imguiLabel(const char* text)
function imguiValue (line 570) | void imguiValue(const char* text)
function imguiSlider (line 580) | bool imguiSlider(const char* text, float* val, float vmin, float vmax, f...
function imguiIndent (line 650) | void imguiIndent()
function imguiUnindent (line 656) | void imguiUnindent()
function imguiSeparator (line 662) | void imguiSeparator()
function imguiSeparatorLine (line 667) | void imguiSeparatorLine()
function imguiDrawText (line 678) | void imguiDrawText(int x, int y, int align, const char* text, unsigned i...
function imguiDrawLine (line 683) | void imguiDrawLine(float x0, float y0, float x1, float y1, float r, unsi...
function imguiDrawRect (line 688) | void imguiDrawRect(float x, float y, float w, float h, unsigned int color)
function imguiDrawRoundedRect (line 693) | void imguiDrawRoundedRect(float x, float y, float w, float h, float r, u...
FILE: demo/imgui.h
type imguiMouseButton (line 22) | enum imguiMouseButton
type imguiTextAlign (line 28) | enum imguiTextAlign
type imguiGfxCmdType (line 65) | enum imguiGfxCmdType
type imguiGfxRect (line 74) | struct imguiGfxRect
type imguiGfxText (line 79) | struct imguiGfxText
type imguiGfxLine (line 85) | struct imguiGfxLine
type imguiGfxCmd (line 90) | struct imguiGfxCmd
FILE: demo/main.cpp
function GetKeyFromGameControllerButton (line 68) | int GetKeyFromGameControllerButton(SDL_GameControllerButton button)
function joyAxisFilter (line 98) | inline float joyAxisFilter(int value, int stick)
type SimBuffers (line 179) | struct SimBuffers
method SimBuffers (line 233) | SimBuffers(NvFlexLibrary* l) :
function MapBuffers (line 249) | void MapBuffers(SimBuffers* buffers)
function UnmapBuffers (line 301) | void UnmapBuffers(SimBuffers* buffers)
function SimBuffers (line 358) | SimBuffers* AllocBuffers(NvFlexLibrary* lib)
method SimBuffers (line 233) | SimBuffers(NvFlexLibrary* l) :
function DestroyBuffers (line 363) | void DestroyBuffers(SimBuffers* buffers)
class Scene (line 532) | class Scene
type Emitter (line 535) | struct Emitter
method Emitter (line 537) | Emitter() : mSpeed(0.0f), mEnabled(false), mLeftOver(0.0f), mWidth(8) ...
type Rope (line 550) | struct Rope
function sqr (line 557) | inline float sqr(float x) { return x*x; }
function Init (line 563) | void Init(int scene, bool centerCamera = true)
function Reset (line 1024) | void Reset()
function Shutdown (line 1029) | void Shutdown()
function UpdateEmitters (line 1064) | void UpdateEmitters()
function UpdateCamera (line 1141) | void UpdateCamera()
function UpdateMouse (line 1150) | void UpdateMouse()
function UpdateWind (line 1205) | void UpdateWind()
function SyncScene (line 1225) | void SyncScene()
function UpdateScene (line 1231) | void UpdateScene()
function RenderScene (line 1237) | void RenderScene()
function RenderDebug (line 1468) | void RenderDebug()
function DrawShapes (line 1595) | void DrawShapes()
function DoUI (line 1700) | int DoUI()
function UpdateFrame (line 1943) | void UpdateFrame()
function DumpAftermathData (line 2241) | void DumpAftermathData()
function ReshapeWindow (line 2251) | void ReshapeWindow(int width, int height)
function InputArrowKeysDown (line 2269) | void InputArrowKeysDown(int key, int x, int y)
function InputArrowKeysUp (line 2314) | void InputArrowKeysUp(int key, int x, int y)
function InputKeyboardDown (line 2318) | bool InputKeyboardDown(unsigned char key, int x, int y)
function InputKeyboardUp (line 2542) | void InputKeyboardUp(unsigned char key, int x, int y)
function MouseFunc (line 2567) | void MouseFunc(int b, int state, int x, int y)
function MousePassiveMotionFunc (line 2599) | void MousePassiveMotionFunc(int x, int y)
function MouseMotionFunc (line 2605) | void MouseMotionFunc(unsigned state, int x, int y)
function ErrorCallback (line 2625) | void ErrorCallback(NvFlexErrorSeverity severity, const char* msg, const ...
function ControllerButtonEvent (line 2632) | void ControllerButtonEvent(SDL_ControllerButtonEvent event)
function ControllerDeviceUpdate (line 2666) | void ControllerDeviceUpdate()
function SDLInit (line 2678) | void SDLInit(const char* title)
function SDLMainLoop (line 2698) | void SDLMainLoop()
function main (line 2775) | int main(int argc, char* argv[])
FILE: demo/opengl/demoContextOGL.h
function DemoContext (line 14) | struct DemoContextOGL : public DemoContext
FILE: demo/opengl/imguiRenderGL.cpp
type OGL_Renderer (line 27) | namespace OGL_Renderer
function imguifree (line 40) | void imguifree(void* ptr, void* /*userptr*/)
function RGBA (line 60) | inline unsigned int RGBA(unsigned char r, unsigned char g, unsigned ch...
function drawPolygon (line 65) | static void drawPolygon(const float* coords, unsigned numCoords, float...
function drawRect (line 137) | static void drawRect(float x, float y, float w, float h, float fth, un...
function drawRoundedRect (line 166) | static void drawRoundedRect(float x, float y, float w, float h, float ...
function drawLine (line 203) | static void drawLine(float x0, float y0, float x1, float y1, float r, ...
function imguiRenderGLInit (line 240) | bool imguiRenderGLInit(const char* fontpath)
function imguiRenderGLDestroy (line 291) | void imguiRenderGLDestroy()
function getBakedQuad (line 300) | static void getBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, in...
function getTextLength (line 322) | static float getTextLength(stbtt_bakedchar *chardata, const char* text)
function drawText (line 352) | static void drawText(float x, float y, const char *text, int align, un...
function imguiRenderGLDraw (line 414) | void imguiRenderGLDraw()
FILE: demo/opengl/imguiRenderGL.h
function namespace (line 22) | namespace OGL_Renderer
FILE: demo/opengl/shader.cpp
function glAssert (line 40) | void glAssert(const char* msg, long line, const char* file)
type OGL_Renderer (line 85) | namespace OGL_Renderer
function GlslPrintShaderLog (line 87) | void GlslPrintShaderLog(GLuint obj)
function PreProcessShader (line 113) | void PreProcessShader(const char* filename, std::string& source)
function GLuint (line 154) | GLuint CompileProgram(const char *vsource, const char *fsource, const ...
function DrawPlane (line 211) | void DrawPlane(const Vec4& p, bool color)
FILE: demo/opengl/shader.h
function namespace (line 78) | namespace OGL_Renderer
FILE: demo/opengl/shadersGL.cpp
type FluidRenderBuffersGL (line 56) | struct FluidRenderBuffersGL
method FluidRenderBuffersGL (line 58) | FluidRenderBuffersGL(int numParticles = 0):
type DiffuseRenderBuffersGL (line 103) | struct DiffuseRenderBuffersGL
method DiffuseRenderBuffersGL (line 105) | DiffuseRenderBuffersGL(int numParticles = 0):
type FluidRenderer (line 139) | struct FluidRenderer
type ShadowMap (line 164) | struct ShadowMap
type GpuMesh (line 170) | struct GpuMesh
function GLuint (line 183) | GLuint LoadTexture(const char* filename)
type RenderTexture (line 211) | struct RenderTexture
method RenderTexture (line 219) | RenderTexture()
type OGL_Renderer (line 250) | namespace OGL_Renderer
function InitRender (line 253) | void InitRender(const RenderInitOptions& options)
function DestroyRender (line 284) | void DestroyRender()
function StartFrame (line 288) | void StartFrame(Vec4 clearColor)
function EndFrame (line 304) | void EndFrame()
function SetView (line 320) | void SetView(Matrix44 view, Matrix44 proj)
function SetFillMode (line 329) | void SetFillMode(bool wireframe)
function SetCullMode (line 334) | void SetCullMode(bool enabled)
function imguiGraphDraw (line 343) | void imguiGraphDraw()
function ReshapeRender (line 398) | void ReshapeRender(int width, int height, bool minimized)
function GetViewRay (line 440) | void GetViewRay(int x, int y, Vec3& origin, Vec3& dir)
function Vec3 (line 461) | Vec3 GetScreenCoord(Vec3& pos) {
function ReadFrame (line 477) | void ReadFrame(int* backbuffer, int width, int height)
function PresentFrame (line 483) | void PresentFrame(bool fullsync)
function RenderTexture (line 492) | RenderTexture* CreateRenderTexture(const char* filename)
function RenderTexture (line 509) | RenderTexture* CreateRenderTarget(int width, int height, bool depth)
function DestroyRenderTexture (line 514) | void DestroyRenderTexture(RenderTexture* t)
function main (line 560) | void main()
function shadowSample (line 610) | float shadowSample()
function sqr (line 633) | float sqr(float x) { return x*x; }
function main (line 635) | void main()
function main (line 684) | void main()
function sqr (line 733) | float sqr(float x) { return x*x; }
function shadowSample (line 736) | float shadowSample()
function filterwidth (line 761) | float filterwidth(vec2 v)
function vec2 (line 767) | vec2 bump(vec2 x)
function checker (line 772) | float checker(vec2 uv)
function main (line 782) | void main()
function ShadowApply (line 829) | void ShadowApply(GLint sprogram, Vec3 lightPos, Vec3 lightTarget, Matr...
function DrawPoints (line 862) | void DrawPoints(FluidRenderBuffers* buffersIn, int n, int offset, floa...
function ResetProgramId (line 945) | void ResetProgramId()
function ShadowMap (line 954) | ShadowMap* ShadowCreate()
function ShadowDestroy (line 985) | void ShadowDestroy(ShadowMap* map)
function ShadowBegin (line 993) | void ShadowBegin(ShadowMap* map)
function ShadowEnd (line 1015) | void ShadowEnd()
function BindSolidShader (line 1025) | void BindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTr...
function UnbindSolidShader (line 1050) | void UnbindSolidShader()
function SetMaterial (line 1060) | void SetMaterial(const Matrix44& xform, const RenderMaterial& mat)
function DrawPlanes (line 1100) | void DrawPlanes(Vec4* planes, int n, float bias)
function DrawMesh (line 1124) | void DrawMesh(const Mesh* m, Vec3 color)
function DrawCloth (line 1156) | void DrawCloth(const Vec4* positions, const Vec4* normals, const float...
function DrawRope (line 1210) | void DrawRope(Vec4* positions, int* indices, int numIndices, float rad...
type ReflectMap (line 1254) | struct ReflectMap
function ReflectMap (line 1262) | ReflectMap* ReflectCreate(int width, int height)
function ReflectDestroy (line 1288) | void ReflectDestroy(ReflectMap* map)
function ReflectBegin (line 1295) | void ReflectBegin(ReflectMap* map, Vec4 plane, int width, int height)
function ReflectEnd (line 1325) | void ReflectEnd(ReflectMap* map, int width, int height)
function main (line 1354) | void main()
function main (line 1370) | void main()
function Sign (line 1416) | float Sign(float x) { return x < 0.0 ? -1.0: 1.0; }
function solveQuadratic (line 1418) | bool solveQuadratic(float a, float b, float c, out float minT, out flo...
function DotInvW (line 1447) | float DotInvW(vec4 a, vec4 b) { return a.x*b.x + a.y*b.y + a.z*b.z - a...
function main (line 1449) | void main()
function STRINGIFY (line 1552) | STRINGIFY(
function solveQuadratic (line 1559) | bool solveQuadratic(float a, float b, float c, out float minT, out flo...
function sqr (line 1588) | float sqr(float x) { return x*x; }
function main (line 1590) | void main()
function sqr (line 1657) | float sqr(float x) { return x*x; }
function main (line 1659) | void main()
function shadowSample (line 1778) | float shadowSample(vec3 worldPos, out float attenuation)
function vec3 (line 1808) | vec3 viewportToEyeSpace(vec2 coord, float eyeZ)
function vec3 (line 1816) | vec3 srgbToLinear(vec3 c) { return pow(c, vec3(2.2)); }
function vec3 (line 1817) | vec3 linearToSrgb(vec3 c) { return pow(c, vec3(1.0/2.2)); }
function sqr (line 1819) | float sqr(float x) { return x*x; }
function cube (line 1820) | float cube(float x) { return x*x*x; }
function main (line 1822) | void main()
function FluidRenderer (line 1920) | FluidRenderer* CreateFluidRenderer(uint32_t width, uint32_t height)
function DestroyFluidRenderer (line 2033) | void DestroyFluidRenderer(FluidRenderer* renderer)
function FluidRenderBuffers (line 2045) | FluidRenderBuffers* CreateFluidRenderBuffers(int numFluidParticles, bo...
function DestroyFluidRenderBuffers (line 2084) | void DestroyFluidRenderBuffers(FluidRenderBuffers* buffers)
function UpdateFluidRenderBuffers (line 2089) | void UpdateFluidRenderBuffers(FluidRenderBuffers* buffersIn, NvFlexSol...
function UpdateFluidRenderBuffers (line 2118) | void UpdateFluidRenderBuffers(FluidRenderBuffers* buffersIn, Vec4* par...
function DiffuseRenderBuffers (line 2160) | DiffuseRenderBuffers* CreateDiffuseRenderBuffers(int numDiffuseParticl...
function DestroyDiffuseRenderBuffers (line 2186) | void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn)
function UpdateDiffuseRenderBuffers (line 2199) | void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, NvFle...
function UpdateDiffuseRenderBuffers (line 2209) | void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffersIn, Vec4*...
function RenderFullscreenQuad (line 2223) | void RenderFullscreenQuad()
function RenderEllipsoids (line 2243) | void RenderEllipsoids(FluidRenderer* render, FluidRenderBuffers* buffe...
function main (line 2487) | void main()
function main (line 2530) | void main()
function main (line 2623) | void main()
function GetNumDiffuseRenderParticles (line 2642) | int GetNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers)
function RenderDiffuse (line 2647) | void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers* buffer...
function GpuMesh (line 2808) | GpuMesh* CreateGpuMesh(const Mesh* m)
function DestroyGpuMesh (line 2832) | void DestroyGpuMesh(GpuMesh* m)
function DrawGpuMesh (line 2839) | void DrawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color)
function DrawGpuMeshInstances (line 2875) | void DrawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, c...
function BeginLines (line 2912) | void BeginLines()
function DrawLine (line 2929) | void DrawLine(const Vec3& p, const Vec3& q, const Vec4& color)
function EndLines (line 2936) | void EndLines()
function BeginPoints (line 2941) | void BeginPoints(float size)
function DrawPoint (line 2964) | void DrawPoint(const Vec3& p, const Vec4& color)
function EndPoints (line 2970) | void EndPoints()
function SyncAndGetRenderTime (line 2975) | float SyncAndGetRenderTime(unsigned long long* begin, unsigned long lo...
function RendererGetDeviceTimestamps (line 2983) | float RendererGetDeviceTimestamps(unsigned long long* begin, unsigned ...
function GraphicsTimerBegin (line 2985) | void GraphicsTimerBegin() { }
function GraphicsTimerEnd (line 2986) | void GraphicsTimerEnd() { }
function StartGpuWork (line 2988) | void StartGpuWork() { }
function EndGpuWork (line 2989) | void EndGpuWork() { }
function GetRenderDevice (line 2991) | void GetRenderDevice(void** deviceOut, void** contextOut)
function DrawImguiGraph (line 2997) | void DrawImguiGraph()
function DemoContext (line 3008) | DemoContext* CreateDemoContextOGL()
function ShadowMap (line 3109) | ShadowMap* DemoContextOGL::shadowCreate()
function FluidRenderer (line 3129) | FluidRenderer* DemoContextOGL::createFluidRenderer(uint32_t width, uint3...
function FluidRenderBuffers (line 3139) | FluidRenderBuffers* DemoContextOGL::createFluidRenderBuffers(int numPart...
function GpuMesh (line 3159) | GpuMesh* DemoContextOGL::createGpuMesh(const Mesh* m)
function DiffuseRenderBuffers (line 3179) | DiffuseRenderBuffers* DemoContextOGL::createDiffuseRenderBuffers(int num...
FILE: demo/opengl/utilsGL.h
function MultiplyMatrices4by4OpenGL_FLOAT (line 8) | void MultiplyMatrices4by4OpenGL_FLOAT(float *result, float *matrix1, flo...
function MultiplyMatrixByVector4by4OpenGL_FLOAT (line 76) | void MultiplyMatrixByVector4by4OpenGL_FLOAT(float *resultvector, const f...
function glhInvertMatrixf2 (line 89) | int glhInvertMatrixf2(float *m, float *out)
function Projectf (line 241) | int Projectf(float objx, float objy, float objz, float *modelview, float...
function UnProjectf (line 273) | int UnProjectf(float winx, float winy, float winz, float *modelview, flo...
FILE: demo/scenes.h
function class (line 35) | class Scene
FILE: demo/scenes/adhesion.h
function class (line 2) | class Adhesion : public Scene
FILE: demo/scenes/armadilloshower.h
function class (line 3) | class ArmadilloShower : public Scene
FILE: demo/scenes/bananas.h
function class (line 3) | class BananaPile : public Scene
FILE: demo/scenes/bouyancy.h
function class (line 4) | class Buoyancy : public Scene
FILE: demo/scenes/bunnybath.h
function class (line 2) | class BunnyBath : public Scene
FILE: demo/scenes/ccdfluid.h
function class (line 2) | class CCDFluid : public Scene
FILE: demo/scenes/clothlayers.h
function class (line 3) | class ClothLayers : public Scene
FILE: demo/scenes/dambreak.h
function class (line 3) | class DamBreak : public Scene
FILE: demo/scenes/darts.h
function class (line 2) | class Darts : public Scene
FILE: demo/scenes/debris.h
function class (line 2) | class RigidDebris : public Scene
FILE: demo/scenes/deformables.h
function class (line 3) | class Deformables : public Scene
FILE: demo/scenes/envcloth.h
function class (line 3) | class EnvironmentalCloth: public Scene
FILE: demo/scenes/flag.h
function class (line 2) | class FlagCloth: public Scene
FILE: demo/scenes/fluidblock.h
function class (line 3) | class FluidBlock : public Scene
FILE: demo/scenes/fluidclothcoupling.h
function class (line 2) | class FluidClothCoupling : public Scene
FILE: demo/scenes/forcefield.h
function class (line 3) | class ForceField : public Scene
FILE: demo/scenes/frictionmoving.h
function class (line 2) | class FrictionMovingShape: public Scene
function Update (line 58) | void Update()
FILE: demo/scenes/frictionramp.h
function class (line 3) | class FrictionRamp : public Scene
FILE: demo/scenes/gamemesh.h
function class (line 2) | class GameMesh : public Scene
function virtual (line 169) | virtual void PostInitialize()
function virtual (line 179) | virtual void CenterCamera(void)
FILE: demo/scenes/googun.h
function class (line 2) | class GooGun : public Scene
FILE: demo/scenes/granularpile.h
function class (line 3) | class GranularPile : public Scene
FILE: demo/scenes/granularshape.h
function class (line 4) | class GranularShape : public Scene
FILE: demo/scenes/inflatable.h
function class (line 3) | class Inflatable : public Scene
FILE: demo/scenes/initialoverlap.h
function class (line 4) | class InitialOverlap : public Scene
FILE: demo/scenes/lighthouse.h
function class (line 3) | class Lighthouse : public Scene
FILE: demo/scenes/localspacecloth.h
function class (line 4) | class LocalSpaceCloth : public Scene
FILE: demo/scenes/localspacefluid.h
function class (line 3) | class LocalSpaceFluid : public Scene
FILE: demo/scenes/lowdimensionalshapes.h
function class (line 2) | class LowDimensionalShapes: public Scene
FILE: demo/scenes/melting.h
function class (line 2) | class Melting : public Scene
FILE: demo/scenes/nonconvex.h
function class (line 3) | class NonConvex : public Scene
FILE: demo/scenes/parachutingbunnies.h
function class (line 2) | class ParachutingBunnies : public Scene
FILE: demo/scenes/pasta.h
function class (line 2) | class Pasta : public Scene
FILE: demo/scenes/potpourri.h
function class (line 2) | class PotPourri : public Scene
FILE: demo/scenes/rayleightaylor.h
function class (line 2) | class RayleighTaylor3D : public Scene
function class (line 78) | class RayleighTaylor2D : public Scene
FILE: demo/scenes/restitution.h
function class (line 4) | class Restitution : public Scene
FILE: demo/scenes/rigidfluidcoupling.h
function class (line 2) | class RigidFluidCoupling : public Scene
FILE: demo/scenes/rigidpile.h
function class (line 2) | class RigidPile : public Scene
function virtual (line 123) | virtual void Update()
FILE: demo/scenes/rigidrotation.h
function class (line 3) | class RigidRotation : public Scene
FILE: demo/scenes/rockpool.h
function class (line 4) | class RockPool: public Scene
FILE: demo/scenes/sdfcollision.h
function class (line 2) | class SDFCollision : public Scene
FILE: demo/scenes/shapechannels.h
function class (line 5) | class ShapeChannels : public Scene
FILE: demo/scenes/shapecollision.h
function class (line 3) | class ShapeCollision : public Scene
FILE: demo/scenes/softbody.h
function class (line 3) | class SoftBody : public Scene
type Instance (line 33) | struct Instance
type RenderingInstance (line 91) | struct RenderingInstance
function virtual (line 131) | virtual void Initialize()
function virtual (line 323) | virtual void Draw(int pass)
function class (line 372) | class SoftBodyFixed : public SoftBody
FILE: demo/scenes/spherecloth.h
function class (line 4) | class SphereCloth : public Scene
FILE: demo/scenes/surfacetension.h
function class (line 2) | class SurfaceTension : public Scene
function Update (line 47) | void Update()
FILE: demo/scenes/tearing.h
function class (line 2) | class Tearing : public Scene
FILE: demo/scenes/thinbox.h
function class (line 3) | class ThinBox : public Scene
FILE: demo/scenes/trianglecollision.h
function class (line 2) | class TriangleCollision : public Scene
FILE: demo/scenes/triggervolume.h
function class (line 4) | class TriggerVolume : public Scene
FILE: demo/scenes/viscosity.h
function class (line 2) | class Viscosity : public Scene
function virtual (line 72) | virtual void DoGui()
FILE: demo/scenes/waterballoon.h
function class (line 2) | class WaterBalloon : public Scene
FILE: demo/shaders.h
type DiffuseRenderBuffers (line 39) | struct DiffuseRenderBuffers
type FluidRenderBuffers (line 40) | struct FluidRenderBuffers
type SDL_Window (line 42) | struct SDL_Window
type ShadowMap (line 90) | struct ShadowMap
type RenderTexture (line 96) | struct RenderTexture
type RenderMesh (line 132) | struct RenderMesh
type GpuMesh (line 146) | struct GpuMesh
type FluidRenderer (line 164) | struct FluidRenderer
FILE: demo/shadersDemoContext.cpp
function DemoContext (line 14) | DemoContext* CreateDemoContextD3D11() { assert(0); return 0; }
function DemoContext (line 15) | DemoContext* CreateDemoContextD3D12() { assert(0); return 0; }
function DemoContext (line 18) | DemoContext* CreateDemoContextOGL() { assert(0); return 0; }
function CreateDemoContext (line 28) | void CreateDemoContext(int type)
function DemoContext (line 43) | DemoContext* GetDemoContext()
function ReshapeRender (line 48) | void ReshapeRender(SDL_Window* window)
function DestroyRender (line 55) | void DestroyRender()
function StartFrame (line 64) | void StartFrame(Vec4 colorIn) { s_context->startFrame(colorIn); }
function EndFrame (line 65) | void EndFrame() { s_context->endFrame(); }
function PresentFrame (line 66) | void PresentFrame(bool fullSync) { s_context->presentFrame(fullSync); }
function FlushGraphicsAndWait (line 68) | void FlushGraphicsAndWait() { s_context->flushGraphicsAndWait(); }
function ReadFrame (line 70) | void ReadFrame(int* backbuffer, int width, int height) { s_context->read...
function GetViewRay (line 72) | void GetViewRay(int x, int y, Vec3& origin, Vec3& dir) { return s_contex...
function SetFillMode (line 74) | void SetFillMode(bool wire) { s_context->setFillMode(wire); }
function SetCullMode (line 76) | void SetCullMode(bool enabled) { s_context->setCullMode(enabled); }
function SetView (line 78) | void SetView(Matrix44 view, Matrix44 projection) { return s_context->set...
function FluidRenderer (line 80) | FluidRenderer* CreateFluidRenderer(uint32_t width, uint32_t height) { re...
function DestroyFluidRenderer (line 82) | void DestroyFluidRenderer(FluidRenderer* renderer) { return s_context->d...
function FluidRenderBuffers (line 84) | FluidRenderBuffers* CreateFluidRenderBuffers(int numParticles, bool enab...
function UpdateFluidRenderBuffers (line 86) | void UpdateFluidRenderBuffers(FluidRenderBuffers* buffers, Vec4* particl...
function UpdateFluidRenderBuffers (line 91) | void UpdateFluidRenderBuffers(FluidRenderBuffers* buffers, NvFlexSolver*...
function DestroyFluidRenderBuffers (line 93) | void DestroyFluidRenderBuffers(FluidRenderBuffers* buffers) { return s_c...
function ShadowMap (line 95) | ShadowMap* ShadowCreate() { return s_context->shadowCreate(); }
function ShadowDestroy (line 97) | void ShadowDestroy(ShadowMap* map) { s_context->shadowDestroy(map); }
function ShadowBegin (line 99) | void ShadowBegin(ShadowMap* map) { s_context->shadowBegin(map); }
function ShadowEnd (line 101) | void ShadowEnd() { s_context->shadowEnd(); }
function BindSolidShader (line 104) | void BindSolidShader(Vec3 lightPos, Vec3 lightTarget, Matrix44 lightTran...
function UnbindSolidShader (line 109) | void UnbindSolidShader() { s_context->unbindSolidShader(); }
function DrawMesh (line 111) | void DrawMesh(const Mesh* m, Vec3 color) { s_context->drawMesh(m, color); }
function DrawCloth (line 113) | void DrawCloth(const Vec4* positions, const Vec4* normals, const float* ...
function DrawRope (line 118) | void DrawRope(Vec4* positions, int* indices, int numIndices, float radiu...
function DrawPlane (line 123) | void DrawPlane(const Vec4& p, bool color) { s_context->drawPlane(p, colo...
function DrawPlanes (line 125) | void DrawPlanes(Vec4* planes, int n, float bias) { s_context->drawPlanes...
function GpuMesh (line 127) | GpuMesh* CreateGpuMesh(const Mesh* m)
function DestroyGpuMesh (line 132) | void DestroyGpuMesh(GpuMesh* m) { s_context->destroyGpuMesh(m); }
function DrawGpuMesh (line 134) | void DrawGpuMesh(GpuMesh* m, const Matrix44& xform, const Vec3& color) {...
function DrawGpuMeshInstances (line 136) | void DrawGpuMeshInstances(GpuMesh* m, const Matrix44* xforms, int n, con...
function DrawPoints (line 138) | void DrawPoints(FluidRenderBuffers* buffers, int n, int offset, float ra...
function RenderEllipsoids (line 143) | void RenderEllipsoids(FluidRenderer* renderer, FluidRenderBuffers* buffe...
function DiffuseRenderBuffers (line 148) | DiffuseRenderBuffers* CreateDiffuseRenderBuffers(int numDiffuseParticles...
function DestroyDiffuseRenderBuffers (line 150) | void DestroyDiffuseRenderBuffers(DiffuseRenderBuffers* buffers) { return...
function UpdateDiffuseRenderBuffers (line 152) | void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, Vec4* dif...
function UpdateDiffuseRenderBuffers (line 157) | void UpdateDiffuseRenderBuffers(DiffuseRenderBuffers* buffers, NvFlexSol...
function GetNumDiffuseRenderParticles (line 159) | int GetNumDiffuseRenderParticles(DiffuseRenderBuffers* buffers) { return...
function RenderDiffuse (line 161) | void RenderDiffuse(FluidRenderer* render, DiffuseRenderBuffers* buffers,...
function BeginLines (line 166) | void BeginLines() { s_context->beginLines(); }
function DrawLine (line 168) | void DrawLine(const Vec3& p, const Vec3& q, const Vec4& color) { s_conte...
function EndLines (line 170) | void EndLines() { s_context->endLines(); }
function BeginPoints (line 172) | void BeginPoints(float size) {}
function DrawPoint (line 173) | void DrawPoint(const Vec3& p, const Vec4& color) {}
function EndPoints (line 174) | void EndPoints() {}
function RendererGetDeviceTimestamps (line 176) | float RendererGetDeviceTimestamps(unsigned long long* begin, unsigned lo...
function GraphicsTimerBegin (line 182) | void GraphicsTimerBegin() { s_context->graphicsTimerBegin(); }
function GraphicsTimerEnd (line 183) | void GraphicsTimerEnd() { s_context->graphicsTimerEnd(); }
function StartGpuWork (line 185) | void StartGpuWork() { s_context->startGpuWork(); }
function EndGpuWork (line 186) | void EndGpuWork() { s_context->endGpuWork(); }
function DrawImguiGraph (line 188) | void DrawImguiGraph() { return s_context->drawImguiGraph(); }
function GetRenderDevice (line 190) | void GetRenderDevice(void** deviceOut, void** contextOut) { return s_con...
function InitRender (line 192) | void InitRender(const RenderInitOptions& options)
FILE: demo/stb_truetype.h
function my_stbtt_initfont (line 98) | void my_stbtt_initfont(void)
function my_stbtt_print (line 110) | void my_stbtt_print(float x, float y, char *text)
function main (line 142) | int main(int argc, char **argv)
function main (line 180) | int main(int arg, char **argv)
type stbtt_uint8 (line 225) | typedef unsigned char stbtt_uint8;
type stbtt_int8 (line 226) | typedef signed char stbtt_int8;
type stbtt_uint16 (line 227) | typedef unsigned short stbtt_uint16;
type stbtt_int16 (line 228) | typedef signed short stbtt_int16;
type stbtt_uint32 (line 229) | typedef unsigned int stbtt_uint32;
type stbtt_int32 (line 230) | typedef signed int stbtt_int32;
type stbtt_bakedchar (line 294) | typedef struct
type stbtt_aligned_quad (line 310) | typedef struct
type stbtt_fontinfo (line 343) | typedef struct
type stbtt_vertex (line 430) | typedef struct
type stbtt__bitmap (line 482) | typedef struct
function stbtt_uint16 (line 620) | stbtt_uint16 ttUSHORT(const stbtt_uint8 *p) { return p[0]*256 + p[1]; }
function stbtt_int16 (line 621) | stbtt_int16 ttSHORT(const stbtt_uint8 *p) { return p[0]*256 + p[1]; }
function stbtt_uint32 (line 622) | stbtt_uint32 ttULONG(const stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<...
function stbtt_int32 (line 623) | stbtt_int32 ttLONG(const stbtt_uint8 *p) { return (p[0]<<24) + (p[1]<...
function stbtt__isfont (line 630) | static int stbtt__isfont(const stbtt_uint8 *font)
function stbtt_uint32 (line 641) | static stbtt_uint32 stbtt__find_table(stbtt_uint8 *data, stbtt_uint32 fo...
function stbtt_GetFontOffsetForIndex (line 654) | int stbtt_GetFontOffsetForIndex(const unsigned char *font_collection, in...
function stbtt_InitFont (line 673) | int stbtt_InitFont(stbtt_fontinfo *info, const unsigned char *data2, int...
function stbtt_FindGlyphIndex (line 724) | int stbtt_FindGlyphIndex(const stbtt_fontinfo *info, int unicode_codepoint)
function stbtt_GetCodepointShape (line 820) | int stbtt_GetCodepointShape(const stbtt_fontinfo *info, int unicode_code...
function stbtt_setvertex (line 825) | static void stbtt_setvertex(stbtt_vertex *v, stbtt_uint8 type, stbtt_int...
function stbtt__GetGlyfOffset (line 834) | static int stbtt__GetGlyfOffset(const stbtt_fontinfo *info, int glyph_in...
function stbtt_GetGlyphBox (line 852) | int stbtt_GetGlyphBox(const stbtt_fontinfo *info, int glyph_index, int *...
function stbtt_GetCodepointBox (line 864) | int stbtt_GetCodepointBox(const stbtt_fontinfo *info, int codepoint, int...
function stbtt_GetGlyphShape (line 869) | int stbtt_GetGlyphShape(const stbtt_fontinfo *info, int glyph_index, stb...
function stbtt_GetGlyphHMetrics (line 1086) | void stbtt_GetGlyphHMetrics(const stbtt_fontinfo *info, int glyph_index,...
function stbtt_GetGlyphKernAdvance (line 1098) | int stbtt_GetGlyphKernAdvance(const stbtt_fontinfo * /*info*/, int /*gl...
function stbtt_GetCodepointKernAdvance (line 1103) | int stbtt_GetCodepointKernAdvance(const stbtt_fontinfo * /*info*/, int ...
function stbtt_GetCodepointHMetrics (line 1108) | void stbtt_GetCodepointHMetrics(const stbtt_fontinfo *info, int codepoin...
function stbtt_GetFontVMetrics (line 1113) | void stbtt_GetFontVMetrics(const stbtt_fontinfo *info, int *ascent, int ...
function stbtt_ScaleForPixelHeight (line 1120) | float stbtt_ScaleForPixelHeight(const stbtt_fontinfo *info, float height)
function stbtt_FreeShape (line 1126) | void stbtt_FreeShape(const stbtt_fontinfo *info, stbtt_vertex *v)
function stbtt_GetGlyphBitmapBox (line 1136) | void stbtt_GetGlyphBitmapBox(const stbtt_fontinfo *font, int glyph, floa...
function stbtt_GetCodepointBitmapBox (line 1148) | void stbtt_GetCodepointBitmapBox(const stbtt_fontinfo *font, int codepoi...
type stbtt__edge (line 1153) | typedef struct stbtt__edge {
type stbtt__active_edge (line 1158) | typedef struct stbtt__active_edge
function stbtt__active_edge (line 1170) | static stbtt__active_edge *new_active(stbtt__edge *e, int off_x, float s...
function stbtt__fill_active_edges (line 1192) | static void stbtt__fill_active_edges(unsigned char *scanline, int len, s...
function stbtt__rasterize_sorted_edges (line 1234) | static void stbtt__rasterize_sorted_edges(stbtt__bitmap *result, stbtt__...
function stbtt__edge_compare (line 1335) | static int stbtt__edge_compare(const void *p, const void *q)
type stbtt__point (line 1345) | typedef struct
function stbtt__rasterize (line 1350) | static void stbtt__rasterize(stbtt__bitmap *result, stbtt__point *pts, i...
function stbtt__add_point (line 1400) | static void stbtt__add_point(stbtt__point *points, int n, float x, float y)
function stbtt__tesselate_curve (line 1408) | static int stbtt__tesselate_curve(stbtt__point *points, int *num_points,...
function stbtt__point (line 1429) | stbtt__point *stbtt_FlattenCurves(stbtt_vertex *vertices, int num_verts,...
function stbtt_Rasterize (line 1498) | void stbtt_Rasterize(stbtt__bitmap *result, float flatness_in_pixels, st...
function stbtt_FreeBitmap (line 1510) | void stbtt_FreeBitmap(unsigned char *bitmap, void *userdata)
function stbtt_MakeGlyphBitmap (line 1552) | void stbtt_MakeGlyphBitmap(const stbtt_fontinfo *info, unsigned char *ou...
function stbtt_MakeCodepointBitmap (line 1576) | void stbtt_MakeCodepointBitmap(const stbtt_fontinfo *info, unsigned char...
function stbtt_BakeFontBitmap (line 1587) | extern int stbtt_BakeFontBitmap(const unsigned char *data, int offset, ...
function stbtt_GetBakedQuad (line 1631) | void stbtt_GetBakedQuad(stbtt_bakedchar *chardata, int pw, int ph, int c...
function stbtt_int32 (line 1658) | static stbtt_int32 stbtt__CompareUTF8toUTF16_bigendian_prefix(stbtt_uint...
function stbtt_CompareUTF8toUTF16_bigendian (line 1697) | int stbtt_CompareUTF8toUTF16_bigendian(const char *s1, int len1, const c...
function stbtt__matchpair (line 1725) | static int stbtt__matchpair(stbtt_uint8 *fc, stbtt_uint32 nm, stbtt_uint...
function stbtt__matches (line 1770) | static int stbtt__matches(stbtt_uint8 *fc, stbtt_uint32 offset, stbtt_ui...
function stbtt_FindMatchingFont (line 1799) | int stbtt_FindMatchingFont(const unsigned char *font_collection, const c...
FILE: doc/_static/api/dynsections.js
function toggleVisibility (line 1) | function toggleVisibility(linkObj)
function updateStripes (line 22) | function updateStripes()
function toggleLevel (line 28) | function toggleLevel(level)
function toggleFolder (line 49) | function toggleFolder(id)
function toggleInherit (line 84) | function toggleInherit(id)
FILE: doc/_static/api/jquery.js
function b0 (line 16) | function b0(b3,b4){return new b0.fn.init(b3,b4)}
function bw (line 16) | function bw(){if(bF.isReady){return}try{av.documentElement.doScroll("lef...
function X (line 16) | function X(e){var bv=a2[e]={},bw,bx;e=e.split(/\s+/);for(bw=0,bx=e.lengt...
function bD (line 16) | function bD(bF){return function(bG){bx[bF]=arguments.length>1?aJ.call(ar...
function bz (line 16) | function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(ar...
function a5 (line 16) | function a5(bx,bw,by){if(by===L&&bx.nodeType===1){var bv="data-"+bw.repl...
function S (line 16) | function S(bv){for(var e in bv){if(e==="data"&&b.isEmptyObject(bv[e])){c...
function bi (line 16) | function bi(by,bx,bA){var bw=bx+"defer",bv=bx+"queue",e=bx+"mark",bz=b._...
function bE (line 16) | function bE(){if(!(--bB)){e.resolveWith(bv,[bv])}}
function bk (line 16) | function bk(){return false}
function i (line 16) | function i(){return true}
function bv (line 23) | function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var...
function bN (line 23) | function bN(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT<bS;bT++){var...
function C (line 23) | function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}
function aG (line 23) | function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,func...
function a (line 23) | function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.c...
function ba (line 23) | function ba(e,bv){return b.nodeName(e,"table")?(e.getElementsByTagName("...
function t (line 23) | function t(bB,bv){if(bv.nodeType!==1||!b.hasData(bB)){return}var by,bx,e...
function ai (line 23) | function ai(bv,e){var bw;if(e.nodeType!==1){return}if(e.clearAttributes)...
function bg (line 23) | function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e....
function az (line 23) | function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecke...
function E (line 23) | function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(...
function al (line 23) | function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.inne...
function bo (line 23) | function bo(e,bv){if(bv.src){b.ajax({url:bv.src,async:false,dataType:"sc...
function p (line 23) | function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,...
function f (line 23) | function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="...
function aW (line 23) | function aW(bv,bE,bz,bD,bB,bx){bB=bB||bE.dataTypes[0];bx=bx||{};bx[bB]=t...
function am (line 23) | function am(bw,bx){var bv,e,by=b.ajaxSettings.flatOptions||{};for(bv in ...
function bF (line 23) | function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}...
function v (line 23) | function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(b...
function bj (line 23) | function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseF...
function G (line 23) | function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var...
function aL (line 23) | function aL(){try{return new bb.XMLHttpRequest()}catch(bv){}}
function aj (line 23) | function aj(){try{return new bb.ActiveXObject("Microsoft.XMLHTTP")}catch...
function bv (line 23) | function bv(){if(e.queue===false){b._mark(this)}var bE=b.extend({},e),bK...
function bB (line 23) | function bB(bE,bF,bD){var bC=bF[bD];b.removeData(bE,bD,true);bC.stop(e)}
function bh (line 23) | function bh(){setTimeout(at,0);return(a4=b.now())}
function at (line 23) | function at(){a4=L}
function a0 (line 23) | function a0(bv,e){var bw={};b.each(aH.concat.apply([],aH.slice(0,e)),fun...
function bv (line 23) | function bv(bA){return e.step(bA)}
function x (line 23) | function x(bx){if(!Q[bx]){var e=av.body,bv=b("<"+bx+">").appendTo(e),bw=...
function aK (line 23) | function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.pa...
function j (line 32) | function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"paddin...
function c (line 32) | function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.pa...
function b (line 32) | function b(e){return !a(e).parents().andSelf().filter(function(){return ...
function a (line 61) | function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}
function n (line 61) | function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if...
function h (line 61) | function h(n){j.animate(g,e,d.easing,n&&function(){n.call(this,f,d)})}
function b (line 61) | function b(d){return typeof d=="object"?d:{top:d,left:d}}
function b (line 68) | function b(){var F=this;F.top="auto";F.left="auto";F.right="auto";F.bott...
function t (line 68) | function t(K,N,F){var J=null;function L(P,Q){M();if(!K.data(e)){if(!P){c...
function j (line 68) | function j(){function G(M,L,J,O,P){var K=L.split("-")[0],N=new b(),I;if(...
function x (line 68) | function x(Q){var P=new j(),O=k("#"+Q.popupId);if(O.length===0){O=k("<di...
function q (line 68) | function q(F){return window.SVGElement&&F[0] instanceof SVGElement}
function h (line 68) | function h(){if(!c.mouseTrackingActive){c.mouseTrackingActive=true;k(fun...
function i (line 68) | function i(F){c.currentX=F.pageX;c.currentY=F.pageY}
function v (line 68) | function v(F){var H=F.offset(),J=F[0].getBoundingClientRect(),I=J.right-...
function B (line 68) | function B(I){var G=I.data(y),F=I.data(o),K=I.data(l),H,J;if(G){if(k.isF...
function m (line 68) | function m(M,L,K){var G=c.scrollTop,J=c.scrollLeft,I=G+c.windowHeight,F=...
function a (line 68) | function a(G){var F=0;while(G){G&=G-1;F++}return F}
FILE: doc/_static/bootstrap.js
function removeElement (line 115) | function removeElement() {
function clearMenus (line 743) | function clearMenus() {
function getParent (line 750) | function getParent($this) {
function removeWithAnimation (line 1282) | function removeWithAnimation() {
function ScrollSpy (line 1553) | function ScrollSpy(element, options) {
function next (line 1764) | function next() {
FILE: doc/_static/doctools.js
function highlight (line 69) | function highlight(node) {
FILE: doc/_static/jquery.cookie.js
function encode (line 23) | function encode(s) {
function decode (line 27) | function decode(s) {
function stringifyCookieValue (line 31) | function stringifyCookieValue(value) {
function parseCookieValue (line 35) | function parseCookieValue(s) {
function read (line 50) | function read(s, converter) {
FILE: doc/_static/jquery.js
function _ (line 2) | function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=...
function H (line 2) | function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-...
function B (line 2) | function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))con...
function et (line 2) | function et(){return!1}
function tt (line 2) | function tt(){return!0}
function ut (line 2) | function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}
function at (line 2) | function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}
function ft (line 2) | function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,...
function lt (line 2) | function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.cre...
function Lt (line 2) | function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ow...
function At (line 2) | function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._...
function Ot (line 2) | function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.cle...
function Mt (line 2) | function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getEl...
function _t (line 2) | function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}
function Qt (line 2) | function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.sl...
function Gt (line 2) | function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(...
function Yt (line 2) | function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n....
function Zt (line 2) | function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[...
function en (line 2) | function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,...
function tn (line 2) | function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s...
function nn (line 2) | function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body)...
function fn (line 2) | function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn....
function Cn (line 2) | function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var ...
function kn (line 2) | function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s...
function Ln (line 2) | function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r...
function An (line 2) | function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFi...
function On (line 2) | function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dat...
function Fn (line 2) | function Fn(){try{return new e.XMLHttpRequest}catch(t){}}
function In (line 2) | function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(...
function $n (line 2) | function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}
function Jn (line 2) | function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]...
function Kn (line 2) | function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(funct...
function Qn (line 2) | function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n...
function Gn (line 2) | function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e....
function Yn (line 2) | function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}
function Zn (line 2) | function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],...
function tr (line 2) | function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.pa...
function nt (line 2) | function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||type...
function rt (line 2) | function rt(e){return function(t){var n=t.nodeName.toLowerCase();return ...
function it (line 2) | function it(e){return function(t){var n=t.nodeName.toLowerCase();return(...
function st (line 2) | function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=...
function ot (line 2) | function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r==...
function ut (line 2) | function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice...
function at (line 2) | function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t....
function ft (line 2) | function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i-...
function lt (line 2) | function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)...
function ct (line 2) | function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)...
function ht (line 2) | function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relat...
function pt (line 2) | function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var...
function dt (line 2) | function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}
function vt (line 2) | function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length=...
function mt (line 2) | function mt(){}
function e (line 2) | function e(t,n){return new e.fn.init(t,n)}
function T (line 2) | function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeou...
FILE: doc/_static/jquery.storageapi.js
function _get (line 32) | function _get(storage){
function _set (line 83) | function _set(storage){
function _remove (line 123) | function _remove(storage){
function _removeAll (line 164) | function _removeAll(storage, reinit_ns){
function _isEmpty (line 178) | function _isEmpty(storage){
function _isSet (line 210) | function _isSet(storage){
function _keys (line 236) | function _keys(storage){
function _createNamespace (line 261) | function _createNamespace(name){
function _testStorage (line 283) | function _testStorage(name){
FILE: doc/_static/searchtools.js
function pulse (line 280) | function pulse() {
function displayNextItem (line 409) | function displayNextItem() {
FILE: doc/_static/sidebar.js
function sidebar_is_collapsed (line 57) | function sidebar_is_collapsed() {
function toggle_sidebar (line 61) | function toggle_sidebar() {
function collapse_sidebar (line 68) | function collapse_sidebar() {
function expand_sidebar (line 81) | function expand_sidebar() {
function add_sidebar_button (line 94) | function add_sidebar_button() {
function set_position_from_cookie (line 139) | function set_position_from_cookie() {
FILE: doc/_static/underscore.js
function q (line 8) | function q(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)re...
FILE: extensions/dx/flexExt.cpp
type NvFlexExtForceFieldCallback (line 42) | struct NvFlexExtForceFieldCallback
method NvFlexExtForceFieldCallback (line 44) | NvFlexExtForceFieldCallback(NvFlexSolver* solver) : mSolver(solver)
function NvFlexExtForceFieldCallback (line 105) | NvFlexExtForceFieldCallback* NvFlexExtCreateForceFieldCallback(NvFlexSol...
method NvFlexExtForceFieldCallback (line 44) | NvFlexExtForceFieldCallback(NvFlexSolver* solver) : mSolver(solver)
function NvFlexExtDestroyForceFieldCallback (line 110) | void NvFlexExtDestroyForceFieldCallback(NvFlexExtForceFieldCallback* cal...
function ApplyForceFieldsCallback (line 115) | void ApplyForceFieldsCallback(NvFlexSolverCallbackParams params)
function NvFlexExtSetForceFields (line 155) | void NvFlexExtSetForceFields(NvFlexExtForceFieldCallback* c, const NvFle...
FILE: extensions/dx/flexExt_dx_common.h
type FlexExtConstParams (line 36) | struct FlexExtConstParams
type FlexExtForceFieldD3D (line 56) | struct FlexExtForceFieldD3D
FILE: extensions/flexExtCloth.cpp
type Key (line 34) | struct Key
method Key (line 36) | Key(int i, float d) : index(i), depth(d) {}
function NvFlexExtCreateWeldedMeshIndices (line 45) | int NvFlexExtCreateWeldedMeshIndices(const float* vertices, int numVerti...
function NvFlexExtAsset (line 84) | NvFlexExtAsset* NvFlexExtCreateClothFromMesh(const float* particles, int...
type FlexExtTearingClothAsset (line 191) | struct FlexExtTearingClothAsset : public NvFlexExtAsset
function NvFlexExtAsset (line 196) | NvFlexExtAsset* NvFlexExtCreateTearingClothFromMesh(const float* particl...
function NvFlexExtDestroyTearingCloth (line 245) | void NvFlexExtDestroyTearingCloth(NvFlexExtAsset* asset)
function NvFlexExtTearClothMesh (line 256) | void NvFlexExtTearClothMesh(NvFlexExtAsset* asset, float maxStrain, int ...
FILE: extensions/flexExtContainer.cpp
class Bitmap (line 38) | class Bitmap
method Bitmap (line 46) | Bitmap(int numBits) : mBits((numBits+kWordSize-1)/kWordSize)
method Set (line 50) | inline void Set(int bit)
method Reset (line 60) | inline void Reset(int bit)
method IsSet (line 70) | inline bool IsSet(int bit)
type NvFlexExtContainer (line 86) | struct NvFlexExtContainer
method NvFlexExtContainer (line 142) | NvFlexExtContainer(NvFlexLibrary* l) :
function CompactObjects (line 162) | void CompactObjects(NvFlexExtContainer* c)
function NvFlexExtContainer (line 504) | NvFlexExtContainer* NvFlexExtCreateContainer(NvFlexLibrary* flexLib, NvF...
method NvFlexExtContainer (line 142) | NvFlexExtContainer(NvFlexLibrary* l) :
function NvFlexExtDestroyContainer (line 538) | void NvFlexExtDestroyContainer(NvFlexExtContainer* c)
function NvFlexExtAllocParticles (line 551) | int NvFlexExtAllocParticles(NvFlexExtContainer* c, int n, int* indices)
function NvFlexExtFreeParticles (line 567) | void NvFlexExtFreeParticles(NvFlexExtContainer* c, int n, const int* ind...
function NvFlexExtGetActiveList (line 585) | int NvFlexExtGetActiveList(NvFlexExtContainer* c, int* indices)
function NvFlexExtParticleData (line 608) | NvFlexExtParticleData NvFlexExtMapParticleData(NvFlexExtContainer* c)
function NvFlexExtUnmapParticleData (line 642) | void NvFlexExtUnmapParticleData(NvFlexExtContainer*c)
function NvFlexExtTriangleData (line 654) | NvFlexExtTriangleData NvFlexExtMapTriangleData(NvFlexExtContainer* c)
function NvFlexExtUnmapTriangleData (line 670) | void NvFlexExtUnmapTriangleData(NvFlexExtContainer* c)
function NvFlexExtShapeData (line 676) | NvFlexExtShapeData NvFlexExtMapShapeData(NvFlexExtContainer* c)
function NvFlexExtUnmapShapeData (line 692) | void NvFlexExtUnmapShapeData(NvFlexExtContainer* c)
function NvFlexExtInstance (line 699) | NvFlexExtInstance* NvFlexExtCreateInstance(NvFlexExtContainer* c, NvFlex...
function NvFlexExtDestroyInstance (line 766) | void NvFlexExtDestroyInstance(NvFlexExtContainer* c, const NvFlexExtInst...
function NvFlexExtTickContainer (line 785) | void NvFlexExtTickContainer(NvFlexExtContainer* c, float dt, int substep...
function NvFlexExtNotifyAssetChanged (line 797) | void NvFlexExtNotifyAssetChanged(NvFlexExtContainer* c, const NvFlexExtA...
function NvFlexExtPushToDevice (line 802) | void NvFlexExtPushToDevice(NvFlexExtContainer* c)
function NvFlexExtPullFromDevice (line 829) | void NvFlexExtPullFromDevice(NvFlexExtContainer* c)
function NvFlexExtUpdateInstances (line 843) | void NvFlexExtUpdateInstances(NvFlexExtContainer* c)
function NvFlexExtDestroyAsset (line 924) | void NvFlexExtDestroyAsset(NvFlexExtAsset* asset)
function NvFlexExtSoftJoint (line 941) | NvFlexExtSoftJoint* NvFlexExtCreateSoftJoint(NvFlexExtContainer* c, cons...
function NvFlexExtDestroySoftJoint (line 969) | void NvFlexExtDestroySoftJoint(NvFlexExtContainer* c, NvFlexExtSoftJoint...
function NvFlexExtSoftJointSetTransform (line 984) | void NvFlexExtSoftJointSetTransform(NvFlexExtContainer* c, NvFlexExtSoft...
FILE: extensions/flexExtMovingFrame.cpp
type MovingFrame (line 13) | struct MovingFrame
method MovingFrame (line 26) | MovingFrame(Vec3 worldTranslation, Quat worldRotation)
method Move (line 35) | void Move(Vec3 newPosition, Quat newRotation, float dt)
method Vec3 (line 66) | inline Vec3 GetLinearForce() const
method Vec3 (line 71) | inline Vec3 GetAngularForce(Vec3 p) const
function NvFlexExtMovingFrameInit (line 88) | void NvFlexExtMovingFrameInit(NvFlexExtMovingFrame* frame, const float* ...
function NvFlexExtMovingFrameUpdate (line 93) | void NvFlexExtMovingFrameUpdate(NvFlexExtMovingFrame* frame, const float...
function NvFlexExtMovingFrameApply (line 98) | void NvFlexExtMovingFrameApply(NvFlexExtMovingFrame* frame, float* posit...
FILE: extensions/flexExtRigid.cpp
function SampleSDF (line 39) | float SampleSDF(const float* sdf, int dim, int x, int y, int z)
function Vec3 (line 49) | Vec3 SampleSDFGrad(const float* sdf, int dim, int x, int y, int z)
function NvFlexExtAsset (line 69) | NvFlexExtAsset* NvFlexExtCreateRigidFromMesh(const float* vertices, int ...
FILE: extensions/flexExtSoft.cpp
function Vec3 (line 44) | Vec3 CalculateMean(const Vec3* particles, const int* indices, int numInd...
function CalculateRadius (line 57) | float CalculateRadius(const Vec3* particles, Vec3 center, const int* ind...
type Cluster (line 71) | struct Cluster
type Seed (line 80) | struct Seed
type SweepAndPrune (line 92) | struct SweepAndPrune
type Entry (line 94) | struct Entry
method Entry (line 96) | Entry(Vec3 p, int i) : point(p), index(i) {}
method SweepAndPrune (line 102) | SweepAndPrune(const Vec3* points, int n)
method QuerySphere (line 140) | void QuerySphere(Vec3 center, float radius, std::vector<int>& indices)
function CreateClusters (line 185) | int CreateClusters(Vec3* particles, const float* priority, int numPartic...
function CreateLinks (line 276) | int CreateLinks(const Vec3* particles, int numParticles, std::vector<int...
function CreateSkinning (line 308) | void CreateSkinning(const Vec3* vertices, int numVertices, const Vec3* c...
function SampleMesh (line 394) | void SampleMesh(const Vec3* vertices, int numVertices, const int* indice...
function NvFlexExtAsset (line 510) | NvFlexExtAsset* NvFlexExtCreateSoftFromMesh(const float* vertices, int n...
function NvFlexExtCreateSoftMeshSkinning (line 674) | void NvFlexExtCreateSoftMeshSkinning(const float* vertices, int numVerti...
FILE: external/D3D11/include/D3DX10.h
type _D3DX10_ERR (line 58) | enum _D3DX10_ERR {
FILE: external/D3D11/include/D3DX10core.h
type interface (line 64) | typedef interface ID3D10Device1
type D3DX10_SPRITE_FLAG (line 97) | typedef enum _D3DX10_SPRITE_FLAG
type D3DX10_SPRITE (line 106) | typedef struct _D3DX10_SPRITE
type interface (line 139) | typedef interface ID3DX10Sprite
type interface (line 140) | typedef interface ID3DX10Sprite
function STDMETHOD (line 225) | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
type D3DX10_FONT_DESCW (line 279) | typedef struct _D3DX10_FONT_DESCW
type D3DX10_FONT_DESCW (line 295) | typedef D3DX10_FONT_DESCW D3DX10_FONT_DESC;
type LPD3DX10_FONT_DESCW (line 296) | typedef LPD3DX10_FONT_DESCW LPD3DX10_FONT_DESC;
type D3DX10_FONT_DESCA (line 298) | typedef D3DX10_FONT_DESCA D3DX10_FONT_DESC;
type LPD3DX10_FONT_DESCA (line 299) | typedef LPD3DX10_FONT_DESCA LPD3DX10_FONT_DESC;
type interface (line 303) | typedef interface ID3DX10Font
type interface (line 304) | typedef interface ID3DX10Font
function STDMETHOD (line 318) | STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE;
function HRESULT (line 345) | HRESULT WINAPI_INLINE GetDesc(D3DX10_FONT_DESCA *pDesc) { return GetDesc...
function HRESULT (line 346) | HRESULT WINAPI_INLINE PreloadText(LPCSTR pString, INT Count) { return Pr...
FILE: external/D3D11/include/D3DX10math.h
type D3DVECTOR (line 30) | typedef struct _D3DVECTOR {
type D3DMATRIX (line 39) | typedef struct _D3DMATRIX {
type D3DXFLOAT16 (line 88) | typedef struct D3DXFLOAT16
type D3DXVECTOR2 (line 120) | typedef struct D3DXVECTOR2
type D3DXVECTOR2_16F (line 166) | typedef struct D3DXVECTOR2_16F
type D3DXVECTOR3 (line 195) | struct D3DXVECTOR3
type _D3DVECTOR (line 232) | struct _D3DVECTOR
type D3DXVECTOR3_16F (line 240) | struct D3DXVECTOR3_16F
function D3DXVECTOR4 (line 290) | D3DXVECTOR4 operator + () const;
type D3DXMATRIX (line 345) | struct D3DXMATRIX
type _D3DMATRIX (line 392) | struct _D3DMATRIX
type _D3DXMATRIXA16 (line 413) | struct _D3DXMATRIXA16
type D3DXMATRIX (line 438) | typedef D3DXMATRIX _D3DXMATRIXA16;
type D3DX_ALIGN16 (line 449) | typedef D3DX_ALIGN16 _D3DXMATRIXA16
type D3DXQUATERNION (line 458) | typedef struct D3DXQUATERNION
type D3DXPLANE (line 504) | typedef struct D3DXPLANE
type D3DXCOLOR (line 545) | typedef struct D3DXCOLOR
type interface (line 1329) | typedef interface ID3DXMatrixStack
type interface (line 1330) | typedef interface ID3DXMatrixStack
type D3DX_CPU_OPTIMIZATION (line 1829) | typedef enum _D3DX_CPU_OPTIMIZATION
FILE: external/D3D11/include/D3DX10mesh.h
type _D3DX10_MESH (line 41) | enum _D3DX10_MESH {
type D3DX10_ATTRIBUTE_RANGE (line 47) | typedef struct _D3DX10_ATTRIBUTE_RANGE
type D3DX10_ATTRIBUTE_RANGE (line 56) | typedef D3DX10_ATTRIBUTE_RANGE* LPD3DX10_ATTRIBUTE_RANGE;
type D3DX10_MESH_DISCARD_FLAGS (line 58) | typedef enum _D3DX10_MESH_DISCARD_FLAGS
type D3DX10_WELD_EPSILONS (line 68) | typedef struct _D3DX10_WELD_EPSILONS
type D3DX10_WELD_EPSILONS (line 83) | typedef D3DX10_WELD_EPSILONS* LPD3DX10_WELD_EPSILONS;
type D3DX10_INTERSECT_INFO (line 85) | typedef struct _D3DX10_INTERSECT_INFO
type _D3DX10_MESHOPT (line 192) | enum _D3DX10_MESHOPT {
type ID3DX10SkinInfo (line 229) | struct ID3DX10SkinInfo
type _D3DX10_ATTRIBUTE_WEIGHTS (line 272) | struct _D3DX10_ATTRIBUTE_WEIGHTS
FILE: external/D3D11/include/D3DX10tex.h
type D3DX10_FILTER_FLAG (line 65) | typedef enum D3DX10_FILTER_FLAG
type D3DX10_NORMALMAP_FLAG (line 109) | typedef enum D3DX10_NORMALMAP_FLAG
type D3DX10_CHANNEL_FLAG (line 138) | typedef enum D3DX10_CHANNEL_FLAG
type D3DX10_IMAGE_FILE_FORMAT (line 156) | typedef enum D3DX10_IMAGE_FILE_FORMAT
type D3DX10_SAVE_TEXTURE_FLAG (line 177) | typedef enum D3DX10_SAVE_TEXTURE_FLAG
type D3DX10_IMAGE_INFO (line 211) | typedef struct D3DX10_IMAGE_INFO
type D3DX10_IMAGE_LOAD_INFO (line 276) | typedef struct D3DX10_IMAGE_LOAD_INFO
FILE: external/D3D11/include/D3DX11.h
type _D3DX11_ERR (line 60) | enum _D3DX11_ERR {
FILE: external/D3D11/include/D3DX11core.h
function DECLARE_INTERFACE (line 63) | DECLARE_INTERFACE(ID3DX11DataLoader)
FILE: external/D3D11/include/D3DX11tex.h
type D3DX11_FILTER_FLAG (line 65) | typedef enum D3DX11_FILTER_FLAG
type D3DX11_NORMALMAP_FLAG (line 109) | typedef enum D3DX11_NORMALMAP_FLAG
type D3DX11_CHANNEL_FLAG (line 138) | typedef enum D3DX11_CHANNEL_FLAG
type D3DX11_IMAGE_FILE_FORMAT (line 156) | typedef enum D3DX11_IMAGE_FILE_FORMAT
type D3DX11_SAVE_TEXTURE_FLAG (line 177) | typedef enum D3DX11_SAVE_TEXTURE_FLAG
type D3DX11_IMAGE_INFO (line 210) | typedef struct D3DX11_IMAGE_INFO
type D3DX11_IMAGE_LOAD_INFO (line 275) | typedef struct D3DX11_IMAGE_LOAD_INFO
FILE: external/D3D12/include/PIXEventsCommon.h
type PIXEventType (line 27) | enum PIXEventType
function UINT64 (line 67) | inline UINT64 PIXEncodeEventInfo(UINT64 timestamp, PIXEventType eventType)
function UINT64 (line 93) | inline UINT64 PIXEncodeStringInfo(UINT64 alignment, UINT64 copyChunkSize...
function PIXIsPointerAligned (line 102) | bool PIXIsPointerAligned(T* pointer)
function PIXCopyEventArgument (line 108) | void PIXCopyEventArgument(_Out_writes_to_ptr_(limit) UINT64*& destinatio...
function PIXCopyEventArgumentSlowest (line 165) | inline void PIXCopyEventArgumentSlowest(_Out_writes_to_ptr_(limit) UINT6...
function PIXCopyEventArgumentSlow (line 231) | inline void PIXCopyEventArgumentSlow(_Out_writes_to_ptr_(limit) UINT64*&...
function _Out_writes_to_ptr_ (line 262) | inline void PIXCopyEventArgument<PCSTR>(_Out_writes_to_ptr_(limit) UINT6...
function _Out_writes_to_ptr_ (line 316) | inline void PIXCopyEventArgument<PSTR>(_Out_writes_to_ptr_(limit) UINT64...
function PIXCopyEventArgumentSlow (line 359) | inline void PIXCopyEventArgumentSlow(_Out_writes_to_ptr_(limit) UINT64*&...
function _Out_writes_to_ptr_ (line 387) | inline void PIXCopyEventArgument<PCWSTR>(_Out_writes_to_ptr_(limit) UINT...
function PIXSetMarkerOnContext (line 448) | inline void PIXSetMarkerOnContext(_In_ ID3D12GraphicsCommandList* comman...
function PIXSetMarkerOnContext (line 453) | inline void PIXSetMarkerOnContext(_In_ ID3D12CommandQueue* commandQueue,...
function PIXBeginEventOnContext (line 458) | inline void PIXBeginEventOnContext(_In_ ID3D12GraphicsCommandList* comma...
function PIXBeginEventOnContext (line 463) | inline void PIXBeginEventOnContext(_In_ ID3D12CommandQueue* commandQueue...
function PIXEndEventOnContext (line 467) | inline void PIXEndEventOnContext(_In_ ID3D12GraphicsCommandList* command...
function PIXEndEventOnContext (line 472) | inline void PIXEndEventOnContext(_In_ ID3D12CommandQueue* commandQueue)
type T (line 479) | typedef T Type;
type T (line 480) | typedef T Type;
type T (line 481) | typedef T Type;
type T (line 482) | typedef T Type;
function UINT64 (line 483) | struct PIXInferScopedEventType<UINT64> { typedef void Type; }
function UINT64 (line 484) | struct PIXInferScopedEventType<const UINT64> { typedef void Type; }
function INT64 (line 485) | struct PIXInferScopedEventType<INT64> { typedef void Type; }
function INT64 (line 486) | struct PIXInferScopedEventType<const INT64> { typedef void Type; }
function UINT (line 487) | struct PIXInferScopedEventType<UINT> { typedef void Type; }
function UINT (line 488) | struct PIXInferScopedEventType<const UINT> { typedef void Type; }
function INT (line 489) | struct PIXInferScopedEventType<INT> { typedef void Type; }
function INT (line 490) | struct PIXInferScopedEventType<const INT> { typedef void Type; }
FILE: external/D3D12/include/PIXEventsGenerated.h
function PIXBeginEventAllocate (line 23) | __declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In...
function PIXBeginEventAllocate (line 44) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString,...
function PIXBeginEventAllocate (line 66) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString,...
function PIXBeginEventAllocate (line 89) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString,...
function PIXBeginEventAllocate (line 113) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString,...
function PIXBeginEventAllocate (line 138) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString,...
function PIXBeginEventAllocate (line 164) | void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1,...
function PIXBeginEventAllocate (line 191) | void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1,...
function PIXBeginEventAllocate (line 248) | void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1,...
function PIXBeginEventAllocate (line 374) | void PIXBeginEventAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1,...
function PIXBeginEventAllocate (line 515) | __declspec(noinline) inline void PIXBeginEventAllocate(UINT64 color, _In...
function PIXBeginEventAllocate (line 536) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString...
function PIXBeginEventAllocate (line 558) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString...
function PIXBeginEventAllocate (line 581) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString...
function PIXBeginEventAllocate (line 605) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString...
function PIXBeginEventAllocate (line 630) | inline void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString...
function PIXBeginEventAllocate (line 656) | void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1...
function PIXBeginEventAllocate (line 683) | void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1...
function PIXBeginEventAllocate (line 740) | void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1...
function PIXBeginEventAllocate (line 866) | void PIXBeginEventAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1...
function PIXBeginEvent (line 1007) | inline void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString)
function PIXBeginEvent (line 1031) | void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1)
function PIXBeginEvent (line 1056) | void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
function PIXBeginEvent (line 1082) | void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, ...
function PIXBeginEvent (line 1109) | void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, ...
function PIXBeginEvent (line 1137) | void PIXBeginEvent(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, ...
function PIXBeginEvent (line 1550) | inline void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString)
function PIXBeginEvent (line 1574) | void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1)
function PIXBeginEvent (line 1599) | void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
function PIXBeginEvent (line 1625) | void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2,...
function PIXBeginEvent (line 1652) | void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2,...
function PIXBeginEvent (line 1680) | void PIXBeginEvent(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2,...
function PIXSetMarkerAllocate (line 2093) | __declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_...
function PIXSetMarkerAllocate (line 2115) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, ...
function PIXSetMarkerAllocate (line 2138) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, ...
function PIXSetMarkerAllocate (line 2162) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, ...
function PIXSetMarkerAllocate (line 2187) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, ...
function PIXSetMarkerAllocate (line 2213) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, ...
function PIXSetMarkerAllocate (line 2240) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, ...
function PIXSetMarkerAllocate (line 2268) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, ...
function PIXSetMarkerAllocate (line 2327) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, ...
function PIXSetMarkerAllocate (line 2457) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCSTR formatString, T1 a1, ...
function PIXSetMarkerAllocate (line 2602) | __declspec(noinline) inline void PIXSetMarkerAllocate(UINT64 color, _In_...
function PIXSetMarkerAllocate (line 2624) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString,...
function PIXSetMarkerAllocate (line 2647) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString,...
function PIXSetMarkerAllocate (line 2671) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString,...
function PIXSetMarkerAllocate (line 2696) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString,...
function PIXSetMarkerAllocate (line 2722) | inline void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString,...
function PIXSetMarkerAllocate (line 2749) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1,...
function PIXSetMarkerAllocate (line 2777) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1,...
function PIXSetMarkerAllocate (line 2836) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1,...
function PIXSetMarkerAllocate (line 2966) | void PIXSetMarkerAllocate(UINT64 color, _In_ PCWSTR formatString, T1 a1,...
function PIXSetMarker (line 3111) | inline void PIXSetMarker(UINT64 color, _In_ PCSTR formatString)
function PIXSetMarker (line 3135) | void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1)
function PIXSetMarker (line 3160) | void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2)
function PIXSetMarker (line 3186) | void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T...
function PIXSetMarker (line 3213) | void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T...
function PIXSetMarker (line 3241) | void PIXSetMarker(UINT64 color, _In_ PCSTR formatString, T1 a1, T2 a2, T...
function PIXSetMarker (line 3654) | inline void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString)
function PIXSetMarker (line 3678) | void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1)
function PIXSetMarker (line 3703) | void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2)
function PIXSetMarker (line 3729) | void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, ...
function PIXSetMarker (line 3756) | void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, ...
function PIXSetMarker (line 3784) | void PIXSetMarker(UINT64 color, _In_ PCWSTR formatString, T1 a1, T2 a2, ...
function PIXBeginEvent (line 4198) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatStr...
function PIXBeginEvent (line 4215) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatStr...
function PIXBeginEvent (line 4233) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatStr...
function PIXBeginEvent (line 4252) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatStr...
function PIXBeginEvent (line 4272) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCSTR formatStr...
function PIXBeginEvent (line 4623) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatSt...
function PIXBeginEvent (line 4640) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatSt...
function PIXBeginEvent (line 4658) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatSt...
function PIXBeginEvent (line 4677) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatSt...
function PIXBeginEvent (line 4697) | void PIXBeginEvent(TContext* context, UINT64 color, _In_ PCWSTR formatSt...
function PIXSetMarker (line 5048) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatString)
function PIXSetMarker (line 5065) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatStri...
function PIXSetMarker (line 5083) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatStri...
function PIXSetMarker (line 5102) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatStri...
function PIXSetMarker (line 5122) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCSTR formatStri...
function PIXSetMarker (line 5473) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatStr...
function PIXSetMarker (line 5490) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatStr...
function PIXSetMarker (line 5508) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatStr...
function PIXSetMarker (line 5527) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatStr...
function PIXSetMarker (line 5547) | void PIXSetMarker(TContext* context, UINT64 color, _In_ PCWSTR formatStr...
function MakeCPUSetMarkerForContextAllocate (line 5897) | __declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UIN...
function MakeCPUSetMarkerForContextAllocate (line 5920) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 5944) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 5969) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 5995) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6022) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6050) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6079) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6140) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6274) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6423) | __declspec(noinline) inline void MakeCPUSetMarkerForContextAllocate(UIN...
function MakeCPUSetMarkerForContextAllocate (line 6446) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6470) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6495) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6521) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6548) | inline void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID conte...
function MakeCPUSetMarkerForContextAllocate (line 6576) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6605) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6666) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContextAllocate (line 6800) | void MakeCPUSetMarkerForContextAllocate(UINT64 color, PVOID context, _In...
function MakeCPUSetMarkerForContext (line 6949) | inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_...
function MakeCPUSetMarkerForContext (line 6974) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR ...
function MakeCPUSetMarkerForContext (line 7000) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR ...
function MakeCPUSetMarkerForContext (line 7027) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR ...
function MakeCPUSetMarkerForContext (line 7055) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR ...
function MakeCPUSetMarkerForContext (line 7084) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCSTR ...
function MakeCPUSetMarkerForContext (line 7509) | inline void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_...
function MakeCPUSetMarkerForContext (line 7534) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR...
function MakeCPUSetMarkerForContext (line 7560) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR...
function MakeCPUSetMarkerForContext (line 7587) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR...
function MakeCPUSetMarkerForContext (line 7615) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR...
function MakeCPUSetMarkerForContext (line 7644) | void MakeCPUSetMarkerForContext(UINT64 color, PVOID context, _In_ PCWSTR...
function MakeCPUBeginEventForContextAllocate (line 8070) | __declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UIN...
function MakeCPUBeginEventForContextAllocate (line 8092) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8115) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8139) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8164) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8190) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8217) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8245) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8304) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8434) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8579) | __declspec(noinline) inline void MakeCPUBeginEventForContextAllocate(UIN...
function MakeCPUBeginEventForContextAllocate (line 8601) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8624) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8648) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8673) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8699) | inline void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID cont...
function MakeCPUBeginEventForContextAllocate (line 8726) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8754) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8813) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContextAllocate (line 8943) | void MakeCPUBeginEventForContextAllocate(UINT64 color, PVOID context, _I...
function MakeCPUBeginEventForContext (line 9088) | inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In...
function MakeCPUBeginEventForContext (line 9113) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR...
function MakeCPUBeginEventForContext (line 9139) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR...
function MakeCPUBeginEventForContext (line 9166) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR...
function MakeCPUBeginEventForContext (line 9194) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR...
function MakeCPUBeginEventForContext (line 9223) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCSTR...
function MakeCPUBeginEventForContext (line 9648) | inline void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In...
function MakeCPUBeginEventForContext (line 9673) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWST...
function MakeCPUBeginEventForContext (line 9699) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWST...
function MakeCPUBeginEventForContext (line 9726) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWST...
function MakeCPUBeginEventForContext (line 9754) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWST...
function MakeCPUBeginEventForContext (line 9783) | void MakeCPUBeginEventForContext(UINT64 color, PVOID context, _In_ PCWST...
function PIXEndEventAllocate (line 10209) | __declspec(noinline) inline void PIXEndEventAllocate()
function PIXEndEvent (line 10226) | inline void PIXEndEvent()
function MakeCPUEndEventForContextAllocate (line 10244) | __declspec(noinline) inline void MakeCPUEndEventForContextAllocate(PVOID...
function MakeCPUEndEventForContext (line 10262) | inline void MakeCPUEndEventForContext(PVOID context)
function PIXEndEvent (line 10283) | void PIXEndEvent(TContext* context)
function m_context (line 10304) | m_context(context)
function m_context (line 10311) | m_context(context)
function m_context (line 10318) | m_context(context)
function m_context (line 10325) | m_context(context)
function m_context (line 10332) | m_context(context)
function m_context (line 10339) | m_context(context)
function m_context (line 10346) | m_context(context)
function m_context (line 10353) | m_context(context)
function m_context (line 10360) | m_context(context)
function m_context (line 10367) | m_context(context)
function m_context (line 10374) | m_context(context)
function m_context (line 10381) | m_context(context)
function m_context (line 10388) | m_context(context)
function m_context (line 10395) | m_context(context)
function m_context (line 10402) | m_context(context)
function m_context (line 10409) | m_context(context)
function m_context (line 10415) | m_context(context)
function m_context (line 10422) | m_context(context)
function m_context (line 10429) | m_context(context)
function m_context (line 10436) | m_context(context)
function m_context (line 10443) | m_context(context)
function m_context (line 10450) | m_context(context)
function m_context (line 10457) | m_context(context)
function m_context (line 10464) | m_context(context)
function m_context (line 10471) | m_context(context)
function m_context (line 10478) | m_context(context)
function m_context (line 10485) | m_context(context)
function m_context (line 10492) | m_context(context)
function m_context (line 10499) | m_context(context)
function m_context (line 10506) | m_context(context)
function m_context (line 10513) | m_context(context)
function m_context (line 10520) | m_context(context)
function m_context (line 10527) | m_context(context)
FILE: external/D3D12/include/d3d12.h
type interface (line 48) | typedef interface ID3D12Object
type interface (line 55) | typedef interface ID3D12DeviceChild
type interface (line 62) | typedef interface ID3D12RootSignature
type interface (line 69) | typedef interface ID3D12RootSignatureDeserializer
type interface (line 76) | typedef interface ID3D12VersionedRootSignatureDeserializer
type interface (line 83) | typedef interface ID3D12Pageable
type interface (line 90) | typedef interface ID3D12Heap
type interface (line 97) | typedef interface ID3D12Resource
type interface (line 104) | typedef interface ID3D12CommandAllocator
type interface (line 111) | typedef interface ID3D12Fence
type interface (line 118) | typedef interface ID3D12PipelineState
type interface (line 125) | typedef interface ID3D12DescriptorHeap
type interface (line 132) | typedef interface ID3D12QueryHeap
type interface (line 139) | typedef interface ID3D12CommandSignature
type interface (line 146) | typedef interface ID3D12CommandList
type interface (line 153) | typedef interface ID3D12GraphicsCommandList
type interface (line 160) | typedef interface ID3D12CommandQueue
type interface (line 167) | typedef interface ID3D12Device
type interface (line 174) | typedef interface ID3D12PipelineLibrary
type interface (line 181) | typedef interface ID3D12Device1
type UINT64 (line 952) | typedef UINT64 D3D12_GPU_VIRTUAL_ADDRESS;
type D3D12_COMMAND_LIST_TYPE (line 954) | typedef
type D3D12_COMMAND_QUEUE_FLAGS (line 963) | typedef
type D3D12_COMMAND_QUEUE_PRIORITY (line 971) | typedef
type D3D12_COMMAND_QUEUE_DESC (line 978) | typedef struct D3D12_COMMAND_QUEUE_DESC
type D3D12_PRIMITIVE_TOPOLOGY_TYPE (line 986) | typedef
type D3D12_INPUT_CLASSIFICATION (line 996) | typedef
type D3D12_INPUT_ELEMENT_DESC (line 1003) | typedef struct D3D12_INPUT_ELEMENT_DESC
type D3D12_FILL_MODE (line 1014) | typedef
type D3D_PRIMITIVE_TOPOLOGY (line 1021) | typedef D3D_PRIMITIVE_TOPOLOGY D3D12_PRIMITIVE_TOPOLOGY;
type D3D_PRIMITIVE (line 1023) | typedef D3D_PRIMITIVE D3D12_PRIMITIVE;
type D3D12_CULL_MODE (line 1025) | typedef
type D3D12_SO_DECLARATION_ENTRY (line 1033) | typedef struct D3D12_SO_DECLARATION_ENTRY
type D3D12_VIEWPORT (line 1043) | typedef struct D3D12_VIEWPORT
type RECT (line 1053) | typedef RECT D3D12_RECT;
type D3D12_BOX (line 1055) | typedef struct D3D12_BOX
type D3D12_COMPARISON_FUNC (line 1065) | typedef
type D3D12_DEPTH_WRITE_MASK (line 1078) | typedef
type D3D12_STENCIL_OP (line 1085) | typedef
type D3D12_DEPTH_STENCILOP_DESC (line 1098) | typedef struct D3D12_DEPTH_STENCILOP_DESC
type D3D12_DEPTH_STENCIL_DESC (line 1106) | typedef struct D3D12_DEPTH_STENCIL_DESC
type D3D12_BLEND (line 1118) | typedef
type D3D12_BLEND_OP (line 1140) | typedef
type D3D12_COLOR_WRITE_ENABLE (line 1150) | typedef
type D3D12_LOGIC_OP (line 1160) | typedef
type D3D12_RENDER_TARGET_BLEND_DESC (line 1181) | typedef struct D3D12_RENDER_TARGET_BLEND_DESC
type D3D12_BLEND_DESC (line 1195) | typedef struct D3D12_BLEND_DESC
type D3D12_CONSERVATIVE_RASTERIZATION_MODE (line 1204) | typedef
type D3D12_RASTERIZER_DESC (line 1211) | typedef struct D3D12_RASTERIZER_DESC
type ID3D12ObjectVtbl (line 1268) | typedef struct ID3D12ObjectVtbl
function interface (line 1307) | interface ID3D12Object
type ID3D12DeviceChildVtbl (line 1374) | typedef struct ID3D12DeviceChildVtbl
function interface (line 1418) | interface ID3D12DeviceChild
type ID3D12RootSignatureVtbl (line 1485) | typedef struct ID3D12RootSignatureVtbl
function interface (line 1529) | interface ID3D12RootSignature
type D3D12_SHADER_BYTECODE (line 1580) | typedef struct D3D12_SHADER_BYTECODE
type D3D12_STREAM_OUTPUT_DESC (line 1586) | typedef struct D3D12_STREAM_OUTPUT_DESC
type D3D12_INPUT_LAYOUT_DESC (line 1595) | typedef struct D3D12_INPUT_LAYOUT_DESC
type D3D12_INDEX_BUFFER_STRIP_CUT_VALUE (line 1601) | typedef
type D3D12_CACHED_PIPELINE_STATE (line 1609) | typedef struct D3D12_CACHED_PIPELINE_STATE
type D3D12_PIPELINE_STATE_FLAGS (line 1615) | typedef
type D3D12_GRAPHICS_PIPELINE_STATE_DESC (line 1623) | typedef struct D3D12_GRAPHICS_PIPELINE_STATE_DESC
type D3D12_COMPUTE_PIPELINE_STATE_DESC (line 1648) | typedef struct D3D12_COMPUTE_PIPELINE_STATE_DESC
type D3D12_FEATURE (line 1657) | typedef
type D3D12_SHADER_MIN_PRECISION_SUPPORT (line 1672) | typedef
type D3D12_TILED_RESOURCES_TIER (line 1681) | typedef
type D3D12_RESOURCE_BINDING_TIER (line 1690) | typedef
type D3D12_CONSERVATIVE_RASTERIZATION_TIER (line 1698) | typedef
type D3D12_FORMAT_SUPPORT1 (line 1707) | typedef
type D3D12_FORMAT_SUPPORT2 (line 1743) | typedef
type D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS (line 1761) | typedef
type D3D12_CROSS_NODE_SHARING_TIER (line 1769) | typedef
type D3D12_RESOURCE_HEAP_TIER (line 1778) | typedef
type D3D12_FEATURE_DATA_D3D12_OPTIONS (line 1785) | typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS
type D3D12_FEATURE_DATA_D3D12_OPTIONS1 (line 1804) | typedef struct D3D12_FEATURE_DATA_D3D12_OPTIONS1
type D3D_ROOT_SIGNATURE_VERSION (line 1814) | typedef
type D3D12_FEATURE_DATA_ROOT_SIGNATURE (line 1822) | typedef struct D3D12_FEATURE_DATA_ROOT_SIGNATURE
type D3D12_FEATURE_DATA_ARCHITECTURE (line 1827) | typedef struct D3D12_FEATURE_DATA_ARCHITECTURE
type D3D12_FEATURE_DATA_FEATURE_LEVELS (line 1835) | typedef struct D3D12_FEATURE_DATA_FEATURE_LEVELS
type D3D_SHADER_MODEL (line 1842) | typedef
type D3D12_FEATURE_DATA_SHADER_MODEL (line 1849) | typedef struct D3D12_FEATURE_DATA_SHADER_MODEL
type D3D12_FEATURE_DATA_FORMAT_SUPPORT (line 1854) | typedef struct D3D12_FEATURE_DATA_FORMAT_SUPPORT
type D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS (line 1861) | typedef struct D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS
type D3D12_FEATURE_DATA_FORMAT_INFO (line 1869) | typedef struct D3D12_FEATURE_DATA_FORMAT_INFO
type D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT (line 1875) | typedef struct D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT
type D3D12_RESOURCE_ALLOCATION_INFO (line 1881) | typedef struct D3D12_RESOURCE_ALLOCATION_INFO
type D3D12_HEAP_TYPE (line 1887) | typedef
type D3D12_CPU_PAGE_PROPERTY (line 1896) | typedef
type D3D12_MEMORY_POOL (line 1905) | typedef
type D3D12_HEAP_PROPERTIES (line 1913) | typedef struct D3D12_HEAP_PROPERTIES
type D3D12_HEAP_FLAGS (line 1922) | typedef
type D3D12_HEAP_DESC (line 1940) | typedef struct D3D12_HEAP_DESC
type D3D12_RESOURCE_DIMENSION (line 1948) | typedef
type D3D12_TEXTURE_LAYOUT (line 1958) | typedef
type D3D12_RESOURCE_FLAGS (line 1967) | typedef
type D3D12_RESOURCE_DESC (line 1980) | typedef struct D3D12_RESOURCE_DESC
type D3D12_DEPTH_STENCIL_VALUE (line 1994) | typedef struct D3D12_DEPTH_STENCIL_VALUE
type D3D12_CLEAR_VALUE (line 2000) | typedef struct D3D12_CLEAR_VALUE
type D3D12_RANGE (line 2010) | typedef struct D3D12_RANGE
type D3D12_SUBRESOURCE_INFO (line 2016) | typedef struct D3D12_SUBRESOURCE_INFO
type D3D12_TILED_RESOURCE_COORDINATE (line 2023) | typedef struct D3D12_TILED_RESOURCE_COORDINATE
type D3D12_TILE_REGION_SIZE (line 2031) | typedef struct D3D12_TILE_REGION_SIZE
type D3D12_TILE_RANGE_FLAGS (line 2040) | typedef
type D3D12_SUBRESOURCE_TILING (line 2049) | typedef struct D3D12_SUBRESOURCE_TILING
type D3D12_TILE_SHAPE (line 2057) | typedef struct D3D12_TILE_SHAPE
type D3D12_PACKED_MIP_INFO (line 2064) | typedef struct D3D12_PACKED_MIP_INFO
type D3D12_TILE_MAPPING_FLAGS (line 2072) | typedef
type D3D12_TILE_COPY_FLAGS (line 2080) | typedef
type D3D12_RESOURCE_STATES (line 2090) | typedef
type D3D12_RESOURCE_BARRIER_TYPE (line 2114) | typedef
type D3D12_RESOURCE_TRANSITION_BARRIER (line 2123) | typedef struct D3D12_RESOURCE_TRANSITION_BARRIER
type D3D12_RESOURCE_ALIASING_BARRIER (line 2131) | typedef struct D3D12_RESOURCE_ALIASING_BARRIER
type D3D12_RESOURCE_UAV_BARRIER (line 2137) | typedef struct D3D12_RESOURCE_UAV_BARRIER
type D3D12_RESOURCE_BARRIER_FLAGS (line 2142) | typedef
type D3D12_RESOURCE_BARRIER (line 2151) | typedef struct D3D12_RESOURCE_BARRIER
type D3D12_SUBRESOURCE_FOOTPRINT (line 2163) | typedef struct D3D12_SUBRESOURCE_FOOTPRINT
type D3D12_PLACED_SUBRESOURCE_FOOTPRINT (line 2172) | typedef struct D3D12_PLACED_SUBRESOURCE_FOOTPRINT
type D3D12_TEXTURE_COPY_TYPE (line 2178) | typedef
type D3D12_TEXTURE_COPY_LOCATION (line 2185) | typedef struct D3D12_TEXTURE_COPY_LOCATION
type D3D12_SHADER_COMPONENT_MAPPING (line 2196) | typedef
type D3D12_BUFFER_SRV_FLAGS (line 2217) | typedef
type D3D12_BUFFER_SRV (line 2225) | typedef struct D3D12_BUFFER_SRV
type D3D12_TEX1D_SRV (line 2233) | typedef struct D3D12_TEX1D_SRV
type D3D12_TEX1D_ARRAY_SRV (line 2240) | typedef struct D3D12_TEX1D_ARRAY_SRV
type D3D12_TEX2D_SRV (line 2249) | typedef struct D3D12_TEX2D_SRV
type D3D12_TEX2D_ARRAY_SRV (line 2257) | typedef struct D3D12_TEX2D_ARRAY_SRV
type D3D12_TEX3D_SRV (line 2267) | typedef struct D3D12_TEX3D_SRV
type D3D12_TEXCUBE_SRV (line 2274) | typedef struct D3D12_TEXCUBE_SRV
type D3D12_TEXCUBE_ARRAY_SRV (line 2281) | typedef struct D3D12_TEXCUBE_ARRAY_SRV
type D3D12_TEX2DMS_SRV (line 2290) | typedef struct D3D12_TEX2DMS_SRV
type D3D12_TEX2DMS_ARRAY_SRV (line 2295) | typedef struct D3D12_TEX2DMS_ARRAY_SRV
type D3D12_SRV_DIMENSION (line 2301) | typedef
type D3D12_SHADER_RESOURCE_VIEW_DESC (line 2317) | typedef struct D3D12_SHADER_RESOURCE_VIEW_DESC
type D3D12_CONSTANT_BUFFER_VIEW_DESC (line 2337) | typedef struct D3D12_CONSTANT_BUFFER_VIEW_DESC
type D3D12_FILTER (line 2343) | typedef
type D3D12_FILTER_TYPE (line 2384) | typedef
type D3D12_FILTER_REDUCTION_TYPE (line 2391) | typedef
type D3D12_TEXTURE_ADDRESS_MODE (line 2446) | typedef
type D3D12_SAMPLER_DESC (line 2456) | typedef struct D3D12_SAMPLER_DESC
type D3D12_BUFFER_UAV_FLAGS (line 2470) | typedef
type D3D12_BUFFER_UAV (line 2478) | typedef struct D3D12_BUFFER_UAV
type D3D12_TEX1D_UAV (line 2487) | typedef struct D3D12_TEX1D_UAV
type D3D12_TEX1D_ARRAY_UAV (line 2492) | typedef struct D3D12_TEX1D_ARRAY_UAV
type D3D12_TEX2D_UAV (line 2499) | typedef struct D3D12_TEX2D_UAV
type D3D12_TEX2D_ARRAY_UAV (line 2505) | typedef struct D3D12_TEX2D_ARRAY_UAV
type D3D12_TEX3D_UAV (line 2513) | typedef struct D3D12_TEX3D_UAV
type D3D12_UAV_DIMENSION (line 2520) | typedef
type D3D12_UNORDERED_ACCESS_VIEW_DESC (line 2532) | typedef struct D3D12_UNORDERED_ACCESS_VIEW_DESC
type D3D12_BUFFER_RTV (line 2547) | typedef struct D3D12_BUFFER_RTV
type D3D12_TEX1D_RTV (line 2553) | typedef struct D3D12_TEX1D_RTV
type D3D12_TEX1D_ARRAY_RTV (line 2558) | typedef struct D3D12_TEX1D_ARRAY_RTV
type D3D12_TEX2D_RTV (line 2565) | typedef struct D3D12_TEX2D_RTV
type D3D12_TEX2DMS_RTV (line 2571) | typedef struct D3D12_TEX2DMS_RTV
type D3D12_TEX2D_ARRAY_RTV (line 2576) | typedef struct D3D12_TEX2D_ARRAY_RTV
type D3D12_TEX2DMS_ARRAY_RTV (line 2584) | typedef struct D3D12_TEX2DMS_ARRAY_RTV
type D3D12_TEX3D_RTV (line 2590) | typedef struct D3D12_TEX3D_RTV
type D3D12_RTV_DIMENSION (line 2597) | typedef
type D3D12_RENDER_TARGET_VIEW_DESC (line 2611) | typedef struct D3D12_RENDER_TARGET_VIEW_DESC
type D3D12_TEX1D_DSV (line 2628) | typedef struct D3D12_TEX1D_DSV
type D3D12_TEX1D_ARRAY_DSV (line 2633) | typedef struct D3D12_TEX1D_ARRAY_DSV
type D3D12_TEX2D_DSV (line 2640) | typedef struct D3D12_TEX2D_DSV
type D3D12_TEX2D_ARRAY_DSV (line 2645) | typedef struct D3D12_TEX2D_ARRAY_DSV
type D3D12_TEX2DMS_DSV (line 2652) | typedef struct D3D12_TEX2DMS_DSV
type D3D12_TEX2DMS_ARRAY_DSV (line 2657) | typedef struct D3D12_TEX2DMS_ARRAY_DSV
type D3D12_DSV_FLAGS (line 2663) | typedef
type D3D12_DSV_DIMENSION (line 2672) | typedef
type D3D12_DEPTH_STENCIL_VIEW_DESC (line 2684) | typedef struct D3D12_DEPTH_STENCIL_VIEW_DESC
type D3D12_CLEAR_FLAGS (line 2700) | typedef
type D3D12_FENCE_FLAGS (line 2708) | typedef
type D3D12_DESCRIPTOR_HEAP_TYPE (line 2717) | typedef
type D3D12_DESCRIPTOR_HEAP_FLAGS (line 2727) | typedef
type D3D12_DESCRIPTOR_HEAP_DESC (line 2735) | typedef struct D3D12_DESCRIPTOR_HEAP_DESC
type D3D12_DESCRIPTOR_RANGE_TYPE (line 2743) | typedef
type D3D12_DESCRIPTOR_RANGE (line 2752) | typedef struct D3D12_DESCRIPTOR_RANGE
type D3D12_ROOT_DESCRIPTOR_TABLE (line 2761) | typedef struct D3D12_ROOT_DESCRIPTOR_TABLE
type D3D12_ROOT_CONSTANTS (line 2767) | typedef struct D3D12_ROOT_CONSTANTS
type D3D12_ROOT_DESCRIPTOR (line 2774) | typedef struct D3D12_ROOT_DESCRIPTOR
type D3D12_SHADER_VISIBILITY (line 2780) | typedef
type D3D12_ROOT_PARAMETER_TYPE (line 2791) | typedef
type D3D12_ROOT_PARAMETER (line 2801) | typedef struct D3D12_ROOT_PARAMETER
type D3D12_ROOT_SIGNATURE_FLAGS (line 2813) | typedef
type D3D12_STATIC_BORDER_COLOR (line 2827) | typedef
type D3D12_STATIC_SAMPLER_DESC (line 2835) | typedef struct D3D12_STATIC_SAMPLER_DESC
type D3D12_ROOT_SIGNATURE_DESC (line 2852) | typedef struct D3D12_ROOT_SIGNATURE_DESC
type D3D12_DESCRIPTOR_RANGE_FLAGS (line 2861) | typedef
type D3D12_DESCRIPTOR_RANGE1 (line 2872) | typedef struct D3D12_DESCRIPTOR_RANGE1
type D3D12_ROOT_DESCRIPTOR_TABLE1 (line 2882) | typedef struct D3D12_ROOT_DESCRIPTOR_TABLE1
type D3D12_ROOT_DESCRIPTOR_FLAGS (line 2888) | typedef
type D3D12_ROOT_DESCRIPTOR1 (line 2898) | typedef struct D3D12_ROOT_DESCRIPTOR1
type D3D12_ROOT_PARAMETER1 (line 2905) | typedef struct D3D12_ROOT_PARAMETER1
type D3D12_ROOT_SIGNATURE_DESC1 (line 2917) | typedef struct D3D12_ROOT_SIGNATURE_DESC1
type D3D12_VERSIONED_ROOT_SIGNATURE_DESC (line 2926) | typedef struct D3D12_VERSIONED_ROOT_SIGNATURE_DESC
type ID3D12RootSignatureDeserializerVtbl (line 2963) | typedef struct ID3D12RootSignatureDeserializerVtbl
function interface (line 2984) | interface ID3D12RootSignatureDeserializer
type ID3D12VersionedRootSignatureDeserializerVtbl (line 3044) | typedef struct ID3D12VersionedRootSignatureDeserializerVtbl
function interface (line 3070) | interface ID3D12VersionedRootSignatureDeserializer
type D3D12_CPU_DESCRIPTOR_HANDLE (line 3156) | typedef struct D3D12_CPU_DESCRIPTOR_HANDLE
type D3D12_GPU_DESCRIPTOR_HANDLE (line 3161) | typedef struct D3D12_GPU_DESCRIPTOR_HANDLE
type D3D12_DISCARD_REGION (line 3168) | typedef struct D3D12_DISCARD_REGION
type D3D12_QUERY_HEAP_TYPE (line 3176) | typedef
type D3D12_QUERY_HEAP_DESC (line 3185) | typedef struct D3D12_QUERY_HEAP_DESC
type D3D12_QUERY_TYPE (line 3192) | typedef
type D3D12_PREDICATION_OP (line 3205) | typedef
type D3D12_QUERY_DATA_PIPELINE_STATISTICS (line 3212) | typedef struct D3D12_QUERY_DATA_PIPELINE_STATISTICS
type D3D12_QUERY_DATA_SO_STATISTICS (line 3227) | typedef struct D3D12_QUERY_DATA_SO_STATISTICS
type D3D12_STREAM_OUTPUT_BUFFER_VIEW (line 3233) | typedef struct D3D12_STREAM_OUTPUT_BUFFER_VIEW
type D3D12_DRAW_ARGUMENTS (line 3240) | typedef struct D3D12_DRAW_ARGUMENTS
type D3D12_DRAW_INDEXED_ARGUMENTS (line 3248) | typedef struct D3D12_DRAW_INDEXED_ARGUMENTS
type D3D12_DISPATCH_ARGUMENTS (line 3257) | typedef struct D3D12_DISPATCH_ARGUMENTS
type D3D12_VERTEX_BUFFER_VIEW (line 3264) | typedef struct D3D12_VERTEX_BUFFER_VIEW
type D3D12_INDEX_BUFFER_VIEW (line 3271) | typedef struct D3D12_INDEX_BUFFER_VIEW
type D3D12_INDIRECT_ARGUMENT_TYPE (line 3278) | typedef
type D3D12_INDIRECT_ARGUMENT_DESC (line 3292) | typedef struct D3D12_INDIRECT_ARGUMENT_DESC
type D3D12_COMMAND_SIGNATURE_DESC (line 3322) | typedef struct D3D12_COMMAND_SIGNATURE_DESC
type ID3D12PageableVtbl (line 3356) | typedef struct ID3D12PageableVtbl
function interface (line 3400) | interface ID3D12Pageable
type ID3D12HeapVtbl (line 3470) | typedef struct ID3D12HeapVtbl
function interface (line 3517) | interface ID3D12Heap
type ID3D12ResourceVtbl (line 3624) | typedef struct ID3D12ResourceVtbl
function interface (line 3706) | interface ID3D12Resource
type ID3D12CommandAllocatorVtbl (line 3802) | typedef struct ID3D12CommandAllocatorVtbl
function interface (line 3849) | interface ID3D12CommandAllocator
type ID3D12FenceVtbl (line 3930) | typedef struct ID3D12FenceVtbl
function interface (line 3986) | interface ID3D12Fence
type ID3D12PipelineStateVtbl (line 4067) | typedef struct ID3D12PipelineStateVtbl
function interface (line 4115) | interface ID3D12PipelineState
type ID3D12DescriptorHeapVtbl (line 4193) | typedef struct ID3D12DescriptorHeapVtbl
function interface (line 4246) | interface ID3D12DescriptorHeap
type ID3D12QueryHeapVtbl (line 4336) | typedef struct ID3D12QueryHeapVtbl
function interface (line 4380) | interface ID3D12QueryHeap
type ID3D12CommandSignatureVtbl (line 4449) | typedef struct ID3D12CommandSignatureVtbl
function interface (line 4493) | interface ID3D12CommandSignature
type ID3D12CommandListVtbl (line 4564) | typedef struct ID3D12CommandListVtbl
function interface (line 4611) | interface ID3D12CommandList
type ID3D12GraphicsCommandListVtbl (line 4930) | struct ID3D12GraphicsCommandListVtbl
type ID3D12CommandQueueVtbl (line 5554) | typedef struct ID3D12CommandQueueVtbl
function interface (line 5662) | interface ID3D12CommandQueue
type ID3D12DeviceVtbl (line 5970) | typedef struct ID3D12DeviceVtbl
function interface (line 6248) | interface ID3D12Device
type ID3D12PipelineLibraryVtbl (line 6457) | typedef struct ID3D12PipelineLibraryVtbl
function interface (line 6528) | interface ID3D12PipelineLibrary
type D3D12_MULTIPLE_FENCE_WAIT_FLAGS (line 6594) | typedef
type D3D12_RESIDENCY_PRIORITY (line 6603) | typedef
type ID3D12Device1Vtbl (line 6656) | typedef struct ID3D12Device1Vtbl
function interface (line 6955) | interface ID3D12Device1
type D3D12_SUBRESOURCE_DATA (line 7123) | typedef struct D3D12_SUBRESOURCE_DATA
type D3D12_MEMCPY_DEST (line 7130) | typedef struct D3D12_MEMCPY_DEST
FILE: external/D3D12/include/d3d12sdklayers.h
type interface (line 48) | typedef interface ID3D12Debug
type interface (line 55) | typedef interface ID3D12Debug1
type interface (line 62) | typedef interface ID3D12DebugDevice1
type interface (line 69) | typedef interface ID3D12DebugDevice
type interface (line 76) | typedef interface ID3D12DebugCommandQueue
type interface (line 83) | typedef interface ID3D12DebugCommandList1
type interface (line 90) | typedef interface ID3D12DebugCommandList
type interface (line 97) | typedef interface ID3D12InfoQueue
type ID3D12DebugVtbl (line 145) | typedef struct ID3D12DebugVtbl
function interface (line 166) | interface ID3D12Debug
type ID3D12Debug1Vtbl (line 228) | typedef struct ID3D12Debug1Vtbl
function interface (line 257) | interface ID3D12Debug1
type D3D12_RLDO_FLAGS (line 300) | typedef
type D3D12_DEBUG_DEVICE_PARAMETER_TYPE (line 311) | enum D3D12_DEBUG_DEVICE_PARAMETER_TYPE
type D3D12_DEBUG_FEATURE (line 317) | typedef
type D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE (line 329) | enum D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE
type D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS (line 338) | typedef
type D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS (line 349) | struct D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS
type ID3D12DebugDevice1Vtbl (line 394) | typedef struct ID3D12DebugDevice1Vtbl
function interface (line 428) | interface ID3D12DebugDevice1
type ID3D12DebugDeviceVtbl (line 496) | typedef struct ID3D12DebugDeviceVtbl
function interface (line 525) | interface ID3D12DebugDevice
type ID3D12DebugCommandQueueVtbl (line 599) | typedef struct ID3D12DebugCommandQueueVtbl
function interface (line 623) | interface ID3D12DebugCommandQueue
type D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE (line 660) | typedef
type D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS (line 666) | typedef struct D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS
type ID3D12DebugCommandList1Vtbl (line 711) | typedef struct ID3D12DebugCommandList1Vtbl
function interface (line 747) | interface ID3D12DebugCommandList1
type ID3D12DebugCommandListVtbl (line 817) | typedef struct ID3D12DebugCommandListVtbl
function interface (line 848) | interface ID3D12DebugCommandList
type D3D12_MESSAGE_CATEGORY (line 891) | typedef
type D3D12_MESSAGE_SEVERITY (line 907) | typedef
type D3D12_MESSAGE_ID (line 917) | typedef
type D3D12_MESSAGE (line 1924) | typedef struct D3D12_MESSAGE
type D3D12_INFO_QUEUE_FILTER_DESC (line 1933) | typedef struct D3D12_INFO_QUEUE_FILTER_DESC
type D3D12_INFO_QUEUE_FILTER (line 1943) | typedef struct D3D12_INFO_QUEUE_FILTER
type ID3D12InfoQueueVtbl (line 2073) | typedef struct ID3D12InfoQueueVtbl
function interface (line 2224) | interface ID3D12InfoQueue
FILE: external/D3D12/include/d3dx12.h
type CD3DX12_DEFAULT (line 17) | struct CD3DX12_DEFAULT {}
function D3D12_RECT (line 32) | struct CD3DX12_RECT : public D3D12_RECT
function D3D12_BOX (line 55) | struct CD3DX12_BOX : public D3D12_BOX
function D3D12_DEPTH_STENCIL_DESC (line 113) | struct CD3DX12_DEPTH_STENCIL_DESC : public D3D12_DEPTH_STENCIL_DESC
function D3D12_BLEND_DESC (line 169) | struct CD3DX12_BLEND_DESC : public D3D12_BLEND_DESC
function D3D12_RASTERIZER_DESC (line 196) | struct CD3DX12_RASTERIZER_DESC : public D3D12_RASTERIZER_DESC
function D3D12_RESOURCE_ALLOCATION_INFO (line 247) | struct CD3DX12_RESOURCE_ALLOCATION_INFO : public D3D12_RESOURCE_ALLOCATI...
type CD3DX12_HEAP_PROPERTIES (line 265) | struct CD3DX12_HEAP_PROPERTIES
function explicit (line 269) | explicit CD3DX12_HEAP_PROPERTIES(const D3D12_HEAP_PROPERTIES &o) :
type CD3DX12_HEAP_DESC (line 313) | struct CD3DX12_HEAP_DESC
function explicit (line 317) | explicit CD3DX12_HEAP_DESC(const D3D12_HEAP_DESC &o) :
type CD3DX12_CLEAR_VALUE (line 391) | struct CD3DX12_CLEAR_VALUE
function explicit (line 395) | explicit CD3DX12_CLEAR_VALUE(const D3D12_CLEAR_VALUE &o) :
type CD3DX12_RANGE (line 419) | struct CD3DX12_RANGE
function explicit (line 423) | explicit CD3DX12_RANGE(const D3D12_RANGE &o) :
type CD3DX12_TILE_REGION_SIZE (line 459) | struct CD3DX12_TILE_REGION_SIZE
function explicit (line 463) | explicit CD3DX12_TILE_REGION_SIZE(const D3D12_TILE_REGION_SIZE &o) :
function D3D12_SUBRESOURCE_TILING (line 483) | struct CD3DX12_SUBRESOURCE_TILING : public D3D12_SUBRESOURCE_TILING
type CD3DX12_TILE_SHAPE (line 505) | struct CD3DX12_TILE_SHAPE
function explicit (line 509) | explicit CD3DX12_TILE_SHAPE(const D3D12_TILE_SHAPE &o) :
function D3D12_RESOURCE_BARRIER (line 525) | struct CD3DX12_RESOURCE_BARRIER : public D3D12_RESOURCE_BARRIER
function D3D12_PACKED_MIP_INFO (line 573) | struct CD3DX12_PACKED_MIP_INFO : public D3D12_PACKED_MIP_INFO
type CD3DX12_SUBRESOURCE_FOOTPRINT (line 595) | struct CD3DX12_SUBRESOURCE_FOOTPRINT
function explicit (line 599) | explicit CD3DX12_SUBRESOURCE_FOOTPRINT(const D3D12_SUBRESOURCE_FOOTPRINT...
type CD3DX12_TEXTURE_COPY_LOCATION (line 629) | struct CD3DX12_TEXTURE_COPY_LOCATION
function explicit (line 633) | explicit CD3DX12_TEXTURE_COPY_LOCATION(const D3D12_TEXTURE_COPY_LOCATION...
function D3D12_DESCRIPTOR_RANGE (line 652) | struct CD3DX12_DESCRIPTOR_RANGE : public D3D12_DESCRIPTOR_RANGE
function D3D12_ROOT_DESCRIPTOR_TABLE (line 698) | struct CD3DX12_ROOT_DESCRIPTOR_TABLE : public D3D12_ROOT_DESCRIPTOR_TABLE
function Init (line 711) | inline void Init(
function Init (line 718) | static inline void Init(
function D3D12_ROOT_CONSTANTS (line 729) | struct CD3DX12_ROOT_CONSTANTS : public D3D12_ROOT_CONSTANTS
function D3D12_ROOT_DESCRIPTOR (line 764) | struct CD3DX12_ROOT_DESCRIPTOR : public D3D12_ROOT_DESCRIPTOR
function D3D12_ROOT_PARAMETER (line 792) | struct CD3DX12_ROOT_PARAMETER : public D3D12_ROOT_PARAMETER
function InitAsDescriptorTable (line 855) | inline void InitAsDescriptorTable(
function D3D12_STATIC_SAMPLER_DESC (line 898) | struct CD3DX12_STATIC_SAMPLER_DESC : public D3D12_STATIC_SAMPLER_DESC
function D3D12_ROOT_SIGNATURE_DESC (line 1000) | struct CD3DX12_ROOT_SIGNATURE_DESC : public D3D12_ROOT_SIGNATURE_DESC
function D3D12_CPU_DESCRIPTOR_HANDLE (line 1045) | struct CD3DX12_CPU_DESCRIPTOR_HANDLE : public D3D12_CPU_DESCRIPTOR_HANDLE
function D3D12_GPU_DESCRIPTOR_HANDLE (line 1106) | struct CD3DX12_GPU_DESCRIPTOR_HANDLE : public D3D12_GPU_DESCRIPTOR_HANDLE
function UINT (line 1167) | inline UINT D3D12CalcSubresource( UINT MipSlice, UINT ArraySlice, UINT P...
function D3D12DecomposeSubresource (line 1174) | void D3D12DecomposeSubresource( UINT Subresource, UINT MipLevels, UINT A...
function UINT8 (line 1182) | inline UINT8 D3D12GetFormatPlaneCount(
function D3D12_RESOURCE_DESC (line 1196) | struct CD3DX12_RESOURCE_DESC : public D3D12_RESOURCE_DESC
function CD3DX12_RESOURCE_DESC (line 1228) | static inline CD3DX12_RESOURCE_DESC Buffer(
function UINT8 (line 1287) | inline UINT8 PlaneCount(_In_ ID3D12Device* pDevice) const
function UINT (line 1289) | inline UINT Subresources(_In_ ID3D12Device* pDevice) const
function UINT (line 1291) | inline UINT CalcSubresource(UINT MipSlice, UINT ArraySlice, UINT PlaneSl...
function MemcpySubresource (line 1298) | inline void MemcpySubresource(
function UINT (line 1323) | UINT NumSubresources)
function D3D12IsLayoutOpaque (line 1459) | inline bool D3D12IsLayoutOpaque( D3D12_TEXTURE_LAYOUT Layout )
function ID3D12CommandList (line 1463) | inline ID3D12CommandList * const * CommandListCast(ID3D12GraphicsCommand...
FILE: external/D3D12/include/dxgi.h
type interface (line 44) | typedef interface IDXGIObject
type interface (line 51) | typedef interface IDXGIDeviceSubObject
type interface (line 58) | typedef interface IDXGIResource
type interface (line 65) | typedef interface IDXGIKeyedMutex
type interface (line 72) | typedef interface IDXGISurface
type interface (line 79) | typedef interface IDXGISurface1
type interface (line 86) | typedef interface IDXGIAdapter
type interface (line 93) | typedef interface IDXGIOutput
type interface (line 100) | typedef interface IDXGISwapChain
type interface (line 107) | typedef interface IDXGIFactory
type interface (line 114) | typedef interface IDXGIDevice
type interface (line 121) | typedef interface IDXGIFactory1
type interface (line 128) | typedef interface IDXGIAdapter1
type interface (line 135) | typedef interface IDXGIDevice1
type UINT (line 166) | typedef UINT DXGI_USAGE;
type DXGI_FRAME_STATISTICS (line 168) | typedef struct DXGI_FRAME_STATISTICS
type DXGI_MAPPED_RECT (line 177) | typedef struct DXGI_MAPPED_RECT
type LUID (line 184) | typedef struct _LUID
type _LUID (line 190) | struct _LUID
type DXGI_ADAPTER_DESC (line 193) | typedef struct DXGI_ADAPTER_DESC
type HANDLE (line 209) | typedef HANDLE HMONITOR;
type DXGI_OUTPUT_DESC (line 214) | typedef struct DXGI_OUTPUT_DESC
type DXGI_SHARED_RESOURCE (line 223) | typedef struct DXGI_SHARED_RESOURCE
type DXGI_RESIDENCY (line 238) | typedef
type DXGI_SURFACE_DESC (line 246) | typedef struct DXGI_SURFACE_DESC
type DXGI_SWAP_EFFECT (line 254) | typedef
type DXGI_SWAP_CHAIN_FLAG (line 263) | typedef
type DXGI_SWAP_CHAIN_DESC (line 280) | typedef struct DXGI_SWAP_CHAIN_DESC
type IDXGIObjectVtbl (line 344) | typedef struct IDXGIObjectVtbl
function interface (line 394) | interface IDXGIObject
type IDXGIDeviceSubObjectVtbl (line 463) | typedef struct IDXGIDeviceSubObjectVtbl
function interface (line 520) | interface IDXGIDeviceSubObject
type IDXGIResourceVtbl (line 601) | typedef struct IDXGIResourceVtbl
function interface (line 676) | interface IDXGIResource
type IDXGIKeyedMutexVtbl (line 763) | typedef struct IDXGIKeyedMutexVtbl
function interface (line 829) | interface IDXGIKeyedMutex
type IDXGISurfaceVtbl (line 928) | typedef struct IDXGISurfaceVtbl
function interface (line 999) | interface IDXGISurface
type IDXGISurface1Vtbl (line 1085) | typedef struct IDXGISurface1Vtbl
function interface (line 1167) | interface IDXGISurface1
type IDXGIAdapterVtbl (line 1275) | typedef struct IDXGIAdapterVtbl
function interface (line 1343) | interface IDXGIAdapter
type IDXGIOutputVtbl (line 1481) | typedef struct IDXGIOutputVtbl
function interface (line 1596) | interface IDXGIOutput
type IDXGISwapChainVtbl (line 1763) | typedef struct IDXGISwapChainVtbl
function interface (line 1879) | interface IDXGISwapChain
type IDXGIFactoryVtbl (line 2015) | typedef struct IDXGIFactoryVtbl
function interface (line 2096) | interface IDXGIFactory
type IDXGIDeviceVtbl (line 2217) | typedef struct IDXGIDeviceVtbl
function interface (line 2300) | interface IDXGIDevice
type DXGI_ADAPTER_FLAG (line 2362) | typedef
type DXGI_ADAPTER_DESC1 (line 2371) | typedef struct DXGI_ADAPTER_DESC1
type DXGI_DISPLAY_COLOR_SPACE (line 2385) | typedef struct DXGI_DISPLAY_COLOR_SPACE
type IDXGIFactory1Vtbl (line 2424) | typedef struct IDXGIFactory1Vtbl
function interface (line 2514) | interface IDXGIFactory1
type IDXGIAdapter1Vtbl (line 2604) | typedef struct IDXGIAdapter1Vtbl
function interface (line 2677) | interface IDXGIAdapter1
type IDXGIDevice1Vtbl (line 2761) | typedef struct IDXGIDevice1Vtbl
function interface (line 2853) | interface IDXGIDevice1
FILE: external/D3D12/include/dxgi1_2.h
type interface (line 44) | typedef interface IDXGIDisplayControl
type interface (line 51) | typedef interface IDXGIOutputDuplication
type interface (line 58) | typedef interface IDXGISurface2
type interface (line 65) | typedef interface IDXGIResource1
type interface (line 72) | typedef interface IDXGIDevice2
type interface (line 79) | typedef interface IDXGISwapChain1
type interface (line 86) | typedef interface IDXGIFactory2
type interface (line 93) | typedef interface IDXGIAdapter2
type interface (line 100) | typedef interface IDXGIOutput1
type IDXGIDisplayControlVtbl (line 149) | typedef struct IDXGIDisplayControlVtbl
function interface (line 175) | interface IDXGIDisplayControl
type DXGI_OUTDUPL_MOVE_RECT (line 215) | typedef struct DXGI_OUTDUPL_MOVE_RECT
type DXGI_OUTDUPL_DESC (line 221) | typedef struct DXGI_OUTDUPL_DESC
type DXGI_OUTDUPL_POINTER_POSITION (line 228) | typedef struct DXGI_OUTDUPL_POINTER_POSITION
type DXGI_OUTDUPL_POINTER_SHAPE_TYPE (line 234) | typedef
type DXGI_OUTDUPL_POINTER_SHAPE_INFO (line 242) | typedef struct DXGI_OUTDUPL_POINTER_SHAPE_INFO
type DXGI_OUTDUPL_FRAME_INFO (line 251) | typedef struct DXGI_OUTDUPL_FRAME_INFO
type IDXGIOutputDuplicationVtbl (line 334) | typedef struct IDXGIOutputDuplicationVtbl
function interface (line 438) | interface IDXGIOutputDuplication
type DXGI_ALPHA_MODE (line 513) | typedef
type IDXGISurface2Vtbl (line 556) | typedef struct IDXGISurface2Vtbl
function interface (line 647) | interface IDXGISurface2
type IDXGIResource1Vtbl (line 750) | typedef struct IDXGIResource1Vtbl
function interface (line 842) | interface IDXGIResource1
type DXGI_OFFER_RESOURCE_PRIORITY (line 912) | typedef
type IDXGIDevice2Vtbl (line 965) | typedef struct IDXGIDevice2Vtbl
function interface (line 1080) | interface IDXGIDevice2
type DXGI_MODE_DESC1 (line 1167) | typedef struct DXGI_MODE_DESC1
type DXGI_SCALING (line 1178) | typedef
type DXGI_SWAP_CHAIN_DESC1 (line 1186) | typedef struct DXGI_SWAP_CHAIN_DESC1
type DXGI_SWAP_CHAIN_FULLSCREEN_DESC (line 1201) | typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC
type DXGI_PRESENT_PARAMETERS (line 1209) | typedef struct DXGI_PRESENT_PARAMETERS
type IDXGISwapChain1Vtbl (line 1288) | typedef struct IDXGISwapChain1Vtbl
function interface (line 1461) | interface IDXGISwapChain1
type IDXGIFactory2Vtbl (line 1673) | typedef struct IDXGIFactory2Vtbl
function interface (line 1854) | interface IDXGIFactory2
type DXGI_GRAPHICS_PREEMPTION_GRANULARITY (line 1957) | typedef
type DXGI_COMPUTE_PREEMPTION_GRANULARITY (line 1967) | typedef
type DXGI_ADAPTER_DESC2 (line 1977) | typedef struct DXGI_ADAPTER_DESC2
type IDXGIAdapter2Vtbl (line 2022) | typedef struct IDXGIAdapter2Vtbl
function interface (line 2100) | interface IDXGIAdapter2
type IDXGIOutput1Vtbl (line 2207) | typedef struct IDXGIOutput1Vtbl
function interface (line 2352) | interface IDXGIOutput1
FILE: external/D3D12/include/dxgi1_3.h
type interface (line 44) | typedef interface IDXGIDevice3
type interface (line 51) | typedef interface IDXGISwapChain2
type interface (line 58) | typedef interface IDXGIOutput2
type interface (line 65) | typedef interface IDXGIFactory3
type interface (line 72) | typedef interface IDXGIDecodeSwapChain
type interface (line 79) | typedef interface IDXGIFactoryMedia
type interface (line 86) | typedef interface IDXGISwapChainMedia
type interface (line 93) | typedef interface IDXGIOutput3
type IDXGIDevice3Vtbl (line 142) | typedef struct IDXGIDevice3Vtbl
function interface (line 260) | interface IDXGIDevice3
type DXGI_MATRIX_3X2_F (line 343) | typedef struct DXGI_MATRIX_3X2_F
type IDXGISwapChain2Vtbl (line 404) | typedef struct IDXGISwapChain2Vtbl
function interface (line 610) | interface IDXGISwapChain2
type IDXGIOutput2Vtbl (line 766) | typedef struct IDXGIOutput2Vtbl
function interface (line 914) | interface IDXGIOutput2
type IDXGIFactory3Vtbl (line 1033) | typedef struct IDXGIFactory3Vtbl
function interface (line 1217) | interface IDXGIFactory3
type DXGI_DECODE_SWAP_CHAIN_DESC (line 1328) | typedef struct DXGI_DECODE_SWAP_CHAIN_DESC
type DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS (line 1333) | typedef
type IDXGIDecodeSwapChainVtbl (line 1400) | typedef struct IDXGIDecodeSwapChainVtbl
function interface (line 1462) | interface IDXGIDecodeSwapChain
type IDXGIFactoryMediaVtbl (line 1566) | typedef struct IDXGIFactoryMediaVtbl
function interface (line 1613) | interface IDXGIFactoryMedia
type DXGI_FRAME_PRESENTATION_MODE (line 1653) | typedef
type DXGI_FRAME_STATISTICS_MEDIA (line 1662) | typedef struct DXGI_FRAME_STATISTICS_MEDIA
type IDXGISwapChainMediaVtbl (line 1712) | typedef struct IDXGISwapChainMediaVtbl
function interface (line 1748) | interface IDXGISwapChainMedia
type DXGI_OVERLAY_SUPPORT_FLAG (line 1791) | typedef
type IDXGIOutput3Vtbl (line 1835) | typedef struct IDXGIOutput3Vtbl
function interface (line 1992) | interface IDXGIOutput3
FILE: external/D3D12/include/dxgi1_4.h
type interface (line 44) | typedef interface IDXGISwapChain3
type interface (line 51) | typedef interface IDXGIOutput4
type interface (line 58) | typedef interface IDXGIFactory4
type interface (line 65) | typedef interface IDXGIAdapter3
type DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG (line 84) | typedef
type IDXGISwapChain3Vtbl (line 144) | typedef struct IDXGISwapChain3Vtbl
function interface (line 382) | interface IDXGISwapChain3
type DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG (line 532) | typedef
type IDXGIOutput4Vtbl (line 573) | typedef struct IDXGIOutput4Vtbl
function interface (line 741) | interface IDXGIOutput4
type IDXGIFactory4Vtbl (line 880) | typedef struct IDXGIFactory4Vtbl
function interface (line 1080) | interface IDXGIFactory4
type DXGI_MEMORY_SEGMENT_GROUP (line 1194) | typedef
type DXGI_QUERY_VIDEO_MEMORY_INFO (line 1201) | typedef struct DXGI_QUERY_VIDEO_MEMORY_INFO
type IDXGIAdapter3Vtbl (line 1270) | typedef struct IDXGIAdapter3Vtbl
function interface (line 1390) | interface IDXGIAdapter3
FILE: external/D3D12/include/dxgitype.h
type DXGI_RGB (line 22) | typedef struct DXGI_RGB
type D3DCOLORVALUE (line 30) | typedef struct _D3DCOLORVALUE {
type D3DCOLORVALUE (line 40) | typedef D3DCOLORVALUE DXGI_RGBA;
type DXGI_GAMMA_CONTROL (line 42) | typedef struct DXGI_GAMMA_CONTROL
type DXGI_GAMMA_CONTROL_CAPABILITIES (line 49) | typedef struct DXGI_GAMMA_CONTROL_CAPABILITIES
type DXGI_RATIONAL (line 58) | typedef struct DXGI_RATIONAL
type DXGI_MODE_SCANLINE_ORDER (line 64) | typedef enum DXGI_MODE_SCANLINE_ORDER
type DXGI_MODE_SCALING (line 72) | typedef enum DXGI_MODE_SCALING
type DXGI_MODE_ROTATION (line 79) | typedef enum DXGI_MODE_ROTATION
type DXGI_MODE_DESC (line 88) | typedef struct DXGI_MODE_DESC
type DXGI_SAMPLE_DESC (line 102) | typedef struct DXGI_SAMPLE_DESC
type DXGI_COLOR_SPACE_TYPE (line 108) | typedef enum DXGI_COLOR_SPACE_TYPE
type DXGI_JPEG_DC_HUFFMAN_TABLE (line 131) | typedef struct DXGI_JPEG_DC_HUFFMAN_TABLE
type DXGI_JPEG_AC_HUFFMAN_TABLE (line 137) | typedef struct DXGI_JPEG_AC_HUFFMAN_TABLE
type DXGI_JPEG_QUANTIZATION_TABLE (line 143) | typedef struct DXGI_JPEG_QUANTIZATION_TABLE
FILE: external/D3D12/include/pix3.h
type PIXCaptureParameters (line 54) | typedef union PIXCaptureParameters
function HRESULT (line 92) | inline HRESULT PIXBeginCapture(DWORD, _In_opt_ const PIXCaptureParameter...
function HRESULT (line 93) | inline HRESULT PIXEndCapture(BOOL) { return S_OK; }
function DWORD (line 94) | inline DWORD PIXGetCaptureState() { return 0; }
function PIXReportCounter (line 95) | inline void PIXReportCounter(_In_ PCWSTR, float) {}
function PIXBeginEvent (line 97) | inline void PIXBeginEvent(UINT64, _In_ PCSTR, ...) {}
function PIXBeginEvent (line 98) | inline void PIXBeginEvent(UINT64, _In_ PCWSTR, ...) {}
function PIXBeginEvent (line 99) | inline void PIXBeginEvent(void*, UINT64, _In_ PCSTR, ...) {}
function PIXBeginEvent (line 100) | inline void PIXBeginEvent(void*, UINT64, _In_ PCWSTR, ...) {}
function PIXEndEvent (line 101) | inline void PIXEndEvent() {}
function PIXEndEvent (line 102) | inline void PIXEndEvent(void*) {}
function PIXSetMarker (line 103) | inline void PIXSetMarker(UINT64, _In_ PCSTR, ...) {}
function PIXSetMarker (line 104) | inline void PIXSetMarker(UINT64, _In_ PCWSTR, ...) {}
function PIXSetMarker (line 105) | inline void PIXSetMarker(void*, UINT64, _In_ PCSTR, ...) {}
function PIXSetMarker (line 106) | inline void PIXSetMarker(void*, UINT64, _In_ PCWSTR, ...) {}
function PIXScopedEvent (line 107) | inline void PIXScopedEvent(UINT64, _In_ PCSTR, ...) {}
function PIXScopedEvent (line 108) | inline void PIXScopedEvent(UINT64, _In_ PCWSTR, ...) {}
function PIXScopedEvent (line 109) | inline void PIXScopedEvent(void*, UINT64, _In_ PCSTR, ...) {}
function PIXScopedEvent (line 110) | inline void PIXScopedEvent(void*, UINT64, _In_ PCWSTR, ...) {}
function UINT (line 122) | inline UINT PIX_COLOR(BYTE r, BYTE g, BYTE b) { return 0xff000000 | (r <...
function UINT (line 123) | inline UINT PIX_COLOR_INDEX(BYTE i) { return i; }
FILE: external/D3D12/include/pix3_win.h
type PIXEventsBlockInfo (line 26) | struct PIXEventsBlockInfo
type PIXEventsThreadInfo (line 30) | struct PIXEventsThreadInfo
function UINT64 (line 50) | __forceinline UINT64 PIXGetTimestampCounter()
FILE: external/GFSDK_Aftermath_v1.21/include/GFSDK_Aftermath.h
type GFSDK_Aftermath_Version (line 59) | enum GFSDK_Aftermath_Version { GFSDK_Aftermath_Version_API = 0x00000121 }
type GFSDK_Aftermath_Result (line 61) | enum GFSDK_Aftermath_Result
type GFSDK_Aftermath_Context_Status (line 131) | enum GFSDK_Aftermath_Context_Status
type GFSDK_Aftermath_Status (line 152) | enum GFSDK_Aftermath_Status
function GFSDK_Aftermath_ContextData (line 177) | struct GFSDK_Aftermath_DLLSPEC GFSDK_Aftermath_ContextData
FILE: external/NvToolsExt/include/nvToolsExt.h
type nvtxRangeId_t (line 103) | typedef uint64_t nvtxRangeId_t;
type nvtxColorType_t (line 119) | typedef enum nvtxColorType_t
type nvtxPayloadType_t (line 128) | typedef enum nvtxPayloadType_t
type nvtxMessageType_t (line 139) | typedef enum nvtxMessageType_t
type nvtxEventAttributes_v1 (line 223) | typedef struct nvtxEventAttributes_v1
type nvtxEventAttributes_t (line 316) | typedef struct nvtxEventAttributes_v1 nvtxEventAttributes_t;
FILE: external/SDL2-2.0.4/include/SDL_assert.h
type SDL_AssertState (line 100) | typedef enum
type SDL_AssertData (line 109) | typedef struct SDL_AssertData
FILE: external/SDL2-2.0.4/include/SDL_atomic.h
type SDL_SpinLock (line 89) | typedef int SDL_SpinLock;
type SDL_atomic_t (line 189) | typedef struct { int value; } SDL_atomic_t;
FILE: external/SDL2-2.0.4/include/SDL_audio.h
type Uint16 (line 64) | typedef Uint16 SDL_AudioFormat;
type SDL_AudioSpec (line 168) | typedef struct SDL_AudioSpec
type SDL_AudioCVT (line 182) | struct SDL_AudioCVT
type SDL_AudioCVT (line 183) | struct SDL_AudioCVT
type SDL_AUDIOCVT_PACKED (line 200) | typedef struct SDL_AudioCVT
type Uint32 (line 303) | typedef Uint32 SDL_AudioDeviceID;
type SDL_AudioStatus (line 368) | typedef enum
FILE: external/SDL2-2.0.4/include/SDL_bits.h
function SDL_FORCE_INLINE (line 50) | SDL_FORCE_INLINE int
FILE: external/SDL2-2.0.4/include/SDL_blendmode.h
type SDL_BlendMode (line 40) | typedef enum
FILE: external/SDL2-2.0.4/include/SDL_egl.h
type khronos_int32_t (line 177) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 178) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 179) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 180) | typedef uint64_t khronos_uint64_t;
type khronos_int32_t (line 190) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 191) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 192) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 193) | typedef uint64_t khronos_uint64_t;
type __int32 (line 202) | typedef __int32 khronos_int32_t;
type khronos_uint32_t (line 203) | typedef unsigned __int32 khronos_uint32_t;
type __int64 (line 204) | typedef __int64 khronos_int64_t;
type khronos_uint64_t (line 205) | typedef unsigned __int64 khronos_uint64_t;
type khronos_int32_t (line 214) | typedef int khronos_int32_t;
type khronos_uint32_t (line 215) | typedef unsigned int khronos_uint32_t;
type khronos_int64_t (line 217) | typedef long int khronos_int64_t;
type khronos_uint64_t (line 218) | typedef unsigned long int khronos_uint64_t;
type khronos_int64_t (line 220) | typedef long long int khronos_int64_t;
type khronos_uint64_t (line 221) | typedef unsigned long long int khronos_uint64_t;
type khronos_int32_t (line 231) | typedef int khronos_int32_t;
type khronos_uint32_t (line 232) | typedef unsigned int khronos_uint32_t;
type khronos_int32_t (line 242) | typedef int32_t khronos_int32_t;
type khronos_uint32_t (line 243) | typedef uint32_t khronos_uint32_t;
type khronos_int64_t (line 244) | typedef int64_t khronos_int64_t;
type khronos_uint64_t (line 245) | typedef uint64_t khronos_uint64_t;
type khronos_int8_t (line 255) | typedef signed char khronos_int8_t;
type khronos_uint8_t (line 256) | typedef unsigned char khronos_uint8_t;
type khronos_int16_t (line 257) | typedef signed short int khronos_int16_t;
type khronos_uint16_t (line 258) | typedef unsigned short int khronos_uint16_t;
type khronos_intptr_t (line 266) | typedef signed long long int khronos_intptr_t;
type khronos_uintptr_t (line 267) | typedef unsigned long long int khronos_uintptr_t;
type khronos_ssize_t (line 268) | typedef signed long long int khronos_ssize_t;
type khronos_usize_t (line 269) | typedef unsigned long long int khronos_usize_t;
type khronos_intptr_t (line 271) | typedef signed long int khronos_intptr_t;
type khronos_uintptr_t (line 272) | typedef unsigned long int khronos_uintptr_t;
type khronos_ssize_t (line 273) | typedef signed long int khronos_ssize_t;
type khronos_usize_t (line 274) | typedef unsigned long int khronos_usize_t;
type khronos_float_t (line 281) | typedef float khronos_float_t;
type khronos_uint64_t (line 294) | typedef khronos_uint64_t khronos_utime_nanoseconds_t;
type khronos_int64_t (line 295) | typedef khronos_int64_t khronos_stime_nanoseconds_t;
type khronos_boolean_enum_t (line 311) | typedef enum {
type IUnknown (line 397) | typedef IUnknown * EGLNativeWindowType;
type IUnknown (line 398) | typedef IUnknown * EGLNativePixmapType;
type IUnknown (line 399) | typedef IUnknown * EGLNativeDisplayType;
type HDC (line 401) | typedef HDC EGLNativeDisplayType;
type HBITMAP (line 402) | typedef HBITMAP EGLNativePixmapType;
type HWND (line 403) | typedef HWND EGLNativeWindowType;
type EGLNativeDisplayType (line 408) | typedef int EGLNativeDisplayType;
type wl_display (line 414) | struct wl_display
type wl_egl_pixmap (line 415) | struct wl_egl_pixmap
type wl_egl_window (line 416) | struct wl_egl_window
type gbm_device (line 420) | struct gbm_device
type gbm_bo (line 421) | struct gbm_bo
type ANativeWindow (line 426) | struct ANativeWindow
type egl_native_pixmap_t (line 427) | struct egl_native_pixmap_t
type ANativeWindow (line 429) | struct ANativeWindow
type egl_native_pixmap_t (line 430) | struct egl_native_pixmap_t
type MirEGLNativeDisplayType (line 436) | typedef MirEGLNativeDisplayType EGLNativeDisplayType;
type MirEGLNativeWindowType (line 438) | typedef MirEGLNativeWindowType EGLNativeWindowType;
type khronos_uintptr_t (line 445) | typedef khronos_uintptr_t EGLNativePixmapType;
type khronos_uintptr_t (line 446) | typedef khronos_uintptr_t EGLNativeWindowType;
type Display (line 454) | typedef Display *EGLNativeDisplayType;
type Pixmap (line 455) | typedef Pixmap EGLNativePixmapType;
type Window (line 456) | typedef Window EGLNativeWindowType;
type EGLNativeDisplayType (line 465) | typedef EGLNativeDisplayType NativeDisplayType;
type EGLNativePixmapType (line 466) | typedef EGLNativePixmapType NativePixmapType;
type EGLNativeWindowType (line 467) | typedef EGLNativeWindowType NativeWindowType;
type khronos_int32_t (line 477) | typedef khronos_int32_t EGLint;
type EGLBoolean (line 534) | typedef unsigned int EGLBoolean;
type EGLenum (line 649) | typedef unsigned int EGLenum;
type EGLAttrib (line 719) | typedef intptr_t EGLAttrib;
type khronos_utime_nanoseconds_t (line 720) | typedef khronos_utime_nanoseconds_t EGLTime;
type EGLAttribKHR (line 846) | typedef intptr_t EGLAttribKHR;
type EGLAttribKHR (line 847) | typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay ...
type khronos_utime_nanoseconds_t (line 888) | typedef khronos_utime_nanoseconds_t EGLTimeKHR;
type khronos_uint64_t (line 1063) | typedef khronos_uint64_t EGLuint64KHR;
type EGLNativeFileDescriptorKHR (line 1110) | typedef int EGLNativeFileDescriptorKHR;
type khronos_ssize_t (line 1180) | typedef khronos_ssize_t EGLsizeiANDROID;
type EGLsizeiANDROID (line 1182) | typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsi...
type EGLAttrib (line 1342) | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDispl...
type EGLAttrib (line 1343) | typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDispla...
type const (line 1377) | typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLen...
type const (line 1378) | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPRO...
type const (line 1379) | typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPRO...
type EGLClientPixmapHI (line 1455) | struct EGLClientPixmapHI {
type EGLClientPixmapHI (line 1462) | struct EGLClientPixmapHI
type EGLClientPixmapHI (line 1464) | struct EGLClientPixmapHI
type khronos_utime_nanoseconds_t (line 1611) | typedef khronos_utime_nanoseconds_t EGLTimeNV;
type khronos_utime_nanoseconds_t (line 1645) | typedef khronos_utime_nanoseconds_t EGLuint64NV;
FILE: external/SDL2-2.0.4/include/SDL_endian.h
function SDL_FORCE_INLINE (line 70) | SDL_FORCE_INLINE Uint16
function SDL_FORCE_INLINE (line 77) | SDL_FORCE_INLINE Uint16
function SDL_FORCE_INLINE (line 84) | SDL_FORCE_INLINE Uint16
function SDL_FORCE_INLINE (line 93) | SDL_FORCE_INLINE Uint16
function SDL_FORCE_INLINE (line 100) | SDL_FORCE_INLINE Uint16
function SDL_FORCE_INLINE (line 108) | SDL_FORCE_INLINE Uint32
function SDL_FORCE_INLINE (line 1
Copy disabled (too large)
Download .json
Condensed preview — 700 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (28,127K chars).
[
{
"path": ".gitignore",
"chars": 80,
"preview": "# we do not store binary outputs in Flex\n\n# windows\n*.exp\n*.ilk\n\n# android\n*.apk"
},
{
"path": "LICENSE.txt",
"chars": 3601,
"preview": "Nvidia Source Code License (1-Way Commercial)\n\n1. Definitions\n\n“Licensor” means any person or entity that distributes it"
},
{
"path": "README.md",
"chars": 2766,
"preview": "NVIDIA Flex - 1.2.0\n===================\n\nFlex is a particle-based simulation library designed for real-time applications"
},
{
"path": "core/aabbtree.cpp",
"chars": 21241,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/aabbtree.h",
"chars": 5037,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/cloth.h",
"chars": 17891,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/convex.h",
"chars": 10614,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/core.cpp",
"chars": 1628,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/core.h",
"chars": 4062,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/extrude.cpp",
"chars": 4052,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/extrude.h",
"chars": 2004,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/mat22.h",
"chars": 5189,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/mat33.h",
"chars": 6220,
"preview": "// This code contain\ts NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software licens"
},
{
"path": "core/mat44.h",
"chars": 7453,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/maths.cpp",
"chars": 2304,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/maths.h",
"chars": 40901,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/matnn.h",
"chars": 6380,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/mesh.cpp",
"chars": 23119,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/mesh.h",
"chars": 3120,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/perlin.cpp",
"chars": 12275,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/perlin.h",
"chars": 2017,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/pfm.cpp",
"chars": 3577,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/pfm.h",
"chars": 1973,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/platform.cpp",
"chars": 6917,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/platform.h",
"chars": 5767,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/png.cpp",
"chars": 1032,
"preview": "#include \"png.h\"\n\n#include <iostream>\n\n#define STB_IMAGE_IMPLEMENTATION\n#include \"../external/stb_image/stb_image.h\"\n\n\nb"
},
{
"path": "core/png.h",
"chars": 406,
"preview": "#pragma once\n\n#include \"types.h\"\n\nstruct PngImage\n{\n\tuint16_t m_width;\n\tuint16_t m_height;\n\n\t// pixels are always assume"
},
{
"path": "core/point3.h",
"chars": 4076,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/quat.h",
"chars": 4957,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/sdf.cpp",
"chars": 8378,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/sdf.h",
"chars": 2082,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/tga.cpp",
"chars": 7342,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/tga.h",
"chars": 2240,
"preview": "\n// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software licens"
},
{
"path": "core/types.h",
"chars": 1664,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/vec2.h",
"chars": 5620,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/vec3.h",
"chars": 5653,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/vec4.h",
"chars": 4532,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/voxelize.cpp",
"chars": 3515,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "core/voxelize.h",
"chars": 1892,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "data/apple.obj",
"chars": 17311,
"preview": "####\n#\n# OBJ File Generated by Meshlab\n#\n####\n# Object apple.obj\n#\n# Vertices: 153\n# Faces: 300\n#\n####\nvn 0.768205 -5.10"
},
{
"path": "data/armadillo.ply",
"chars": 1384110,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 15002\nproperty float x\nproperty float y\nproperty float z\npr"
},
{
"path": "data/banana.obj",
"chars": 28935,
"preview": "####\n#\n# OBJ File Generated by Meshlab\n#\n####\n# Object banana.obj\n#\n# Vertices: 252\n# Faces: 500\n#\n####\nvn 0.437976 -3.8"
},
{
"path": "data/bowl.obj",
"chars": 49696,
"preview": "####\n#\n# OBJ File Generated by Meshlab\n#\n####\n# Object bowl.obj\n#\n# Vertices: 442\n# Faces: 800\n#\n####\nvn -0.803414 4.908"
},
{
"path": "data/bowl_high.ply",
"chars": 393995,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 6442\nproperty float x\nproperty float y\nproperty float z\nele"
},
{
"path": "data/box.ply",
"chars": 875,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 24\nproperty float x\nproperty float y\nproperty float z\nprope"
},
{
"path": "data/box_high.ply",
"chars": 92681,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 1734\nproperty float x\nproperty float y\nproperty float z\npro"
},
{
"path": "data/box_high_weld.ply",
"chars": 77194,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 1538\nproperty float x\nproperty float y\nproperty float z\nele"
},
{
"path": "data/box_ultra_high.ply",
"chars": 1535398,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 25350\nproperty float x\nproperty float y\nproperty float z\nel"
},
{
"path": "data/box_very_high.ply",
"chars": 347745,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 6534\nproperty float x\nproperty float y\nproperty float z\nele"
},
{
"path": "data/bunny.ply",
"chars": 234463,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 2503\nproperty float x\nproperty float y\nproperty float z\npro"
},
{
"path": "data/dragon.obj",
"chars": 3240234,
"preview": "####\n#\n# OBJ File Generated by Meshlab\n#\n####\n# Object dragon.obj\n#\n# Vertices: 22998\n# Faces: 47794\n#\n####\nvn 2.101906 "
},
{
"path": "data/froggy.tet",
"chars": 147930,
"preview": "# Tetrahedral mesh generated using TetraMaker (c) AGEIA\n\n# 189 vertices\nv 1225024.000000 -294580.375000 430784.468750\nv "
},
{
"path": "data/irregular_plane.obj",
"chars": 269631,
"preview": "# This file uses centimeters as units for non-parametric coordinates.\n\nv -0.500000 -0.000000 0.500000\nv -0.475000 -0.000"
},
{
"path": "data/lighthouse.ply",
"chars": 83676,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 2445\nproperty float x\nproperty float y\nproperty float z\nele"
},
{
"path": "data/nv_small.ply",
"chars": 59767,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 1062\nproperty float x\nproperty float y\nproperty float z\npro"
},
{
"path": "data/pear.obj",
"chars": 17036,
"preview": "####\n#\n# OBJ File Generated by Meshlab\n#\n####\n# Object pear.obj\n#\n# Vertices: 152\n# Faces: 300\n#\n####\nvn 1.392232 3.9695"
},
{
"path": "data/rocka.ply",
"chars": 19332,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 612\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/rockb.ply",
"chars": 15240,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 492\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/rockc.ply",
"chars": 8225,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 264\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/rockd.ply",
"chars": 8078,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 262\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/rocke.ply",
"chars": 11933,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 384\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/rockf.ply",
"chars": 6965,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 222\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/rope.obj",
"chars": 611088,
"preview": "# Asset ''\nmtllib F:\\sw\\physx\\research\\ParticleMeshEditor\\data\\rope.mtl\nv -0.99891597 -0.025108 0.011856\nv -0.98002398 -"
},
{
"path": "data/sandcastle.obj",
"chars": 35758,
"preview": "# This file uses centimeters as units for non-parametric coordinates.\n\nv 0.317019 0.000000 -0.103006\nv 0.269673 0.000000"
},
{
"path": "data/softs/octopus.obj",
"chars": 986761,
"preview": "# Asset ''\nmtllib F:\\sw\\physx\\research\\ParticleMeshEditor\\data\\octopus.mtl\nv 0.248180002 0.295316994 0.09578\nv 0.2800810"
},
{
"path": "data/sphere.ply",
"chars": 36731,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 642\nproperty float x\nproperty float y\nproperty float z\nelem"
},
{
"path": "data/sphere_high.ply",
"chars": 231493,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 2562\nproperty float x\nproperty float y\nproperty float z\npro"
},
{
"path": "data/teapot.ply",
"chars": 273215,
"preview": "ply\nformat ascii 1.0\ncomment VCGLIB generated\nelement vertex 3241\nproperty float x\nproperty float y\nproperty float z\npro"
},
{
"path": "data/torus.obj",
"chars": 57679,
"preview": "####\n#\n# OBJ File Generated by Meshlab\n#\n####\n# Object torus.obj\n#\n# Vertices: 400\n# Faces: 800\n#\n####\nmtllib ./torus.ob"
},
{
"path": "demo/benchmark.h",
"chars": 13483,
"preview": "// This code contains NVIDIA Confidential Information and is disclosed to you\n// under a form of NVIDIA software license"
},
{
"path": "demo/compiler/makelinux64/Makefile",
"chars": 2118,
"preview": "#!/usr/bin/make\n# Makefile generated by XPJ for linux64\n\nDEPSDIR = .deps\n#default defines\nOBJS_DIR = build\nRMDIR = "
},
{
"path": "demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk",
"chars": 16057,
"preview": "# Makefile generated by XPJ for linux64\n-include Makefile.custom\nProjectName = flexDemoCUDA\nflexDemoCUDA_cppfiles += ."
},
{
"path": "demo/compiler/makelinux64/Makefile.flexExtCUDA.mk",
"chars": 16520,
"preview": "# Makefile generated by XPJ for linux64\n-include Makefile.custom\nProjectName = flexExtCUDA\nflexExtCUDA_cppfiles += ./."
},
{
"path": "demo/compiler/vc12win32/flexDemoCUDA.sln",
"chars": 1693,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C"
},
{
"path": "demo/compiler/vc12win32/flexDemoCUDA.vcxproj",
"chars": 66072,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc12win32/flexDemoCUDA.vcxproj.filters",
"chars": 23888,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win32/flexDemoCUDA.vcxproj.user",
"chars": 496,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win32/flexDemoD3D.sln",
"chars": 1689,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C"
},
{
"path": "demo/compiler/vc12win32/flexDemoD3D.vcxproj",
"chars": 65435,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc12win32/flexDemoD3D.vcxproj.filters",
"chars": 23092,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win32/flexDemoD3D.vcxproj.user",
"chars": 496,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win64/flexDemoCUDA.sln",
"chars": 1653,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C"
},
{
"path": "demo/compiler/vc12win64/flexDemoCUDA.vcxproj",
"chars": 65268,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc12win64/flexDemoCUDA.vcxproj.filters",
"chars": 23888,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win64/flexDemoCUDA.vcxproj.user",
"chars": 492,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win64/flexDemoD3D.sln",
"chars": 1649,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 2013\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C"
},
{
"path": "demo/compiler/vc12win64/flexDemoD3D.vcxproj",
"chars": 64611,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"12.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc12win64/flexDemoD3D.vcxproj.filters",
"chars": 23092,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc12win64/flexDemoD3D.vcxproj.user",
"chars": 492,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc14win32/flexDemoD3D.sln",
"chars": 1687,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91"
},
{
"path": "demo/compiler/vc14win32/flexDemoD3D.vcxproj",
"chars": 65511,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc14win32/flexDemoD3D.vcxproj.filters",
"chars": 23092,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc14win32/flexDemoD3D.vcxproj.user",
"chars": 496,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc14win64/flexDemoCUDA.sln",
"chars": 1651,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91"
},
{
"path": "demo/compiler/vc14win64/flexDemoCUDA.vcxproj",
"chars": 65268,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc14win64/flexDemoCUDA.vcxproj.filters",
"chars": 23888,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc14win64/flexDemoCUDA.vcxproj.user",
"chars": 492,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc14win64/flexDemoD3D.sln",
"chars": 1647,
"preview": "Microsoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nProject(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91"
},
{
"path": "demo/compiler/vc14win64/flexDemoD3D.vcxproj",
"chars": 64687,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microso"
},
{
"path": "demo/compiler/vc14win64/flexDemoD3D.vcxproj.filters",
"chars": 23092,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/compiler/vc14win64/flexDemoD3D.vcxproj.user",
"chars": 492,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\r\n<Project ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbui"
},
{
"path": "demo/d3d/appGraphCtx.h",
"chars": 1762,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/appGraphCtxLoader.cpp",
"chars": 2952,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/imguiGraph.cpp",
"chars": 11225,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/imguiGraph.h",
"chars": 1977,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/imguiGraphLoader.cpp",
"chars": 3206,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/loader.cpp",
"chars": 655,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/loader.h",
"chars": 740,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/loaderMacros.h",
"chars": 3113,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/renderParamsD3D.cpp",
"chars": 7020,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/renderParamsD3D.h",
"chars": 4813,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d/shaderCommonD3D.h",
"chars": 356,
"preview": "#ifndef SHADER_COMMON_D3D_H\n#define SHADER_COMMON_D3D_H\n\n#include <DirectXMath.h>\n\nstruct ShadowMap;\n\nnamespace Hlsl { \n"
},
{
"path": "demo/d3d/shaders/blurDepthPS.hlsl",
"chars": 2260,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\nTexture2D<float> depthTex : "
},
{
"path": "demo/d3d/shaders/compositePS.hlsl",
"chars": 6163,
"preview": "#include \"shaderCommon.h\"\n\n#define ENABLE_SIMPLE_FLUID 1\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n}"
},
{
"path": "demo/d3d/shaders/debugLinePS.hlsl",
"chars": 143,
"preview": "struct Input\n{\n\tfloat4 position : SV_POSITION;\n\tfloat4 color : COLOR;\n};\n\nfloat4 debugLinePS(Input input) : SV_TARGET\n{\n"
},
{
"path": "demo/d3d/shaders/debugLineVS.hlsl",
"chars": 388,
"preview": "\ncbuffer params : register(b0)\n{\n\tfloat4x4 projectionViewWorld;\n};\n\nstruct Input\n{\n\tfloat3 position : POSITION;\n\tfloat4"
},
{
"path": "demo/d3d/shaders/diffuseGS.hlsl",
"chars": 2263,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tDiffuseShaderConst gParams;\n};\n\nstatic const float2 corner"
},
{
"path": "demo/d3d/shaders/diffusePS.hlsl",
"chars": 688,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tDiffuseShaderConst gParams;\n};\n\nfloat sqr(float x) { retur"
},
{
"path": "demo/d3d/shaders/diffuseVS.hlsl",
"chars": 642,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tDiffuseShaderConst gParams;\n};\n\nDiffuseVertexOut diffuseVS"
},
{
"path": "demo/d3d/shaders/ellipsoidDepthGS.hlsl",
"chars": 1512,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\nstatic const float2 corners["
},
{
"path": "demo/d3d/shaders/ellipsoidDepthPS.hlsl",
"chars": 2005,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\nfloat Sign(float x) { return"
},
{
"path": "demo/d3d/shaders/ellipsoidDepthVS.hlsl",
"chars": 3022,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\n// returns 1.0 for x==0.0 (u"
},
{
"path": "demo/d3d/shaders/imguiPS.hlsl",
"chars": 370,
"preview": "\nstruct Input\n{\n\tfloat4 position : SV_POSITION;\n\tfloat2 texCoord : TEXCOORD;\n\tfloat4 color : COLOR;\n};\n\nTexture2D<float>"
},
{
"path": "demo/d3d/shaders/imguiVS.hlsl",
"chars": 548,
"preview": "\ncbuffer params : register(b0)\n{\n\tfloat4x4 transform;\n};\n\nstruct Input\n{\n\tfloat2 position : POSITION;\n\tfloat2 texCoord :"
},
{
"path": "demo/d3d/shaders/meshAsyncComputeBenchPS.hlsl",
"chars": 69,
"preview": "#define FLX_ASYNC_COMPUTE_BENCHMARK_ENABLE 1\n\n#include \"meshPS.hlsl\"\n"
},
{
"path": "demo/d3d/shaders/meshPS.hlsl",
"chars": 3361,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tMeshShaderConst gParams;\n};\n\nTexture2D<float> shadowTextur"
},
{
"path": "demo/d3d/shaders/meshShadowPS.hlsl",
"chars": 138,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tMeshShaderConst gParams;\n};\n\n\nvoid meshPS_Shadow(MeshVerte"
},
{
"path": "demo/d3d/shaders/meshVS.hlsl",
"chars": 1256,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tMeshShaderConst gParams;\n};\n\nMeshVertexOut meshVS(MeshVert"
},
{
"path": "demo/d3d/shaders/passThroughVS.hlsl",
"chars": 281,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\nPassthroughVertexOut passThr"
},
{
"path": "demo/d3d/shaders/pointGS.hlsl",
"chars": 2251,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tPointShaderConst gParams;\n};\n\nstatic const float2 corners["
},
{
"path": "demo/d3d/shaders/pointPS.hlsl",
"chars": 2170,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tPointShaderConst gParams;\n};\n\nTexture2D<float> shadowTextu"
},
{
"path": "demo/d3d/shaders/pointShadowPS.hlsl",
"chars": 348,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tPointShaderConst gParams;\n};\n\nvoid pointShadowPS(PointGeoO"
},
{
"path": "demo/d3d/shaders/pointThicknessGS.hlsl",
"chars": 1654,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\nstatic const float2 corners["
},
{
"path": "demo/d3d/shaders/pointThicknessPS.hlsl",
"chars": 672,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams;\n};\n\nfloat4 pointThicknessPS(Flui"
},
{
"path": "demo/d3d/shaders/pointThicknessVS.hlsl",
"chars": 547,
"preview": "#include \"shaderCommon.h\"\n\n#pragma warning (disable : 3578)\n\ncbuffer constBuf : register(b0)\n{\n\tFluidShaderConst gParams"
},
{
"path": "demo/d3d/shaders/pointVS.hlsl",
"chars": 600,
"preview": "#include \"shaderCommon.h\"\n\ncbuffer constBuf : register(b0)\n{\n\tPointShaderConst gParams;\n};\n\nPointVertexOut pointVS(Point"
},
{
"path": "demo/d3d/shaders/shaderCommon.h",
"chars": 4743,
"preview": "struct MeshShaderConst\n{\n\tfloat4x4 modelViewProjection;\n\tfloat4x4 modelView;\n\tfloat4x4 objectTransform;\n\tfloat4x4 lightT"
},
{
"path": "demo/d3d11/appD3D11Ctx.cpp",
"chars": 19259,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/appD3D11Ctx.h",
"chars": 2695,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/debugLineRenderD3D11.cpp",
"chars": 5510,
"preview": "/*\n* Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d11/debugLineRenderD3D11.h",
"chars": 914,
"preview": "#pragma once\n\n#include <vector>\n#include \"core/maths.h\"\n\n#include <wrl.h>\nusing namespace Microsoft::WRL;\n\nstruct DebugL"
},
{
"path": "demo/d3d11/demoContextD3D11.cpp",
"chars": 37298,
"preview": "#include \"core/maths.h\"\n#include \"core/extrude.h\"\n\n#include \"shaders.h\"\n\n#include \"meshRenderD3D11.h\"\n#include \"pointRen"
},
{
"path": "demo/d3d11/demoContextD3D11.h",
"chars": 5764,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/diffuseRenderD3D11.cpp",
"chars": 5964,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/diffuseRenderD3D11.h",
"chars": 1887,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/fluidRenderD3D11.cpp",
"chars": 15248,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/fluidRenderD3D11.h",
"chars": 3189,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/imguiGraphD3D11.cpp",
"chars": 11748,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/imguiGraphD3D11.h",
"chars": 2144,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/imguiInteropD3D11.cpp",
"chars": 1612,
"preview": "/*\n* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d11/meshRenderD3D11.cpp",
"chars": 10074,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/meshRenderD3D11.h",
"chars": 2134,
"preview": "\n/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors ret"
},
{
"path": "demo/d3d11/pointRenderD3D11.cpp",
"chars": 5565,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/pointRenderD3D11.h",
"chars": 1330,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/renderTargetD3D11.cpp",
"chars": 4952,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/renderTargetD3D11.h",
"chars": 1406,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/shadowMapD3D11.cpp",
"chars": 5344,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d11/shadowMapD3D11.h",
"chars": 1495,
"preview": "/*\n * Copyright (c) 2008-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d12/NvCoDx12CircularResourceHeap.cpp",
"chars": 5264,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12CircularResourceHeap.h",
"chars": 9847,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12CounterFence.cpp",
"chars": 2122,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12CounterFence.h",
"chars": 2898,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12DescriptorHeap.cpp",
"chars": 1671,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12DescriptorHeap.h",
"chars": 4326,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12Handle.h",
"chars": 5457,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12HelperUtil.cpp",
"chars": 2965,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12HelperUtil.h",
"chars": 1786,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12RenderTarget.cpp",
"chars": 10719,
"preview": "\n#include \"NvCoDx12RenderTarget.h\"\n#include \"appD3D12Ctx.h\"\n\n#include <external/D3D12/include/d3dx12.h>\n\nnamespace nvidi"
},
{
"path": "demo/d3d12/NvCoDx12RenderTarget.h",
"chars": 4123,
"preview": "#ifndef NV_CO_DX12_RENDER_TARGET_H\n#define NV_CO_DX12_RENDER_TARGET_H\n\n#include <DirectXMath.h>\n#include <NvCoDx12Descri"
},
{
"path": "demo/d3d12/NvCoDx12Resource.cpp",
"chars": 4144,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12Resource.h",
"chars": 4909,
"preview": "#ifndef NV_CO_DX12_RESOURCE_H\n#define NV_CO_DX12_RESOURCE_H\n\n#include <NvResult.h>\n#include <NvCoDxFormatUtil.h>\n\n#defin"
},
{
"path": "demo/d3d12/NvCoDx12ResourceScopeManager.cpp",
"chars": 5402,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDx12ResourceScopeManager.h",
"chars": 4195,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDxDebugUtil.cpp",
"chars": 986,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDxDebugUtil.h",
"chars": 873,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDxFormatUtil.cpp",
"chars": 4545,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoDxFormatUtil.h",
"chars": 1274,
"preview": "#ifndef NV_CO_DX_FORMAT_UTIL_H\n#define NV_CO_DX_FORMAT_UTIL_H\n\n#define NOMINMAX\n#include <dxgi.h>\n\nnamespace nvidia { \nn"
},
{
"path": "demo/d3d12/NvCoFreeList.cpp",
"chars": 4842,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvCoFreeList.h",
"chars": 4930,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/NvResult.h",
"chars": 6081,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/appD3D12Ctx.cpp",
"chars": 34120,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d12/appD3D12Ctx.h",
"chars": 6140,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d12/bufferD3D12.cpp",
"chars": 3979,
"preview": "/* Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved.\n* NVIDIA CORPORATION and its licensors retain all intel"
},
{
"path": "demo/d3d12/bufferD3D12.h",
"chars": 995,
"preview": "#ifndef BUFFER_D3D12_H\n#define BUFFER_D3D12_H\n\n#include <NvCoDx12Resource.h>\n\n#include \"renderStateD3D12.h\"\n\n#define NOM"
},
{
"path": "demo/d3d12/demoContextD3D12.cpp",
"chars": 48480,
"preview": "// to fix min max windows macros\n#define NOMINMAX\n\n#include \"meshRendererD3D12.h\"\n\n// Pipelines\n\n#include \"meshRenderPip"
},
{
"path": "demo/d3d12/demoContextD3D12.h",
"chars": 10226,
"preview": "/*\n* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d12/diffusePointRenderPipelineD3D12.cpp",
"chars": 7306,
"preview": "#define NOMINMAX\n\n#include <NvCoDx12HelperUtil.h>\n\n#include <external/D3D12/include/d3dx12.h>\n\n#include \"pipelineUtilD3D"
},
{
"path": "demo/d3d12/diffusePointRenderPipelineD3D12.h",
"chars": 1863,
"preview": "/*\n* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d12/fluidCompositeRenderPipelineD3D12.cpp",
"chars": 5522,
"preview": "#define NOMINMAX\n\n#include <NvCoDx12HelperUtil.h>\n#include <external/D3D12/include/d3dx12.h>\n\n#include \"pipelineUtilD3D1"
},
{
"path": "demo/d3d12/fluidCompositeRenderPipelineD3D12.h",
"chars": 1648,
"preview": "/*\n* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d12/fluidEllipsoidRenderPipelineD3D12.cpp",
"chars": 6132,
"preview": "#define NOMINMAX\n\n#include <NvCoDx12HelperUtil.h>\n\n#include <external/D3D12/include/d3dx12.h>\n\n#include \"pipelineUtilD3D"
},
{
"path": "demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h",
"chars": 1979,
"preview": "/*\n* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d12/fluidSmoothRenderPipelineD3D12.cpp",
"chars": 5599,
"preview": "#define NOMINMAX\n\n#include <NvCoDx12HelperUtil.h>\n#include <external/D3D12/include/d3dx12.h>\n\n#include \"meshRenderer.h\"\n"
},
{
"path": "demo/d3d12/fluidSmoothRenderPipelineD3D12.h",
"chars": 1733,
"preview": "/*\n* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d12/fluidThicknessRenderPipelineD3D12.cpp",
"chars": 6132,
"preview": "#define NOMINMAX\n\n#include <NvCoDx12HelperUtil.h>\n\n#include <external/D3D12/include/d3dx12.h>\n\n#include \"pipelineUtilD3D"
},
{
"path": "demo/d3d12/fluidThicknessRenderPipelineD3D12.h",
"chars": 1979,
"preview": "/*\n* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved.\n*\n* NVIDIA CORPORATION and its licensors retain "
},
{
"path": "demo/d3d12/imguiGraphD3D12.cpp",
"chars": 19144,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d12/imguiGraphD3D12.h",
"chars": 2621,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d12/imguiInteropD3D12.cpp",
"chars": 1828,
"preview": "/*\n * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.\n *\n * NVIDIA CORPORATION and its licensors reta"
},
{
"path": "demo/d3d12/lineRenderPipelineD3D12.cpp",
"chars": 4757,
"preview": "#define NOMINMAX\n\n#include <NvCoDx12HelperUtil.h>\n#include <external/D3D12/include/d3dx12.h>\n\n#include \"pipelineUtilD3D1"
}
]
// ... and 500 more files (download for full content)
About this extraction
This page contains the full source code of the NVIDIAGameWorks/FleX GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 700 files (154.7 MB), approximately 6.8M tokens, and a symbol index with 4242 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.