diff options
| author | Marijn Tamis <[email protected]> | 2017-07-31 13:52:20 +0200 |
|---|---|---|
| committer | Marijn Tamis <[email protected]> | 2017-07-31 13:52:20 +0200 |
| commit | 223aff8b3f73bb786dce5c67b83ff55208d43969 (patch) | |
| tree | 2e3e2760cb49afbf8d9379e23e27d175bbba27aa /NvCloth | |
| parent | Remove unused copy of PxShared. (diff) | |
| download | nvcloth-1.1.2.tar.xz nvcloth-1.1.2.zip | |
NvCloth 1.1.2 Release. (22576033)v1.1.2
Diffstat (limited to 'NvCloth')
43 files changed, 652 insertions, 359 deletions
diff --git a/NvCloth/CmakeGenerateProjects.bat b/NvCloth/CmakeGenerateProjects.bat index fe50f54..36bddde 100644 --- a/NvCloth/CmakeGenerateProjects.bat +++ b/NvCloth/CmakeGenerateProjects.bat @@ -26,6 +26,7 @@ IF NOT DEFINED GW_DEPS_ROOT GOTO GW_DEPS_ROOT_UNDEFINED set PX_OUTPUT_ROOT=%~dp0 REM Generate projects here +REM you can disable cuda/dx11 support by adding -DNV_CLOTH_ENABLE_CUDA=0 / -DNV_CLOTH_ENABLE_DX11=0 rmdir /s /q compiler\vc11win32-cmake\ mkdir compiler\vc11win32-cmake\ diff --git a/NvCloth/GenerateProjectsLinux.sh b/NvCloth/GenerateProjectsLinux.sh index 56d1788..b56176b 100644 --- a/NvCloth/GenerateProjectsLinux.sh +++ b/NvCloth/GenerateProjectsLinux.sh @@ -19,23 +19,23 @@ export PX_OUTPUT_ROOT="$PWD" rm -r -f compiler/linux64-debug-cmake/ mkdir compiler/linux64-debug-cmake/ cd compiler/linux64-debug-cmake/ -cmake ../cmake/Linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=debug -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake +cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=debug -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake cd ../../ rm -r -f compiler/linux64-checked-cmake/ mkdir compiler/linux64-checked-cmake/ cd compiler/linux64-checked-cmake/ -cmake ../cmake/Linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=checked -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake +cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=checked -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake cd ../../ rm -r -f compiler/linux64-profile-cmake/ mkdir compiler/linux64-profile-cmake/ cd compiler/linux64-profile-cmake/ -cmake ../cmake/Linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=profile -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake +cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=profile -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake cd ../../ rm -r -f compiler/linux64-release-cmake/ mkdir compiler/linux64-release-cmake/ cd compiler/linux64-release-cmake/ -cmake ../cmake/Linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=release -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake +cmake ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=release -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/linux64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/linux64-cmake cd ../../
\ No newline at end of file diff --git a/NvCloth/GenerateProjectsOsx.sh b/NvCloth/GenerateProjectsOsx.sh index 5c57f42..576ad2c 100644 --- a/NvCloth/GenerateProjectsOsx.sh +++ b/NvCloth/GenerateProjectsOsx.sh @@ -19,13 +19,13 @@ export PX_OUTPUT_ROOT="$PWD" rm -r -f compiler/osx32-cmake/ mkdir compiler/osx32-cmake/ cd compiler/osx32-cmake/ -cmake ../cmake/Mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DPX_32BIT=1 -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/Lib/osx32-cmake +cmake ../cmake/mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DPX_32BIT=1 -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/Lib/osx32-cmake cd ../../ rm -r -f compiler/osx64-cmake/ mkdir compiler/osx64-cmake/ cd compiler/osx64-cmake/ -cmake ../cmake/Mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/Lib/osx64-cmake +cmake ../cmake/mac -G Xcode -DTARGET_BUILD_PLATFORM=mac -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/Lib/osx64-cmake cd ../../ diff --git a/NvCloth/ReleaseNotes.txt b/NvCloth/ReleaseNotes.txt index 7dfa9c0..d8ef679 100644 --- a/NvCloth/ReleaseNotes.txt +++ b/NvCloth/ReleaseNotes.txt @@ -1,6 +1,6 @@ NvCloth Release notes. -[1.1.1] +[1.1.2] Supported platforms: * Windows (CPU, CUDA, DX11) * Mac (beta, tested on Sierra) @@ -17,6 +17,19 @@ Supported compilers (via cmake 3.7) * Xbox one: Visual studio 14 (2015) Fixed: +Dynamic allocations at runtime removed from MovingAverage. +Possible error when starting samples due to gpu incompatible with dx debug mode. +Cuda crash on older hardware. + +New: +Added cmake flags to disable dx11 and/or cuda support. + +Known issues: +DirectX 11 solver has issues with ccd sphere/capsule collision. + + +[1.1.1] +Fixed: Air drag/lift did react to flow speed only linearly, model was changed to be more physically correct. Fixed issue where scaling units would result in different air drag/lift behavior (by adding fluid density parameter). Fixed "unused typedef `__t100`" warning in xcode. diff --git a/NvCloth/compiler/cmake/Linux/CMakeLists.txt b/NvCloth/compiler/cmake/Linux/CMakeLists.txt index 9425dde..d6c8db6 100644 --- a/NvCloth/compiler/cmake/Linux/CMakeLists.txt +++ b/NvCloth/compiler/cmake/Linux/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 3.3) -MESSAGE("[NvCloth]cmake/Linux/CMakeList.txt") +MESSAGE("[NvCloth]cmake/linux/CMakeList.txt") include(../common/CMakeLists.txt) -IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to Linux +IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to linux SET(TARGET_BUILD_PLATFORM "linux") ENDIF() @@ -33,7 +33,7 @@ SET(CMAKE_CXX_FLAGS_RELEASE "-std=c++11 -O3 -g") # Controls PX_NVTX for all projects on linux SET(PHYSX_LINUX_ENABLE_NVTX 0) -# Disable cuda and dx for all projects on Linux +# Disable cuda and dx for all projects on linux SET(PHYSX_LINUX_COMPILE_DEFS DISABLE_COMPUTE_PHYSX) SET(PHYSX_LINUX_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=${PHYSX_MAC_ENABLE_NVTX};PX_SUPPORT_PVD=0) SET(PHYSX_LINUX_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1;PX_NVTX=${PHYSX_MAC_ENABLE_NVTX};PX_SUPPORT_PVD=0) diff --git a/NvCloth/compiler/cmake/Linux/NvCloth.cmake b/NvCloth/compiler/cmake/Linux/NvCloth.cmake index f1b19d0..19038c6 100644 --- a/NvCloth/compiler/cmake/Linux/NvCloth.cmake +++ b/NvCloth/compiler/cmake/Linux/NvCloth.cmake @@ -2,7 +2,7 @@ # Build NvCloth (PROJECT not SOLUTION) # -MESSAGE("[NvCloth]cmake/Linux/NvCloth.cmake") +MESSAGE("[NvCloth]cmake/linux/NvCloth.cmake") SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT}) FIND_PACKAGE(PxShared REQUIRED) @@ -56,4 +56,4 @@ SET_TARGET_PROPERTIES(NvCloth PROPERTIES # enable -fPIC so we can link static libs with the editor SET_TARGET_PROPERTIES(NvCloth PROPERTIES POSITION_INDEPENDENT_CODE TRUE) -MESSAGE("[NvCloth]cmake/Linux/NvCloth.cmake END")
\ No newline at end of file +MESSAGE("[NvCloth]cmake/linux/NvCloth.cmake END")
\ No newline at end of file diff --git a/NvCloth/compiler/cmake/Mac/CMakeLists.txt b/NvCloth/compiler/cmake/Mac/CMakeLists.txt index 4e1c124..b99d60e 100644 --- a/NvCloth/compiler/cmake/Mac/CMakeLists.txt +++ b/NvCloth/compiler/cmake/Mac/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 3.3) -MESSAGE("[NvCloth]cmake/Mac/CMakeList.txt") +MESSAGE("[NvCloth]cmake/mac/CMakeList.txt") include(../common/CMakeLists.txt) -IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to Mac +IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to mac SET(TARGET_BUILD_PLATFORM "mac") ENDIF() @@ -32,10 +32,10 @@ SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.9") #set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym") -# Controls PX_NVTX for all projects on Mac +# Controls PX_NVTX for all projects on mac SET(PHYSX_MAC_ENABLE_NVTX 0) -# Disable cuda and dx for all projects on Mac +# Disable cuda and dx for all projects on mac SET(PHYSX_MAC_COMPILE_DEFS DISABLE_COMPUTE_PHYSX) SET(PHYSX_MAC_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=${PHYSX_MAC_ENABLE_NVTX};PX_SUPPORT_PVD=0) SET(PHYSX_MAC_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1;PX_NVTX=${PHYSX_MAC_ENABLE_NVTX};PX_SUPPORT_PVD=0) @@ -49,7 +49,7 @@ FIND_PACKAGE(PxShared REQUIRED) # such as - we don't want to be installing any built artifacts on this server, etc. So for now we hack it. # Add PxShared as a dependency so that we can use project references -ADD_SUBDIRECTORY(${PXSHARED_ROOT_DIR}/src/compiler/cmake/Mac "${CMAKE_CURRENT_BINARY_DIR}/pxshared_bin") +ADD_SUBDIRECTORY(${PXSHARED_ROOT_DIR}/src/compiler/cmake/mac "${CMAKE_CURRENT_BINARY_DIR}/pxshared_bin") # Include all of the projects INCLUDE(NvCloth.cmake) diff --git a/NvCloth/compiler/cmake/Mac/NvCloth.cmake b/NvCloth/compiler/cmake/Mac/NvCloth.cmake index fc10992..faea6fd 100644 --- a/NvCloth/compiler/cmake/Mac/NvCloth.cmake +++ b/NvCloth/compiler/cmake/Mac/NvCloth.cmake @@ -2,7 +2,7 @@ # Build NvCloth (PROJECT not SOLUTION) # -MESSAGE("[NvCloth]cmake/Mac/NvCloth.cmake") +MESSAGE("[NvCloth]cmake/mac/NvCloth.cmake") SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT}) FIND_PACKAGE(PxShared REQUIRED) @@ -56,4 +56,4 @@ SET_TARGET_PROPERTIES(NvCloth PROPERTIES # enable -fPIC so we can link static libs with the editor SET_TARGET_PROPERTIES(NvCloth PROPERTIES POSITION_INDEPENDENT_CODE TRUE) -MESSAGE("[NvCloth]cmake/Mac/NvCloth.cmake END")
\ No newline at end of file +MESSAGE("[NvCloth]cmake/mac/NvCloth.cmake END")
\ No newline at end of file diff --git a/NvCloth/compiler/cmake/windows/CMakeLists.txt b/NvCloth/compiler/cmake/windows/CMakeLists.txt index 81d8289..9e8f66b 100644 --- a/NvCloth/compiler/cmake/windows/CMakeLists.txt +++ b/NvCloth/compiler/cmake/windows/CMakeLists.txt @@ -49,12 +49,7 @@ ENDIF(CMAKE_CL_64) # Controls PX_NVTX for all projects on windows SET(PHYSX_WINDOWS_ENABLE_NVTX 0) -IF(DEFINED PX_GENERATE_GPU_PROJECTS) SET(NVCLOTH_WINDOWS_COMPILE_DEFS WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS) -ELSE() -# Disable cuda and dx for all projects on windows -SET(NVCLOTH_WINDOWS_COMPILE_DEFS DISABLE_COMPUTE_PHYSX;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS) -ENDIF() SET(NVCLOTH_WINDOWS_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=${PHYSX_WINDOWS_ENABLE_NVTX};) SET(NVCLOTH_WINDOWS_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1;PX_NVTX=${PHYSX_WINDOWS_ENABLE_NVTX};) SET(NVCLOTH_WINDOWS_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1;PX_NVTX=${PHYSX_WINDOWS_ENABLE_NVTX};) diff --git a/NvCloth/compiler/cmake/windows/NvCloth.cmake b/NvCloth/compiler/cmake/windows/NvCloth.cmake index c71c974..a867a75 100644 --- a/NvCloth/compiler/cmake/windows/NvCloth.cmake +++ b/NvCloth/compiler/cmake/windows/NvCloth.cmake @@ -4,15 +4,26 @@ MESSAGE("[NvCloth]cmake/windows/NvCloth.cmake") +IF(NOT DEFINED NV_CLOTH_ENABLE_CUDA) +SET(NV_CLOTH_ENABLE_CUDA 1) +ENDIF() +IF(NOT DEFINED NV_CLOTH_ENABLE_DX11) +SET(NV_CLOTH_ENABLE_DX11 1) +ENDIF() + SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT}) -#FIND_PACKAGE(PxShared REQUIRED) +IF(${NV_CLOTH_ENABLE_CUDA}) FIND_PACKAGE(CUDA 8 REQUIRED) MESSAGE("Found CUDA:" ${CUDA_INCLUDE_DIRS}) +ENDIF() SET(NVCLOTH_PLATFORM_INCLUDES PRIVATE ${CUDA_INCLUDE_DIRS}) -SET(NVCLOTH_PLATFORM_SOURCE_FILES + +SET(NVCLOTH_PLATFORM_SOURCE_FILES "" ) +IF(${NV_CLOTH_ENABLE_CUDA}) +LIST(APPEND NVCLOTH_PLATFORM_SOURCE_FILES ${PROJECT_ROOT_DIR}/src/cuda/CuCheckSuccess.h ${PROJECT_ROOT_DIR}/src/cuda/CuCloth.cpp ${PROJECT_ROOT_DIR}/src/cuda/CuCloth.h @@ -33,9 +44,14 @@ SET(NVCLOTH_PLATFORM_SOURCE_FILES ${PROJECT_ROOT_DIR}/src/cuda/CuSelfCollision.h ${PROJECT_ROOT_DIR}/src/cuda/CuSolver.cpp ${PROJECT_ROOT_DIR}/src/cuda/CuSolver.h - ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernel.h ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernelBlob.h +) +ENDIF() + +IF(${NV_CLOTH_ENABLE_DX11}) +LIST(APPEND NVCLOTH_PLATFORM_SOURCE_FILES + ${PROJECT_ROOT_DIR}/src/dx/DxBatchedVector.h ${PROJECT_ROOT_DIR}/src/dx/DxCheckSuccess.h ${PROJECT_ROOT_DIR}/src/dx/DxCloth.cpp @@ -60,6 +76,7 @@ SET(NVCLOTH_PLATFORM_SOURCE_FILES #${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp #${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h ) +ENDIF() SET(NVCLOTH_AVX_SOURCE_FILES ${PROJECT_ROOT_DIR}/src/avx/SwSolveConstraints.cpp @@ -69,16 +86,25 @@ set_source_files_properties(${NVCLOTH_AVX_SOURCE_FILES} PROPERTIES COMPILE_FLAGS - +SET(NVCLOTH_HLSL_FILES "") +IF(${NV_CLOTH_ENABLE_DX11}) SET(NVCLOTH_HLSL_FILES ${PROJECT_ROOT_DIR}/src/dx/DxSolverKernel.hlsl ) set_source_files_properties(${NVCLOTH_HLSL_FILES} PROPERTIES VS_SHADER_TYPE Compute VS_SHADER_MODEL 5.0 VS_SHADER_FLAGS "/Vn gDxSolverKernel /Fh ${PROJECT_ROOT_DIR}/src/dx/DxSolverKernelBlob.h") +ENDIF() + SET(NVCLOTH_PLATFORM_SOURCE_FILES ${NVCLOTH_PLATFORM_SOURCE_FILES} ${NVCLOTH_HLSL_FILES} ${NVCLOTH_AVX_SOURCE_FILES}) +IF(${NV_CLOTH_ENABLE_CUDA}) set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; + + # Options are documented on http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#command-option-types-and-notation + # Important: to be able to debug CUDA kernel (correct stepping and workable warp watches), + # you should add the -G (short for --device-debug) option to the line below. + # Don't forget to remove it afterwards, since the code execution will be very slow with this flag. -use_fast_math -ftz=true -prec-div=false -prec-sqrt=false -lineinfo -gencode arch=compute_20,code=sm_20 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=sm_50 -gencode arch=compute_50,code=compute_50 -D_USE_MATH_DEFINES -DNDEBUG -DPX_PROFILE=1 ) SET(NVCLOTH_CUDA_FILES @@ -99,20 +125,35 @@ COMMAND ${CUDA_TOOLKIT_ROOT_DIR}/bin/bin2c.exe --name kCuSolverKernel ${CUDA_FAT DEPENDS ${CUDA_FATBIN} VERBATIM ) +ENDIF() SET(NVCLOTH_COMPILE_DEFS NV_CLOTH_IMPORT=PX_DLL_EXPORT - NV_CLOTH_ENABLE_DX11=1 - NV_CLOTH_ENABLE_CUDA=1 $<$<CONFIG:debug>:${NVCLOTH_WINDOWS_DEBUG_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=DEBUG;> $<$<CONFIG:checked>:${NVCLOTH_WINDOWS_CHECKED_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=CHECKED;> $<$<CONFIG:profile>:${NVCLOTH_WINDOWS_PROFILE_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=PROFILE;> $<$<CONFIG:release>:${NVCLOTH_WINDOWS_RELEASE_COMPILE_DEFS};> ) - - +IF(${NV_CLOTH_ENABLE_DX11}) +LIST(APPEND NVCLOTH_COMPILE_DEFS + NV_CLOTH_ENABLE_DX11=1 +) +ELSE() +LIST(APPEND NVCLOTH_COMPILE_DEFS + NV_CLOTH_ENABLE_DX11=0 +) +ENDIF() +IF(${NV_CLOTH_ENABLE_CUDA}) +LIST(APPEND NVCLOTH_COMPILE_DEFS + NV_CLOTH_ENABLE_CUDA=1 +) +ELSE() +LIST(APPEND NVCLOTH_COMPILE_DEFS + NV_CLOTH_ENABLE_CUDA=0 +) +ENDIF() SET(NVCLOTH_LIBTYPE SHARED) diff --git a/NvCloth/docs/documentation/CopyRight/Index.html b/NvCloth/docs/documentation/CopyRight/Index.html index b0052e2..a570acb 100644 --- a/NvCloth/docs/documentation/CopyRight/Index.html +++ b/NvCloth/docs/documentation/CopyRight/Index.html @@ -31,7 +31,8 @@ <script type="text/javascript" src="../_static/bootstrap.js"></script> <script type="text/javascript" src="../_static/jquery.cookie.js"></script> <script type="text/javascript" src="../_static/jquery.storageapi.js"></script> - <link rel="top" title="NvCloth 1.0.0 documentation" href="../index.html" /> + <link rel="top" title="NvCloth 1.0.0 documentation" href="../index.html" /> + <link rel="prev" title="User Guide" href="../UserGuide/Index.html" /> </head> <body> <nav class="navbar navbar-inverse navbar-default"> @@ -64,8 +65,9 @@ <div class="bs-sidebar"> <div id="sidebar_toc"> <h4>Table Of Contents</h4> - <ul> + <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../ReleaseNotes/index.html">Release Notes</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#fixes">Fixes</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#new-features">New Features</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#supported-platforms">Supported Platforms</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#supported-compilers">Supported Compilers</a></li> @@ -77,32 +79,36 @@ <li class="toctree-l2"><a class="reference internal" href="../Modules/Index.html#nvcloth-extensions">NvCloth extensions</a></li> </ul> </li> -<li class="toctree-l1"><a class="reference internal" href="../UsersGuide/Index.html">Users guide</a><ul> -<li class="toctree-l2"><a class="reference internal" href="../UsersGuide/Index.html#setup">Setup</a><ul> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#initializing-the-library">Initializing the Library</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#factory">Factory</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#fabric-cloth">Fabric & Cloth</a><ul> -<li class="toctree-l4"><a class="reference internal" href="../UsersGuide/Index.html#fabric">Fabric</a></li> -<li class="toctree-l4"><a class="reference internal" href="../UsersGuide/Index.html#cloth">Cloth</a></li> +<li class="toctree-l1"><a class="reference internal" href="../UserGuide/Index.html">User Guide</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../UserGuide/Index.html#setup">Setup</a><ul> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#initializing-the-library">Initializing the Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#factory">Factory</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#fabric-cloth">Fabric & Cloth</a><ul> +<li class="toctree-l4"><a class="reference internal" href="../UserGuide/Index.html#fabric">Fabric</a></li> +<li class="toctree-l4"><a class="reference internal" href="../UserGuide/Index.html#cloth">Cloth</a></li> </ul> </li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#solver">Solver</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#retrieving-simulation-data">Retrieving simulation data</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#solver">Solver</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#retrieving-simulation-data">Retrieving simulation data</a></li> </ul> </li> -<li class="toctree-l2"><a class="reference internal" href="../UsersGuide/Index.html#usage">Usage</a><ul> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#common-cloth-properties">Common cloth properties</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#tethers">Tethers</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#collision-detection">Collision detection</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#local-space-simulation">Local space simulation</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#drag-lift-and-wind">Drag lift and wind</a></li> +<li class="toctree-l2"><a class="reference internal" href="../UserGuide/Index.html#usage">Usage</a><ul> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#common-cloth-properties">Common cloth properties</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#tethers">Tethers</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#collision-detection">Collision detection</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#local-space-simulation">Local space simulation</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#drag-lift-and-wind">Drag lift and wind</a></li> </ul> </li> </ul> </li> +<li class="toctree-l1 current"><a class="current reference internal" href="">NVIDIA Copyright Notice</a></li> </ul> </div> + <h4>Previous topic</h4> + <p class="topless"><a href="../UserGuide/Index.html" + title="previous chapter">User Guide</a></p> <div id="searchbox" style="display: none"> <h4>Quick search</h4> <form class="search form-inline" action="../search.html" method="get"> diff --git a/NvCloth/docs/documentation/Modules/Index.html b/NvCloth/docs/documentation/Modules/Index.html index 4326c42..a959e4c 100644 --- a/NvCloth/docs/documentation/Modules/Index.html +++ b/NvCloth/docs/documentation/Modules/Index.html @@ -32,7 +32,7 @@ <script type="text/javascript" src="../_static/jquery.cookie.js"></script> <script type="text/javascript" src="../_static/jquery.storageapi.js"></script> <link rel="top" title="NvCloth 1.0.0 documentation" href="../index.html" /> - <link rel="next" title="Users guide" href="../UsersGuide/Index.html" /> + <link rel="next" title="User Guide" href="../UserGuide/Index.html" /> <link rel="prev" title="Release Notes" href="../ReleaseNotes/index.html" /> </head> <body> @@ -68,6 +68,7 @@ <h4>Table Of Contents</h4> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../ReleaseNotes/index.html">Release Notes</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#fixes">Fixes</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#new-features">New Features</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#supported-platforms">Supported Platforms</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#supported-compilers">Supported Compilers</a></li> @@ -79,29 +80,30 @@ <li class="toctree-l2"><a class="reference internal" href="#nvcloth-extensions">NvCloth extensions</a></li> </ul> </li> -<li class="toctree-l1"><a class="reference internal" href="../UsersGuide/Index.html">Users guide</a><ul> -<li class="toctree-l2"><a class="reference internal" href="../UsersGuide/Index.html#setup">Setup</a><ul> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#initializing-the-library">Initializing the Library</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#factory">Factory</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#fabric-cloth">Fabric & Cloth</a><ul> -<li class="toctree-l4"><a class="reference internal" href="../UsersGuide/Index.html#fabric">Fabric</a></li> -<li class="toctree-l4"><a class="reference internal" href="../UsersGuide/Index.html#cloth">Cloth</a></li> +<li class="toctree-l1"><a class="reference internal" href="../UserGuide/Index.html">User Guide</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../UserGuide/Index.html#setup">Setup</a><ul> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#initializing-the-library">Initializing the Library</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#factory">Factory</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#fabric-cloth">Fabric & Cloth</a><ul> +<li class="toctree-l4"><a class="reference internal" href="../UserGuide/Index.html#fabric">Fabric</a></li> +<li class="toctree-l4"><a class="reference internal" href="../UserGuide/Index.html#cloth">Cloth</a></li> </ul> </li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#solver">Solver</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#retrieving-simulation-data">Retrieving simulation data</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#solver">Solver</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#retrieving-simulation-data">Retrieving simulation data</a></li> </ul> </li> -<li class="toctree-l2"><a class="reference internal" href="../UsersGuide/Index.html#usage">Usage</a><ul> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#common-cloth-properties">Common cloth properties</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#tethers">Tethers</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#collision-detection">Collision detection</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#local-space-simulation">Local space simulation</a></li> -<li class="toctree-l3"><a class="reference internal" href="../UsersGuide/Index.html#drag-lift-and-wind">Drag lift and wind</a></li> +<li class="toctree-l2"><a class="reference internal" href="../UserGuide/Index.html#usage">Usage</a><ul> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#common-cloth-properties">Common cloth properties</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#tethers">Tethers</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#collision-detection">Collision detection</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#local-space-simulation">Local space simulation</a></li> +<li class="toctree-l3"><a class="reference internal" href="../UserGuide/Index.html#drag-lift-and-wind">Drag lift and wind</a></li> </ul> </li> </ul> </li> +<li class="toctree-l1"><a class="reference internal" href="../CopyRight/Index.html">NVIDIA Copyright Notice</a></li> </ul> </div> @@ -109,8 +111,8 @@ <p class="topless"><a href="../ReleaseNotes/index.html" title="previous chapter">Release Notes</a></p> <h4>Next topic</h4> - <p class="topless"><a href="../UsersGuide/Index.html" - title="next chapter">Users guide</a></p> + <p class="topless"><a href="../UserGuide/Index.html" + title="next chapter">User Guide</a></p> <div id="searchbox" style="display: none"> <h4>Quick search</h4> <form class="search form-inline" action="../search.html" method="get"> diff --git a/NvCloth/docs/documentation/ReleaseNotes/index.html b/NvCloth/docs/documentation/ReleaseNotes/index.html index 2ccbab7..214a7db 100644 --- a/NvCloth/docs/documentation/ReleaseNotes/index.html +++ b/NvCloth/docs/documentation/ReleaseNotes/index.html @@ -137,6 +137,18 @@ <h1>Release Notes<a class="headerlink" href="#release-notes" title="Permalink to this headline">¶</a></h1> <div class="section" id="fixes"> <h2>Fixes<a class="headerlink" href="#fixes" title="Permalink to this headline">¶</a></h2> +<p><strong>1.1.2</strong></p> +<ul class="simple"> +<li>Dynamic allocations at runtime removed from MovingAverage.</li> +<li>Possible error when starting samples due to gpu incompatible with dx debug mode.</li> +<li>Cuda crash on older hardware.</li> +</ul> +<p><strong>1.1.1</strong></p> +<ul class="simple"> +<li>Air drag/lift did react to flow speed only linearly, model was changed to be more physically correct.</li> +<li>Fixed issue where scaling units would result in different air drag/lift behavior (by adding fluid density parameter).</li> +<li>Fixed “unused typedef <cite>__t100</cite>” warning in xcode.</li> +</ul> <p><strong>1.1.0</strong></p> <ul class="simple"> <li>DirectX 11 solver now supports triangle collision shapes and air drag/lift.</li> @@ -146,6 +158,10 @@ </div> <div class="section" id="new-features"> <h2>New Features<a class="headerlink" href="#new-features" title="Permalink to this headline">¶</a></h2> +<p><strong>1.1.2</strong></p> +<ul class="simple"> +<li>Added cmake flags to disable dx11 and/or cuda support.</li> +</ul> <p><strong>1.1.0</strong></p> <ul class="simple"> <li>Solver::getNumCloths and Solver::getClothList interface.</li> diff --git a/NvCloth/docs/documentation/UserGuide/Index.html b/NvCloth/docs/documentation/UserGuide/Index.html index 0a231f4..0beb791 100644 --- a/NvCloth/docs/documentation/UserGuide/Index.html +++ b/NvCloth/docs/documentation/UserGuide/Index.html @@ -68,6 +68,7 @@ <h4>Table Of Contents</h4> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="../ReleaseNotes/index.html">Release Notes</a><ul> +<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#fixes">Fixes</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#new-features">New Features</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#supported-platforms">Supported Platforms</a></li> <li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#supported-compilers">Supported Compilers</a></li> @@ -271,7 +272,7 @@ All fabrics created by a factory need to be destroyed before that factory is des The cloth instance does not need to begin with the same particle positions the fabric was cooked in, so we need to provide the initial position of the particles:</p> <div class="highlight-python"><pre>physx::PxVec4* particlePositions = ...; // The w component is the inverse mass of the particle // and can be to 0 to lock the particle / make it static. -nv::cloth::Cloth* cloth = factory->createCloth(nv::cloth::Range<physx::PxVec4>( particlePositions, & particlePositions + particleCount), *fabric); +nv::cloth::Cloth* cloth = factory->createCloth(nv::cloth::Range<physx::PxVec4>(particlePositions, particlePositions + particleCount), *fabric); // particlePositions can be freed here. ... @@ -307,7 +308,7 @@ for(int i = 0; i < fabric->getNumPhases(); i++) phases[i].mCompressionLimit = 1.0f; phases[i].mStretchLimit = 1.0f; } -cloth->setPhaseConfig(nv::cloth::Range<nv::cloth::PhaseConfig>(&phases[0], &phases[0] + fabric->getNumPhases())); +cloth->setPhaseConfig(nv::cloth::Range<nv::cloth::PhaseConfig>(phases, phases + fabric->getNumPhases())); delete [] phases;</pre> </div> <p>Note that there might be more phase of each type. @@ -361,14 +362,14 @@ for(int i = 0; i<particles.size(); i++) </div> <div class="section" id="usage"> <h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2> -<p>Cloth instances have many properties that can be influence their behavior. +<p>Cloth instances have many properties that can influence their behavior. This section shows how to use some of the most common properties.</p> <div class="section" id="common-cloth-properties"> <h3>Common cloth properties<a class="headerlink" href="#common-cloth-properties" title="Permalink to this headline">¶</a></h3> <p>We can set the gravity acceleration vector in global space:</p> <div class="highlight-python"><pre>cloth->setGravity(physx::PxVec3(0.0f, -9.8f, 0.0f));</pre> </div> -<p>This vector doesn’t have to be the same as provided to the cooker.</p> +<p>This vector doesn’t have to be the same as the one provided to the cooker.</p> <p>Sometimes it is desirable to dampen the particle motion:</p> <div class="highlight-python"><pre>cloth->setDamping(0.5f); //0.0f is default</pre> </div> @@ -403,6 +404,7 @@ cloth->setTetherConstraintStiffness(1.0f); //Default value</pre> All collision primitives are defined in local space.</p> <p>We can define up to 32 collision spheres per cloth:</p> <div class="highlight-python"><pre>physx::PxVec4 spheres[2] = { + // First 3 components of each vector is sphere center in local space and the 4th one is its radius physx::PxVec4(0.0f, 0.0f, 0.0f, 1.0f), physx::PxVec4(0.0f, 5.0f, 0.0f, 1.0f) }; @@ -445,8 +447,8 @@ We can easily construct convex shapes consisting of more planes by setting more <div class="highlight-python"><pre>physx::PxVec3* triangles = ...; //Get triangle data from somewhere //We can't use indexed meshes/vertex sharing, // each triangle is defined with its own 3 vertexes -nv::cloth::Range<const physx::PxVec3> triangleR(&triangles[0], &triangles[0] + triangleCount * 3); -cloth->setTriangles(triangleR, 0, cloth>getNumTriangles());</pre> +nv::cloth::Range<const physx::PxVec3> triangleR(triangles, triangles + triangleCount * 3); +cloth->setTriangles(triangleR, 0, cloth->getNumTriangles());</pre> </div> <p>Note that the range arguments passed to setTriangles are counting whole triangles (3 PxVec3 vertexes each).</p> <p>We can set the friction coefficient used for collision between cloth and collision shapes like this:</p> diff --git a/NvCloth/docs/documentation/searchindex.js b/NvCloth/docs/documentation/searchindex.js index 388ea4f..0ac2dee 100644 --- a/NvCloth/docs/documentation/searchindex.js +++ b/NvCloth/docs/documentation/searchindex.js @@ -1 +1 @@ -Search.setIndex({envversion:42,terms:{all:[3,2,4],code:[5,2],orthogon:5,indirectli:2,skip:2,global:2,sleep:5,capsul:[1,2],follow:[5,2],"const":2,solvefabr:5,text:5,lrg:5,offlin:4,volum:5,radiu:5,setplan:2,cook:[2,4],evert:2,ajust:5,brows:0,cuctxcreat:2,pbw:5,dampen:2,doesn:[1,2],stiff:[5,1,2],list:[5,2,4],iter:[5,2],tunnel:2,adjust:2,small:5,setdragcoeffici:2,refer:[5,2],dir:5,smaller:[5,2],p_j:5,unnorm:5,natur:2,compens:5,direct:5,zero:5,design:0,pass:2,massscal:5,p_t:5,correspond:2,even:2,index:[5,2],hide:5,section:2,brief:4,current:[5,2,4],delet:2,intersect:2,impuls:[5,2],method:2,movement:[5,2],intellectu:3,mindic:5,gener:[5,2],coeffici:[5,2],onli:[1,2],here:[5,2,4],modif:3,ubuntu:1,depend:[5,2],vertic:[5,2],p_2:5,sinc:2,p_0:5,p_1:5,search:0,shift:2,setposit:2,pick:2,implement:[5,1,2],eshear:2,regardless:2,appli:[5,2],c_1:5,c_0:5,c_2:5,clothfabriccook:2,instabl:[5,2],from:[3,5,2,4],describ:[5,2],particlecount:2,memori:2,doubl:5,stretchi:[5,2],two:2,live:2,call:2,type:[5,2],tell:2,more:[],desir:2,settetherconstraintstiff:2,relat:[3,4],pxprofilercallback:2,flag:1,c_t:5,particular:5,ebend:2,hold:2,reproduct:3,graphic:2,stretchlimit:5,prepar:4,applywind:5,dxcontextmanagercallbackimpl:2,remain:5,pxquat:2,vertexcount:2,can:[5,2,4],d3d11:2,veloc:5,control:2,nearest:5,give:[5,2,4],lock:2,share:2,calcul:[5,2],indic:[5,2],high:5,sphere:[5,1,2],proprietari:3,bend:5,want:[2,4],setconvex:2,alwai:2,gcc:1,multipl:[5,2],straightforward:2,thing:2,divis:5,how:[5,2],pseudo:5,instead:[5,2],simpl:2,sin:5,updat:5,product:0,collisionshap:2,frac:5,teleport:2,tetherconstraintstiff:5,setangularinertia:2,after:[5,2],differenti:[5,2],befor:2,mac:1,plane:[5,2],mai:2,end:[5,2],data:4,stabil:2,alloc:2,setwindveloc:2,createcloth:2,explicit:5,nvclothcookfabricfrommesh:2,element:5,caus:[5,1,2],inform:[5,2],"switch":2,combin:5,allow:2,order:[5,2],wind:[],rotat:5,over:2,move:[5,2],sphere_radiu:5,nv_cloth_delet:2,through:2,sqrt:5,restlength:5,d3d_driver_type_hardwar:2,still:2,vari:2,directx:1,paramet:2,snippet:2,group:2,render:2,fix:[5,2],better:2,window:1,pend:2,mrestvalu:5,bypass:4,clothimpl:5,featurelevel:2,main:[],might:[5,2],them:2,good:2,"return":2,thei:2,handl:[2,4],deiniti:2,sooner:5,"break":2,mappedrang:2,now:[1,2],somewher:2,name:5,anyth:2,config:2,solver:[],easili:2,each:[5,2],debug:1,mean:2,compil:4,prohibit:3,cudacontext:2,weight:5,replac:[5,2],idea:2,playstat:1,dx11:[1,2],"static":2,connect:[5,2],fluctuat:5,happen:5,todo:5,getnumcloth:1,space:5,goe:5,settriangl:2,your:2,profil:2,rewrit:5,vector:[5,2],suitabl:0,rel:2,max:5,correct:2,mphase:5,log2:5,advanc:2,differ:[5,2],selfcollideparticl:5,removecloth:2,"byte":2,compressionlimitc:5,cuctxdestroi:2,setliftcoeffici:2,reusabl:2,thread:2,angl:5,frequenc:[5,2],could:2,keep:[5,2],motion:[5,2],stride:2,length:[5,2],enforc:5,outsid:5,nvcloth:3,retain:3,summari:[],interact:0,first:[5,2],origin:[5,2],softwar:3,rang:2,directli:[2,4],curesult:2,cuda_success:2,arrai:[5,2],independ:5,scene:[1,2],sometim:2,alreadi:[1,2],done:5,least:2,setcapsul:2,miss:2,size:[5,2],given:5,"long":2,start:[5,2],licens:3,system:2,construct:2,too:5,gpu:2,dt1:5,dt0:5,store:[5,2],low:0,dampexpon:5,getnumtriangl:2,option:2,endsimul:2,usemultipli:5,specifi:[5,2],part:[5,2,4],quad:[2,4],exactli:5,strictli:3,ehorizont:2,stiffnessc:5,target:[5,2],provid:[0,2,4],remov:2,d3d11createdevic:2,horizont:[5,2],reus:5,posit:[5,2],dxcontextmanagercallback:2,initi:[],trianglecount:2,behavior:[5,2],sphererang:2,clothfabricphasetyp:2,ani:[3,2],sqrlength:5,thereto:3,constrainteth:5,togglecont:5,initializenvcloth:2,need:[5,2],clothmeshdesc:2,mset:5,strength:2,d3d_feature_level:2,lib:4,min:5,destroi:2,self:[5,2],accuraci:2,also:[5,2],without:[3,5,2],build:1,which:[5,2,4],graviti:2,singl:5,clearinertia:2,simplifi:2,begin:[5,2],distribut:3,normal:5,multipli:[5,2],dxdevic:2,previou:[5,2],phaseconfig:[5,2],react:2,most:2,beta:1,cucontext:2,thi:[3,5,2,4],pair:[5,2],collideparticl:5,oscil:2,"class":2,rendercloth:1,particle_invmass:5,later:2,flow:5,doe:[5,2],settetherconstraintscal:2,runtim:[2,4],hresult:2,occasion:5,constrain:[5,2],left:5,settodefault:2,getcurrentparticl:2,show:[5,2],opposit:5,xcode:1,stiffnessexpon:5,friction:[1,2],concurr:2,dxdevicecontext:2,threshold:5,callback:2,help:[5,2],access:0,id3d11devic:2,slow:5,locat:2,simulatechunk:2,explain:5,configur:2,written:5,should:[5,2],computebound:5,sierra:1,local:5,count:[5,2],get:2,pxallocatorcallback:2,einvalid:2,express:3,cannot:2,phasetypeinfo:2,increas:[5,2],requir:2,gust:2,nullptr:2,shape:[1,2],contain:[5,2],cudevicegetcount:2,where:[5,1],view:0,set:[5,2],sear:5,frame:[5,2],maximum:5,graphicscontextmanag:2,result:[5,2],respons:[0,5,2],mstiff:2,reserv:3,charact:0,improv:[1,2],pxerrorcallback:2,sphere_cent:5,someth:2,dll:4,state:5,devicecount:2,between:[5,2],theta:5,previous:2,across:2,nvclothdestroyfactori:2,solv:[5,2],inertia:2,addit:[5,2],mstretchlimit:2,both:5,last:[5,2],planesr:2,equal:2,setsolverfrequ:2,etc:2,instanc:[5,2],equat:5,context:2,getsimulationchunkcount:2,let:2,whole:2,comment:5,acceler:[5,2],springi:2,point:[5,2],int32_t:2,decrefcount:2,pop:5,addcloth:2,linux:1,divid:[5,2],coupl:2,stretch:5,damp:[5,2],devic:2,invers:[5,2],been:2,destructor:2,valu:[5,2],stretchlimitc:5,getclothlist:1,argument:2,assert:[1,2],coordin:2,lift:5,togeth:2,nvclothcreatefactorydx11:2,"case":[5,2],align:2,properti:3,mcloth:2,setgrav:2,air:[1,2],log_2:5,defin:[5,2],"while":2,abov:[5,2],error:[5,2],report:2,anchor:5,stiffnessfrequ:5,have:2,helper:2,mcompressionlimit:2,getnumconvex:2,particle_posit:5,itself:2,crash:1,develop:0,paw:5,perform:2,make:2,belong:5,x64:1,same:[5,2,4],document:3,higher:2,nvclothcreatefactorycuda:2,constrainmot:5,optim:1,effect:2,mesh:[2,4],getnorm:2,user:[5,4],mani:2,robust:0,chang:[1,2],lower:2,task:4,beginsimul:2,anim:0,exampl:2,uint32_t:2,interpol:5,ccd:1,everyth:2,dimension:5,usual:5,getnumphas:2,execut:2,less:5,deltax:2,when:[5,2],deltaz:2,rest:[5,2],particleposit:2,deltai:2,speed:5,yet:1,ps4:1,settransl:2,struct:2,easi:0,iterationst:5,studio:1,littl:0,add:2,other:[5,2],primit:2,els:5,euler:5,applic:[0,2],numteth:5,meshdesc:2,bia:5,game:0,know:2,vacuum:2,pxvec4:[5,2],world:2,bit:2,pxvec3:2,insert:2,like:2,specif:5,arbitrari:2,cdot:5,corpor:3,manual:2,stiffnessmultipli:5,xbox:1,necessari:2,realtim:0,manag:2,right:[3,5],often:5,spring:2,some:2,d3d_feature_level_11_0:2,s_ok:2,sampl:1,convex:2,setrot:2,sizeof:2,librari:4,scale:[5,2],avoid:2,setlinearinertia:2,per:[1,2],circ:5,compressionlimit:5,larg:5,setfrict:2,complic:2,freed:2,core:4,object:2,reach:[5,2],updatesleepst:5,agreement:3,broken:2,step:[5,2],although:5,offset:5,d3d11_sdk_version:2,stage:2,about:[],would:1,constraint:[],deltatim:2,createsolv:2,page:0,disclosur:3,cuda:[1,2],underwat:2,disabl:2,particle_position1:5,setcentrifugalinertia:2,own:[2,4],visit:0,xyz:[5,2],"float":[5,2],particle_position0:5,due:5,phase:[5,2],integrateparticl:5,vertexarrai:2,ensur:[5,2],mphaseindex:2,setspher:2,accordingli:2,strechlimitc:5,triangl:[4,5,1,2],fabric:4,wai:2,area:5,support:4,transform:[5,2],fast:[0,2],createfabr:2,getnumspher:2,interfac:[0,1,2],includ:[5,2,4],overhead:0,constrainsepar:5,physx:[5,2],"function":4,properli:2,forc:2,epsilon:5,nvclothext:2,refcount:2,continu:2,cloth:5,triangler:2,delta:5,level:0,bug:1,sdk:1,reset:2,numparticl:5,tetherlength:5,consist:2,"default":2,displai:2,below:2,limit:5,getnumcapsul:2,problem:[5,2],similar:2,clear:2,featur:4,constant:5,creat:[5,2],"int":2,descript:4,inv:5,mstiffnessmultipli:2,repres:2,decreas:2,home:0,work:[5,1,2],check:[5,2],fill:2,again:2,collid:[5,2],cmake:1,setdamp:[5,2],piw:5,detail:[5,2],cleanup:2,capsuleindic:2,setphaseconfig:2,test:[5,1],you:2,logdamp:5,multiplierc:5,c_j:5,constraintmot:5,center:5,vertex:2,pxasserthandl:2,getnumplan:2,drag:5,veri:2,nvclothcreatefactorycpu:2,reduc:[5,2],land:[],id3d11devicecontext:2,featurelevelresult:2,cooker:2,inaccuraci:5,collis:5,mask:2,visual:1,influenc:2,safe:2,mass:[5,2],time:[5,2],licensor:3,cpu:[1,2]},objtypes:{},objnames:{},filenames:["index","ReleaseNotes/index","UserGuide/Index","CopyRight/Index","Modules/Index","Solver/Index"],titles:["NvCloth","Release Notes","User Guide","NVIDIA Copyright Notice","Modules","Internal solver function/algorithm documentation"],objects:{},titleterms:{compil:1,featur:1,edg:5,nvidia:3,overview:5,modul:4,known:1,intern:5,distanc:5,invmass:5,guid:2,tether:[5,2],particl:5,compon:5,detect:2,fabric:[5,2],copyright:3,space:2,support:1,note:1,platform:1,collis:2,librari:2,"new":1,document:5,local:2,factori:2,integr:5,"function":5,nvcloth:[0,4],usag:2,notic:3,constraint:5,cloth:2,drag:2,lift:2,user:2,releas:1,data:[5,2],about:0,retriev:2,slack:5,algorithm:5,extens:4,setup:2,solver:[5,2],structur:5,simul:[5,2],issu:1,properti:2,common:2,learn:0,separ:5,more:0,initi:2,fix:1,wind:[5,2]}})
\ No newline at end of file +Search.setIndex({envversion:42,terms:{all:[3,1,4],code:[5,1],orthogon:5,skip:1,global:1,sleep:5,capsul:[1,2],follow:[5,1],"const":1,solvefabr:5,text:5,sourc:5,lrg:5,offlin:4,volum:5,friction:[1,2],setplan:1,cook:[1,4],evert:1,ajust:5,brows:0,cuctxcreat:1,pbw:5,dampen:1,doesn:[1,2],solver:[],did:2,list:[5,1,4],iter:[5,1],tunnel:1,adjust:1,small:5,setdragcoeffici:1,refer:[5,1],dir:5,smaller:[5,1],p_j:5,unnorm:5,natur:1,compens:5,direct:5,zero:5,design:0,pass:1,massscal:5,p_t:5,correspond:1,even:1,index:[5,1],hide:5,section:1,brief:4,current:[5,1,4],delet:1,moddel:[],intersect:1,impuls:[5,1],method:1,movement:[5,1],intellectu:3,mindic:5,gener:[5,1],coeffici:[5,1],onli:[1,2],here:[5,1,4],modif:3,ubuntu:2,depend:[5,1],vertic:[5,1],p_2:5,sinc:1,p_0:5,p_1:5,search:0,shift:1,setposit:1,pick:1,chang:[1,2],eshear:1,regardless:1,appli:[5,1],linearli:2,c_1:5,c_0:5,c_2:5,clothfabriccook:1,instabl:[5,1],unit:2,from:[3,4,5,1,2],describ:[5,1],would:2,memori:1,doubl:5,stretchi:[5,1],two:1,live:1,call:1,type:[5,1],tell:1,more:[],desir:1,settetherconstraintstiff:1,relat:[3,4],warn:2,pxprofilercallback:1,flag:2,c_t:5,particular:5,ebend:1,hold:1,reproduct:3,graphic:1,stretchlimit:5,prepar:4,applywind:5,dxcontextmanagercallbackimpl:1,remain:5,pxquat:1,vertexcount:1,can:[5,1,4],d3d11:1,veloc:5,control:1,nearest:5,give:[5,1,4],lock:1,share:1,calcul:[5,1],indic:[5,1],high:5,sphere:[5,1,2],proprietari:3,bend:5,want:[1,4],setconvex:1,alwai:1,gcc:2,end:[5,1],straightforward:1,thing:1,divis:5,how:[5,1],pseudo:5,instead:[5,1],simpl:1,sin:5,updat:5,product:0,collisionshap:1,frac:5,teleport:1,tetherconstraintstiff:5,setangularinertia:1,after:[5,1],differenti:[5,1],befor:1,mac:2,plane:[5,1],mai:1,multipl:[5,1],data:4,physic:2,stabil:1,alloc:[1,2],setwindveloc:1,createcloth:1,explicit:5,nvclothcookfabricfrommesh:1,element:5,caus:[5,1,2],inform:[5,1],"switch":1,combin:5,allow:1,order:[5,1],wind:[],rotat:5,over:1,move:[5,1],sphere_radiu:5,nv_cloth_delet:1,through:1,sqrt:5,d3d_driver_type_hardwar:1,still:1,vari:1,directx:2,paramet:[1,2],snippet:1,typedef:2,group:1,render:1,better:1,window:2,pend:1,mrestvalu:5,bypass:4,clothimpl:5,featurelevel:1,might:[5,1],them:1,good:1,crash:2,thei:1,handl:[1,4],deiniti:1,sooner:5,"break":1,mappedrang:1,now:[1,2],somewher:1,name:5,anyth:1,config:1,stiff:[5,1,2],easili:1,mode:2,each:[5,1],debug:2,mean:[5,1],compil:4,prohibit:3,cudacontext:1,weight:5,replac:[5,1],idea:1,playstat:2,dx11:[1,2],"static":1,connect:[5,1],fluctuat:5,happen:5,todo:5,getnumcloth:2,space:[],goe:5,settriangl:1,your:1,profil:1,rewrit:5,vector:[5,1],suitabl:0,rel:1,max:5,hardwar:2,correct:[1,2],mphase:5,model:[5,2],log2:5,advanc:1,differ:[5,1,2],selfcollideparticl:5,removecloth:1,"byte":1,compressionlimitc:5,cuctxdestroi:1,setliftcoeffici:1,reusabl:1,thread:1,angl:5,frequenc:[5,1],could:1,keep:[5,1],motion:[5,1],stride:1,length:[5,1],enforc:5,outsid:5,nvcloth:3,retain:3,interact:0,first:[5,1],origin:[5,1],softwar:3,rang:1,directli:[1,4],curesult:1,cuda_success:1,arrai:[5,1],independ:5,scene:[1,2],sometim:1,alreadi:[1,2],done:5,least:1,setcapsul:1,miss:1,size:[5,1],given:5,"long":1,start:[5,1,2],licens:3,system:1,construct:1,too:5,gpu:[1,2],dt1:5,dt0:5,store:[5,1],includ:[5,1,4],dampexpon:5,getnumtriangl:1,option:1,endsimul:1,usemultipli:5,specifi:[5,1],part:[5,1,4],mostli:5,quad:[1,4],exactli:5,constrainsepar:5,ehorizont:1,f_d:5,stiffnessc:5,target:[5,1],f_l:5,remov:[1,2],d3d11createdevic:1,horizont:[5,1],reus:5,posit:[5,1],dxcontextmanagercallback:1,initi:[],surfac:5,trianglecount:1,behavior:[5,1,2],sphererang:1,getclothlist:2,ani:[3,1],sqrlength:5,necessari:1,thereto:3,constrainteth:5,togglecont:5,initializenvcloth:1,need:[5,1],clothmeshdesc:1,mset:5,strength:1,d3d_feature_level:1,lib:4,min:5,destroi:1,self:[5,1],accuraci:1,also:[5,1],without:[3,5,1],build:2,which:[5,1,4],graviti:1,singl:5,clearinertia:1,simplifi:1,begin:[5,1],distribut:3,normal:5,multipli:[5,1],dxdevic:1,previou:[5,1],reach:[5,1],react:[1,2],most:1,beta:2,cucontext:1,rho:5,thi:[3,5,1,4],pair:[5,1],collideparticl:5,oscil:1,"class":1,rendercloth:2,particle_invmass:5,later:1,flow:[5,2],doe:[5,1],settetherconstraintscal:1,runtim:[4,1,2],hresult:1,occasion:5,constrain:[5,1],left:5,settodefault:1,getcurrentparticl:1,show:[5,1],opposit:5,xcode:2,stiffnessexpon:5,radiu:[5,1],concurr:1,dxdevicecontext:1,threshold:5,callback:1,help:[5,1],access:0,id3d11devic:1,slow:5,locat:1,simulatechunk:1,explain:5,configur:1,written:5,should:[5,1],computebound:5,sierra:2,local:[],visual:2,count:[5,1],unus:2,get:1,pxallocatorcallback:1,einvalid:1,express:3,fluid:[5,2],cannot:1,phasetypeinfo:1,increas:[5,1],requir:1,gust:1,nullptr:1,shape:[1,2],provid:[0,1,4],contain:[5,1],cudevicegetcount:1,where:[5,2],view:0,set:[5,1],sear:5,frame:[5,1],maximum:5,graphicscontextmanag:1,result:[5,1,2],respons:[0,5,1],mstiff:1,reserv:3,charact:0,improv:[1,2],closer:5,pxerrorcallback:1,sphere_cent:5,someth:1,dll:4,"4th":1,state:5,devicecount:1,dynam:2,movingaverag:2,between:[5,1],theta:5,previous:1,across:1,nvclothdestroyfactori:1,solv:[5,1],inertia:1,addit:[5,1],mstretchlimit:1,both:5,last:[5,1],planesr:1,equal:1,setsolverfrequ:1,etc:1,instanc:[5,1],equat:5,context:1,getsimulationchunkcount:1,let:1,whole:1,comment:5,acceler:[5,1],springi:1,point:[5,1],int32_t:1,decrefcount:1,pop:5,addcloth:1,linux:2,divid:[5,1],coupl:1,stretch:5,damp:[5,1],devic:1,due:[5,2],been:1,destructor:1,valu:[5,1],stretchlimitc:5,clothfabricphasetyp:1,densiti:[5,2],argument:1,assert:[1,2],coordin:1,lift:[],togeth:1,nvclothcreatefactorydx11:1,"case":[5,1],align:1,properti:3,mcloth:1,setgrav:1,air:[5,1,2],log_2:5,defin:[5,1],"while":[5,1],match:5,abov:[5,1],error:[5,1,2],report:1,anchor:5,stiffnessfrequ:5,have:1,helper:1,mcompressionlimit:1,getnumconvex:1,particle_posit:5,itself:1,"return":1,incompat:2,develop:0,paw:5,perform:1,make:1,belong:5,x64:2,same:[5,1,4],document:3,higher:1,nvclothcreatefactorycuda:1,constrainmot:5,optim:2,effect:1,mesh:[1,4],getnorm:1,user:4,mani:1,robust:0,implement:[5,1,2],lower:1,task:4,beginsimul:1,older:2,anim:0,exampl:1,uint32_t:1,interpol:5,ccd:2,everyth:1,dimension:5,usual:5,explan:5,getnumphas:1,execut:1,less:5,deltax:1,when:[5,1,2],deltaz:1,rest:[5,1],particleposit:1,deltai:1,speed:[5,2],yet:2,ps4:2,settransl:1,struct:1,easi:0,iterationst:5,studio:2,littl:0,add:1,other:[5,1],primit:1,els:5,hat:5,euler:5,applic:[0,1],numteth:5,meshdesc:1,bia:5,game:0,know:1,vacuum:1,pxvec4:[5,1],world:1,bit:1,pxvec3:1,insert:1,like:1,specif:5,arbitrari:1,cdot:5,corpor:3,manual:1,stiffnessmultipli:5,xbox:2,setfrict:1,realtim:0,page:0,right:[3,5],often:5,spring:1,some:1,d3d_feature_level_11_0:1,s_ok:1,sampl:2,convex:1,setrot:1,sizeof:1,librari:4,scale:[5,1,2],avoid:1,setlinearinertia:1,per:[5,1,2],circ:5,compressionlimit:5,larg:5,"__t100":2,complic:1,symbol:5,freed:1,core:4,object:1,phaseconfig:[5,1],updatesleepst:5,agreement:3,interfac:[0,1,2],broken:1,step:[5,1],although:5,offset:5,d3d11_sdk_version:1,stage:1,about:[],particlecount:1,constraint:[],deltatim:1,createsolv:1,simul:[],disclosur:3,cuda:[1,2],underwat:1,disabl:[1,2],setcentrifugalinertia:1,own:[1,4],visit:0,xyz:[5,1],"float":[5,1],particle_position0:5,particle_position1:5,phase:[5,1],integrateparticl:5,vertexarrai:1,ensur:[5,1],mphaseindex:1,setspher:1,manag:1,accordingli:1,strechlimitc:5,triangl:[4,5,1,2],fabric:4,wai:1,area:5,support:4,transform:[5,1],fast:[0,1],createfabr:1,getnumspher:1,restlength:5,low:0,overhead:0,strictli:3,physx:[5,1],"function":4,properli:1,forc:[5,1],epsilon:5,nvclothext:1,refcount:1,continu:1,cloth:[],triangler:1,delta:5,level:0,bug:2,sdk:2,reset:1,notat:5,numparticl:5,tetherlength:5,consist:1,possibl:2,"default":1,displai:1,below:[5,1],limit:5,getnumcapsul:1,problem:[5,1],similar:1,clear:1,featur:4,constant:5,creat:[5,1],"int":1,descript:4,inv:5,mstiffnessmultipli:1,repres:1,decreas:1,home:0,work:[5,1,2],check:[5,1],fill:1,again:1,collid:[5,1],cmake:2,setdamp:[5,1],piw:5,detail:[5,1],cleanup:1,capsuleindic:1,setphaseconfig:1,test:[5,2],you:1,logdamp:5,multiplierc:5,invers:[5,1],c_j:5,constraintmot:5,center:[5,1],vertex:1,pxasserthandl:1,getnumplan:1,drag:[],veri:1,nvclothcreatefactorycpu:1,reduc:[5,1],id3d11devicecontext:1,featurelevelresult:1,cooker:1,inaccuraci:5,collis:[],mask:1,indirectli:1,influenc:1,safe:1,mass:[5,1],time:[5,1],licensor:3,cpu:[1,2],mathrm:5},objtypes:{},objnames:{},filenames:["index","UserGuide/Index","ReleaseNotes/index","CopyRight/Index","Modules/Index","Solver/Index"],titles:["NvCloth","User Guide","Release Notes","NVIDIA Copyright Notice","Modules","Internal solver function/algorithm documentation"],objects:{},titleterms:{compil:2,featur:2,edg:5,nvidia:3,overview:5,modul:4,known:2,intern:5,distanc:5,invmass:5,guid:1,tether:[5,1],particl:5,compon:5,detect:1,fabric:[5,1],copyright:3,space:1,support:2,note:2,platform:2,collis:1,librari:1,"new":2,document:5,local:1,factori:1,integr:5,"function":5,nvcloth:[0,4],usag:1,notic:3,constraint:5,cloth:1,drag:1,lift:1,user:1,releas:2,data:[5,1],about:0,retriev:1,slack:5,algorithm:5,extens:4,setup:1,solver:[5,1],structur:5,simul:[5,1],issu:2,properti:1,common:1,learn:0,separ:5,more:0,initi:1,fix:2,wind:[5,1]}})
\ No newline at end of file diff --git a/NvCloth/docs/doxy/files/_callbacks_8h-source.html b/NvCloth/docs/doxy/files/_callbacks_8h-source.html index 7c341e7..d30688f 100644 --- a/NvCloth/docs/doxy/files/_callbacks_8h-source.html +++ b/NvCloth/docs/doxy/files/_callbacks_8h-source.html @@ -117,71 +117,86 @@ <a name="l00099"></a>00099 <span class="preprocessor">#if !PX_ENABLE_ASSERTS</span> <a name="l00100"></a>00100 <span class="preprocessor"></span><span class="preprocessor">#if PX_VC</span> <a name="l00101"></a>00101 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT(exp) __noop</span> -<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#else</span> -<a name="l00103"></a><a class="code" href="_callbacks_8h.html#95d1d44fde08004dd6fa0be04be6a445">00103</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT(exp) ((void)0)</span> -<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#endif</span> -<a name="l00105"></a>00105 <span class="preprocessor"></span><span class="preprocessor">#else</span> -<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT(exp) \</span> -<a name="l00107"></a>00107 <span class="preprocessor"> { \</span> -<a name="l00108"></a>00108 <span class="preprocessor"> static bool _ignore = false; \</span> -<a name="l00109"></a>00109 <span class="preprocessor"> (static_cast<void>((!!(exp)) || (!_ignore && ((*nv::cloth::GetNvClothAssertHandler())(#exp, __FILE__, __LINE__, _ignore), false)))); \</span> -<a name="l00110"></a>00110 <span class="preprocessor"> PX_CODE_ANALYSIS_ASSUME(exp); \</span> -<a name="l00111"></a>00111 <span class="preprocessor"> }</span> -<a name="l00112"></a>00112 <span class="preprocessor"></span><span class="preprocessor">#endif</span> -<a name="l00113"></a>00113 <span class="preprocessor"></span> -<a name="l00114"></a>00114 <span class="comment">//Profiler</span> -<a name="l00115"></a>00115 physx::PxProfilerCallback* GetNvClothProfiler(); <span class="comment">//Only use internally</span> -<a name="l00116"></a>00116 <span class="preprocessor">#if PX_DEBUG || PX_CHECKED || PX_PROFILE || 1</span> -<a name="l00117"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">00117</a> <span class="preprocessor"></span><span class="keyword">class </span><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">NvClothProfileScoped</a> -<a name="l00118"></a>00118 { -<a name="l00119"></a>00119 <span class="keyword">public</span>: -<a name="l00120"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#eb4cd36d11aa03f05d05a6f18f8b41cb">00120</a> PX_FORCE_INLINE <a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">NvClothProfileScoped</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* eventName, <span class="keywordtype">bool</span> detached, uint64_t contextId, -<a name="l00121"></a>00121 <span class="keyword">const</span> <span class="keywordtype">char</span>* fileName, <span class="keywordtype">int</span> lineno, physx::PxProfilerCallback* callback) -<a name="l00122"></a>00122 : mCallback(callback) -<a name="l00123"></a>00123 { -<a name="l00124"></a>00124 PX_UNUSED(fileName); -<a name="l00125"></a>00125 PX_UNUSED(lineno); -<a name="l00126"></a>00126 mProfilerData = NULL; <span class="comment">//nullptr doesn't work here on mac</span> -<a name="l00127"></a>00127 <span class="keywordflow">if</span> (mCallback) -<a name="l00128"></a>00128 { -<a name="l00129"></a>00129 mEventName = eventName; -<a name="l00130"></a>00130 mDetached = detached; -<a name="l00131"></a>00131 mContextId = contextId; -<a name="l00132"></a>00132 mProfilerData = mCallback->zoneStart(mEventName, mDetached, mContextId); -<a name="l00133"></a>00133 } -<a name="l00134"></a>00134 } -<a name="l00135"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#803ffc5af708346f086454ca7c6948d9">00135</a> ~<a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">NvClothProfileScoped</a>(<span class="keywordtype">void</span>) -<a name="l00136"></a>00136 { -<a name="l00137"></a>00137 <span class="keywordflow">if</span> (mCallback) -<a name="l00138"></a>00138 { -<a name="l00139"></a>00139 mCallback->zoneEnd(mProfilerData, mEventName, mDetached, mContextId); -<a name="l00140"></a>00140 } -<a name="l00141"></a>00141 } -<a name="l00142"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#561c535d463cb4ef349db1b13b52761b">00142</a> physx::PxProfilerCallback* mCallback; -<a name="l00143"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#e4bae4fa99fd522f226143f9b7f8a0fb">00143</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* mEventName; -<a name="l00144"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#3a008841539b432550e139510d84d987">00144</a> <span class="keywordtype">bool</span> mDetached; -<a name="l00145"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#dbbaf92e01e8d8cd7c2a80242a60c5a3">00145</a> uint64_t mContextId; -<a name="l00146"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#45731a72d188fd61afab53f65793ae6b">00146</a> <span class="keywordtype">void</span>* mProfilerData; -<a name="l00147"></a>00147 }; -<a name="l00148"></a>00148 -<a name="l00149"></a><a class="code" href="_callbacks_8h.html#07a777d717c8c0eb9d8ae6d1b5db94ee">00149</a> <span class="preprocessor">#define NV_CLOTH_PROFILE_ZONE(x, y) \</span> -<a name="l00150"></a>00150 <span class="preprocessor"> nv::cloth::NvClothProfileScoped PX_CONCAT(_scoped, __LINE__)(x, false, y, __FILE__, __LINE__, nv::cloth::GetNvClothProfiler())</span> -<a name="l00151"></a><a class="code" href="_callbacks_8h.html#d31f06d741b7e7340058e66b64e8d1da">00151</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_START_CROSSTHREAD(x, y) \</span> -<a name="l00152"></a>00152 <span class="preprocessor"> (GetNvClothProfiler()!=nullptr? \</span> -<a name="l00153"></a>00153 <span class="preprocessor"> GetNvClothProfiler()->zoneStart(x, true, y):nullptr)</span> -<a name="l00154"></a><a class="code" href="_callbacks_8h.html#5c4305c0f359cd51e90391ce3847d4de">00154</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_STOP_CROSSTHREAD(profilerData, x, y) \</span> -<a name="l00155"></a>00155 <span class="preprocessor"> if (GetNvClothProfiler()) \</span> -<a name="l00156"></a>00156 <span class="preprocessor"> GetNvClothProfiler()->zoneEnd(profilerData, x, true, y)</span> -<a name="l00157"></a>00157 <span class="preprocessor"></span><span class="preprocessor">#else</span> -<a name="l00158"></a>00158 <span class="preprocessor"></span> -<a name="l00159"></a>00159 <span class="preprocessor">#define NV_CLOTH_PROFILE_ZONE(x, y)</span> -<a name="l00160"></a>00160 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_START_CROSSTHREAD(x, y) nullptr</span> -<a name="l00161"></a>00161 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_STOP_CROSSTHREAD(profilerData, x, y)</span> -<a name="l00162"></a>00162 <span class="preprocessor"></span> -<a name="l00163"></a>00163 <span class="preprocessor">#endif</span> -<a name="l00164"></a>00164 <span class="preprocessor"></span> -<a name="l00165"></a>00165 } -<a name="l00166"></a>00166 } +<a name="l00102"></a>00102 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) __noop</span> +<a name="l00103"></a>00103 <span class="preprocessor"></span><span class="preprocessor">#else</span> +<a name="l00104"></a><a class="code" href="_callbacks_8h.html#95d1d44fde08004dd6fa0be04be6a445">00104</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT(exp) ((void)0)</span> +<a name="l00105"></a><a class="code" href="_callbacks_8h.html#7580256d644389afb1a6fbf123cd9747">00105</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) ((void)0)</span> +<a name="l00106"></a>00106 <span class="preprocessor"></span><span class="preprocessor">#endif</span> +<a name="l00107"></a>00107 <span class="preprocessor"></span><span class="preprocessor">#else</span> +<a name="l00108"></a>00108 <span class="preprocessor"></span><span class="preprocessor">#if PX_VC</span> +<a name="l00109"></a>00109 <span class="preprocessor"></span><span class="preprocessor">#define PX_CODE_ANALYSIS_ASSUME(exp) \</span> +<a name="l00110"></a>00110 <span class="preprocessor"> __analysis_assume(!!(exp)) // This macro will be used to get rid of analysis warning messages if a PX_ASSERT is used</span> +<a name="l00111"></a>00111 <span class="preprocessor"></span> <span class="comment">// to "guard" illegal mem access, for example.</span> +<a name="l00112"></a>00112 <span class="preprocessor">#else</span> +<a name="l00113"></a>00113 <span class="preprocessor"></span><span class="preprocessor">#define PX_CODE_ANALYSIS_ASSUME(exp)</span> +<a name="l00114"></a>00114 <span class="preprocessor"></span><span class="preprocessor">#endif</span> +<a name="l00115"></a>00115 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT(exp) \</span> +<a name="l00116"></a>00116 <span class="preprocessor"> { \</span> +<a name="l00117"></a>00117 <span class="preprocessor"> static bool _ignore = false; \</span> +<a name="l00118"></a>00118 <span class="preprocessor"> ((void)((!!(exp)) || (!_ignore && ((*nv::cloth::GetNvClothAssertHandler())(#exp, __FILE__, __LINE__, _ignore), false)))); \</span> +<a name="l00119"></a>00119 <span class="preprocessor"> PX_CODE_ANALYSIS_ASSUME(exp); \</span> +<a name="l00120"></a>00120 <span class="preprocessor"> }</span> +<a name="l00121"></a>00121 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) \</span> +<a name="l00122"></a>00122 <span class="preprocessor"> { \</span> +<a name="l00123"></a>00123 <span class="preprocessor"> static bool _ignore = false; \</span> +<a name="l00124"></a>00124 <span class="preprocessor"> ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); \</span> +<a name="l00125"></a>00125 <span class="preprocessor"> PX_CODE_ANALYSIS_ASSUME(exp); \</span> +<a name="l00126"></a>00126 <span class="preprocessor"> }</span> +<a name="l00127"></a>00127 <span class="preprocessor"></span><span class="preprocessor">#endif</span> +<a name="l00128"></a>00128 <span class="preprocessor"></span> +<a name="l00129"></a>00129 <span class="comment">//Profiler</span> +<a name="l00130"></a>00130 physx::PxProfilerCallback* GetNvClothProfiler(); <span class="comment">//Only use internally</span> +<a name="l00131"></a>00131 <span class="preprocessor">#if PX_DEBUG || PX_CHECKED || PX_PROFILE || 1</span> +<a name="l00132"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">00132</a> <span class="preprocessor"></span><span class="keyword">class </span><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">NvClothProfileScoped</a> +<a name="l00133"></a>00133 { +<a name="l00134"></a>00134 <span class="keyword">public</span>: +<a name="l00135"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#eb4cd36d11aa03f05d05a6f18f8b41cb">00135</a> PX_FORCE_INLINE <a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">NvClothProfileScoped</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* eventName, <span class="keywordtype">bool</span> detached, uint64_t contextId, +<a name="l00136"></a>00136 <span class="keyword">const</span> <span class="keywordtype">char</span>* fileName, <span class="keywordtype">int</span> lineno, physx::PxProfilerCallback* callback) +<a name="l00137"></a>00137 : mCallback(callback) +<a name="l00138"></a>00138 { +<a name="l00139"></a>00139 PX_UNUSED(fileName); +<a name="l00140"></a>00140 PX_UNUSED(lineno); +<a name="l00141"></a>00141 mProfilerData = NULL; <span class="comment">//nullptr doesn't work here on mac</span> +<a name="l00142"></a>00142 <span class="keywordflow">if</span> (mCallback) +<a name="l00143"></a>00143 { +<a name="l00144"></a>00144 mEventName = eventName; +<a name="l00145"></a>00145 mDetached = detached; +<a name="l00146"></a>00146 mContextId = contextId; +<a name="l00147"></a>00147 mProfilerData = mCallback->zoneStart(mEventName, mDetached, mContextId); +<a name="l00148"></a>00148 } +<a name="l00149"></a>00149 } +<a name="l00150"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#803ffc5af708346f086454ca7c6948d9">00150</a> ~<a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html">NvClothProfileScoped</a>(<span class="keywordtype">void</span>) +<a name="l00151"></a>00151 { +<a name="l00152"></a>00152 <span class="keywordflow">if</span> (mCallback) +<a name="l00153"></a>00153 { +<a name="l00154"></a>00154 mCallback->zoneEnd(mProfilerData, mEventName, mDetached, mContextId); +<a name="l00155"></a>00155 } +<a name="l00156"></a>00156 } +<a name="l00157"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#561c535d463cb4ef349db1b13b52761b">00157</a> physx::PxProfilerCallback* mCallback; +<a name="l00158"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#e4bae4fa99fd522f226143f9b7f8a0fb">00158</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* mEventName; +<a name="l00159"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#3a008841539b432550e139510d84d987">00159</a> <span class="keywordtype">bool</span> mDetached; +<a name="l00160"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#dbbaf92e01e8d8cd7c2a80242a60c5a3">00160</a> uint64_t mContextId; +<a name="l00161"></a><a class="code" href="classnv_1_1cloth_1_1_nv_cloth_profile_scoped.html#45731a72d188fd61afab53f65793ae6b">00161</a> <span class="keywordtype">void</span>* mProfilerData; +<a name="l00162"></a>00162 }; +<a name="l00163"></a>00163 +<a name="l00164"></a><a class="code" href="_callbacks_8h.html#07a777d717c8c0eb9d8ae6d1b5db94ee">00164</a> <span class="preprocessor">#define NV_CLOTH_PROFILE_ZONE(x, y) \</span> +<a name="l00165"></a>00165 <span class="preprocessor"> nv::cloth::NvClothProfileScoped PX_CONCAT(_scoped, __LINE__)(x, false, y, __FILE__, __LINE__, nv::cloth::GetNvClothProfiler())</span> +<a name="l00166"></a><a class="code" href="_callbacks_8h.html#d31f06d741b7e7340058e66b64e8d1da">00166</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_START_CROSSTHREAD(x, y) \</span> +<a name="l00167"></a>00167 <span class="preprocessor"> (GetNvClothProfiler()!=nullptr? \</span> +<a name="l00168"></a>00168 <span class="preprocessor"> GetNvClothProfiler()->zoneStart(x, true, y):nullptr)</span> +<a name="l00169"></a><a class="code" href="_callbacks_8h.html#5c4305c0f359cd51e90391ce3847d4de">00169</a> <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_STOP_CROSSTHREAD(profilerData, x, y) \</span> +<a name="l00170"></a>00170 <span class="preprocessor"> if (GetNvClothProfiler()) \</span> +<a name="l00171"></a>00171 <span class="preprocessor"> GetNvClothProfiler()->zoneEnd(profilerData, x, true, y)</span> +<a name="l00172"></a>00172 <span class="preprocessor"></span><span class="preprocessor">#else</span> +<a name="l00173"></a>00173 <span class="preprocessor"></span> +<a name="l00174"></a>00174 <span class="preprocessor">#define NV_CLOTH_PROFILE_ZONE(x, y)</span> +<a name="l00175"></a>00175 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_START_CROSSTHREAD(x, y) nullptr</span> +<a name="l00176"></a>00176 <span class="preprocessor"></span><span class="preprocessor">#define NV_CLOTH_PROFILE_STOP_CROSSTHREAD(profilerData, x, y)</span> +<a name="l00177"></a>00177 <span class="preprocessor"></span> +<a name="l00178"></a>00178 <span class="preprocessor">#endif</span> +<a name="l00179"></a>00179 <span class="preprocessor"></span> +<a name="l00180"></a>00180 } +<a name="l00181"></a>00181 } </pre></div></div> <!-- start footer part --> <div class="footer"> diff --git a/NvCloth/docs/doxy/files/_callbacks_8h.html b/NvCloth/docs/doxy/files/_callbacks_8h.html index 4185e88..7d769e2 100644 --- a/NvCloth/docs/doxy/files/_callbacks_8h.html +++ b/NvCloth/docs/doxy/files/_callbacks_8h.html @@ -53,6 +53,8 @@ <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_callbacks_8h.html#95d1d44fde08004dd6fa0be04be6a445">NV_CLOTH_ASSERT</a>(exp) ((void)0)</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_callbacks_8h.html#7580256d644389afb1a6fbf123cd9747">NV_CLOTH_ASSERT_WITH_MESSAGE</a>(message, exp) ((void)0)</td></tr> + <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_callbacks_8h.html#0a1f306c4d84c8362b056e8fd313629a">NV_CLOTH_CALL_CONV</a> PX_CALL_CONV</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_callbacks_8h.html#d43b3e4b2ee5d1c328c332ee9d1666e2">NV_CLOTH_DLL_ID</a> 0x2</td></tr> @@ -144,6 +146,29 @@ Initialize the callbacks with InitializeNvCloth(...) before using any other NvCl </div> </div><p> +<a class="anchor" name="7580256d644389afb1a6fbf123cd9747"></a><!-- doxytag: member="Callbacks.h::NV_CLOTH_ASSERT_WITH_MESSAGE" ref="7580256d644389afb1a6fbf123cd9747" args="(message, exp)" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">#define NV_CLOTH_ASSERT_WITH_MESSAGE </td> + <td>(</td> + <td class="paramtype">message, <tr> + <td class="paramkey"></td> + <td></td> + <td class="paramtype">exp </td> + <td class="paramname"> </td> + <td> ) </td> + <td> ((void)0)</td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> + +</div> +</div><p> <a class="anchor" name="0a1f306c4d84c8362b056e8fd313629a"></a><!-- doxytag: member="Callbacks.h::NV_CLOTH_CALL_CONV" ref="0a1f306c4d84c8362b056e8fd313629a" args="" --> <div class="memitem"> <div class="memproto"> diff --git a/NvCloth/docs/doxy/files/_cloth_8h-source.html b/NvCloth/docs/doxy/files/_cloth_8h-source.html index b2b35d5..eab5c96 100644 --- a/NvCloth/docs/doxy/files/_cloth_8h-source.html +++ b/NvCloth/docs/doxy/files/_cloth_8h-source.html @@ -286,61 +286,63 @@ <a name="l00374"></a>00374 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#16b04df700089098bb956fcdc30e77b4" title="Returns value set with setDragCoefficient().">getDragCoefficient</a>() <span class="keyword">const</span> = 0; <a name="l00376"></a>00376 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#17b5a40330eb57bdc495a2eb0d713193" title="/brief Sets the air lift coefficient.">setLiftCoefficient</a>(<span class="keywordtype">float</span>) = 0; <a name="l00378"></a>00378 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#2dbaaaa013d7c69902c9d5eaa98f6af9" title="Returns value set with setLiftCoefficient().">getLiftCoefficient</a>() <span class="keyword">const</span> = 0; -<a name="l00379"></a>00379 -<a name="l00380"></a>00380 <span class="comment">/* self collision */</span> -<a name="l00381"></a>00381 -<a name="l00383"></a>00383 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#8677510130ff4438306d20a413abd5d8" title="/brief Set the distance particles need to be separated from each other withing the...">setSelfCollisionDistance</a>(<span class="keywordtype">float</span> distance) = 0; -<a name="l00385"></a>00385 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#064c442c7588405581006d72aa3d88f9" title="Returns value set with setSelfCollisionDistance().">getSelfCollisionDistance</a>() <span class="keyword">const</span> = 0; -<a name="l00387"></a>00387 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#b9988307f35da068e3d2ff08b56d95a1" title="/brief Set the constraint stiffness for the self collision constraints.">setSelfCollisionStiffness</a>(<span class="keywordtype">float</span> stiffness) = 0; -<a name="l00389"></a>00389 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#209dae86682049c944b9c2ba41aeb0bf" title="Returns value set with setSelfCollisionStiffness().">getSelfCollisionStiffness</a>() <span class="keyword">const</span> = 0; -<a name="l00390"></a>00390 -<a name="l00391"></a>00391 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#e77122c9d483539afe4b944429d5d464">setSelfCollisionIndices</a>(<a class="code" href="structnv_1_1cloth_1_1_range.html">Range<const uint32_t></a>) = 0; -<a name="l00392"></a>00392 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#44b430eff88a119b5242e5ed87722ee0">getNumSelfCollisionIndices</a>() <span class="keyword">const</span> = 0; -<a name="l00393"></a>00393 -<a name="l00394"></a>00394 <span class="comment">/* rest positions */</span> -<a name="l00395"></a>00395 -<a name="l00396"></a>00396 <span class="comment">// set rest particle positions used during self-collision</span> -<a name="l00397"></a>00397 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#263e8beebed6fb96f06bf2688a15ad1c">setRestPositions</a>(<a class="code" href="structnv_1_1cloth_1_1_range.html">Range<const physx::PxVec4></a>) = 0; -<a name="l00398"></a>00398 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#6549b36b76a8269864c695d3b77aae63">getNumRestPositions</a>() <span class="keyword">const</span> = 0; -<a name="l00399"></a>00399 -<a name="l00400"></a>00400 <span class="comment">/* bounding box */</span> -<a name="l00401"></a>00401 -<a name="l00403"></a>00403 <span class="keyword">virtual</span> <span class="keyword">const</span> physx::PxVec3& <a class="code" href="classnv_1_1cloth_1_1_cloth.html#6b0c89213073d0a58f2309b4c0526c7d" title="Returns current particle position bounds center in local space.">getBoundingBoxCenter</a>() <span class="keyword">const</span> = 0; -<a name="l00405"></a>00405 <span class="keyword">virtual</span> <span class="keyword">const</span> physx::PxVec3& <a class="code" href="classnv_1_1cloth_1_1_cloth.html#4b16c7cedaecc35b5d722040b28f7bdf" title="Returns current particle position bounds size in local space.">getBoundingBoxScale</a>() <span class="keyword">const</span> = 0; -<a name="l00406"></a>00406 -<a name="l00407"></a>00407 <span class="comment">/* sleeping (disabled by default) */</span> +<a name="l00380"></a>00380 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752" title="/brief Sets the fluid density used for air drag/lift calculations.">setFluidDensity</a>(<span class="keywordtype">float</span>) = 0; +<a name="l00382"></a>00382 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#31aeac4d22831073a79d2b6da53c17ae" title="Returns value set with setFluidDensity().">getFluidDensity</a>() <span class="keyword">const</span> = 0; +<a name="l00383"></a>00383 +<a name="l00384"></a>00384 <span class="comment">/* self collision */</span> +<a name="l00385"></a>00385 +<a name="l00387"></a>00387 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#8677510130ff4438306d20a413abd5d8" title="/brief Set the distance particles need to be separated from each other withing the...">setSelfCollisionDistance</a>(<span class="keywordtype">float</span> distance) = 0; +<a name="l00389"></a>00389 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#064c442c7588405581006d72aa3d88f9" title="Returns value set with setSelfCollisionDistance().">getSelfCollisionDistance</a>() <span class="keyword">const</span> = 0; +<a name="l00391"></a>00391 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#b9988307f35da068e3d2ff08b56d95a1" title="/brief Set the constraint stiffness for the self collision constraints.">setSelfCollisionStiffness</a>(<span class="keywordtype">float</span> stiffness) = 0; +<a name="l00393"></a>00393 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#209dae86682049c944b9c2ba41aeb0bf" title="Returns value set with setSelfCollisionStiffness().">getSelfCollisionStiffness</a>() <span class="keyword">const</span> = 0; +<a name="l00394"></a>00394 +<a name="l00399"></a>00399 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#e77122c9d483539afe4b944429d5d464" title="Set self collision indices.">setSelfCollisionIndices</a>(<a class="code" href="structnv_1_1cloth_1_1_range.html">Range<const uint32_t></a>) = 0; +<a name="l00401"></a>00401 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#44b430eff88a119b5242e5ed87722ee0" title="Returns the number of self collision indices set.">getNumSelfCollisionIndices</a>() <span class="keyword">const</span> = 0; +<a name="l00402"></a>00402 +<a name="l00403"></a>00403 <span class="comment">/* rest positions */</span> +<a name="l00404"></a>00404 +<a name="l00405"></a>00405 <span class="comment">// set rest particle positions used during self-collision</span> +<a name="l00406"></a>00406 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#263e8beebed6fb96f06bf2688a15ad1c">setRestPositions</a>(<a class="code" href="structnv_1_1cloth_1_1_range.html">Range<const physx::PxVec4></a>) = 0; +<a name="l00407"></a>00407 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#6549b36b76a8269864c695d3b77aae63">getNumRestPositions</a>() <span class="keyword">const</span> = 0; <a name="l00408"></a>00408 -<a name="l00409"></a>00409 <span class="comment">// max particle velocity (per axis) to pass sleep test</span> -<a name="l00410"></a>00410 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#1a34c62e0891496b949194556dc729f1">setSleepThreshold</a>(<span class="keywordtype">float</span>) = 0; -<a name="l00411"></a>00411 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#2bd353debfdb900979395fe8870df1bf">getSleepThreshold</a>() <span class="keyword">const</span> = 0; -<a name="l00412"></a>00412 <span class="comment">// test sleep condition every nth millisecond</span> -<a name="l00413"></a>00413 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#de65cf56e6b20d5a44a222b9e28ecf2f">setSleepTestInterval</a>(uint32_t) = 0; -<a name="l00414"></a>00414 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#6313c4680c883d3bb6e20632ebde1ab8">getSleepTestInterval</a>() <span class="keyword">const</span> = 0; -<a name="l00415"></a>00415 <span class="comment">// put cloth to sleep when n consecutive sleep tests pass</span> -<a name="l00416"></a>00416 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#7ef6797d557a31d9380835d26a894f15">setSleepAfterCount</a>(uint32_t) = 0; -<a name="l00417"></a>00417 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#a3be62e917066f2f29f64320c8286893">getSleepAfterCount</a>() <span class="keyword">const</span> = 0; -<a name="l00418"></a>00418 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#7a07e21a9b99dd3eab429569c77eac1c">getSleepPassCount</a>() <span class="keyword">const</span> = 0; -<a name="l00419"></a>00419 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#21e5c91983c11511600cfefd68be49f9">isAsleep</a>() <span class="keyword">const</span> = 0; -<a name="l00420"></a>00420 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#21da17df59669e7a2b670823400e740b">putToSleep</a>() = 0; -<a name="l00421"></a>00421 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#4294ed2b0a515600e9448264cc0377e3">wakeUp</a>() = 0; -<a name="l00422"></a>00422 -<a name="l00424"></a>00424 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#e7c0b099e90d409a65ee14d6f77e57c5" title="Set user data.">setUserData</a>(<span class="keywordtype">void</span>*) = 0; -<a name="l00425"></a>00425 <span class="comment">// Returns value set by setUserData().</span> -<a name="l00426"></a>00426 <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="classnv_1_1cloth_1_1_cloth.html#91e02303afccc55bba87886c1187002b">getUserData</a>() <span class="keyword">const</span> = 0; -<a name="l00427"></a>00427 }; -<a name="l00428"></a>00428 -<a name="l00429"></a>00429 <span class="comment">// wrappers to prevent non-const overload from marking particles dirty</span> -<a name="l00430"></a>00430 <span class="keyword">inline</span> MappedRange<const physx::PxVec4> readCurrentParticles(<span class="keyword">const</span> Cloth& cloth) -<a name="l00431"></a>00431 { -<a name="l00432"></a>00432 <span class="keywordflow">return</span> cloth.getCurrentParticles(); -<a name="l00433"></a>00433 } -<a name="l00434"></a>00434 <span class="keyword">inline</span> MappedRange<const physx::PxVec4> readPreviousParticles(<span class="keyword">const</span> Cloth& cloth) -<a name="l00435"></a>00435 { -<a name="l00436"></a>00436 <span class="keywordflow">return</span> cloth.getPreviousParticles(); -<a name="l00437"></a>00437 } -<a name="l00438"></a>00438 -<a name="l00439"></a>00439 } <span class="comment">// namespace cloth</span> -<a name="l00440"></a>00440 } <span class="comment">// namespace nv</span> +<a name="l00409"></a>00409 <span class="comment">/* bounding box */</span> +<a name="l00410"></a>00410 +<a name="l00412"></a>00412 <span class="keyword">virtual</span> <span class="keyword">const</span> physx::PxVec3& <a class="code" href="classnv_1_1cloth_1_1_cloth.html#6b0c89213073d0a58f2309b4c0526c7d" title="Returns current particle position bounds center in local space.">getBoundingBoxCenter</a>() <span class="keyword">const</span> = 0; +<a name="l00414"></a>00414 <span class="keyword">virtual</span> <span class="keyword">const</span> physx::PxVec3& <a class="code" href="classnv_1_1cloth_1_1_cloth.html#4b16c7cedaecc35b5d722040b28f7bdf" title="Returns current particle position bounds size in local space.">getBoundingBoxScale</a>() <span class="keyword">const</span> = 0; +<a name="l00415"></a>00415 +<a name="l00416"></a>00416 <span class="comment">/* sleeping (disabled by default) */</span> +<a name="l00417"></a>00417 +<a name="l00418"></a>00418 <span class="comment">// max particle velocity (per axis) to pass sleep test</span> +<a name="l00419"></a>00419 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#1a34c62e0891496b949194556dc729f1">setSleepThreshold</a>(<span class="keywordtype">float</span>) = 0; +<a name="l00420"></a>00420 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#2bd353debfdb900979395fe8870df1bf">getSleepThreshold</a>() <span class="keyword">const</span> = 0; +<a name="l00421"></a>00421 <span class="comment">// test sleep condition every nth millisecond</span> +<a name="l00422"></a>00422 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#de65cf56e6b20d5a44a222b9e28ecf2f">setSleepTestInterval</a>(uint32_t) = 0; +<a name="l00423"></a>00423 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#6313c4680c883d3bb6e20632ebde1ab8">getSleepTestInterval</a>() <span class="keyword">const</span> = 0; +<a name="l00424"></a>00424 <span class="comment">// put cloth to sleep when n consecutive sleep tests pass</span> +<a name="l00425"></a>00425 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#7ef6797d557a31d9380835d26a894f15">setSleepAfterCount</a>(uint32_t) = 0; +<a name="l00426"></a>00426 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#a3be62e917066f2f29f64320c8286893">getSleepAfterCount</a>() <span class="keyword">const</span> = 0; +<a name="l00427"></a>00427 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_cloth.html#7a07e21a9b99dd3eab429569c77eac1c">getSleepPassCount</a>() <span class="keyword">const</span> = 0; +<a name="l00428"></a>00428 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#21e5c91983c11511600cfefd68be49f9">isAsleep</a>() <span class="keyword">const</span> = 0; +<a name="l00429"></a>00429 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#21da17df59669e7a2b670823400e740b">putToSleep</a>() = 0; +<a name="l00430"></a>00430 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#4294ed2b0a515600e9448264cc0377e3">wakeUp</a>() = 0; +<a name="l00431"></a>00431 +<a name="l00433"></a>00433 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html#e7c0b099e90d409a65ee14d6f77e57c5" title="Set user data.">setUserData</a>(<span class="keywordtype">void</span>*) = 0; +<a name="l00434"></a>00434 <span class="comment">// Returns value set by setUserData().</span> +<a name="l00435"></a>00435 <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="classnv_1_1cloth_1_1_cloth.html#91e02303afccc55bba87886c1187002b">getUserData</a>() <span class="keyword">const</span> = 0; +<a name="l00436"></a>00436 }; +<a name="l00437"></a>00437 +<a name="l00438"></a>00438 <span class="comment">// wrappers to prevent non-const overload from marking particles dirty</span> +<a name="l00439"></a>00439 <span class="keyword">inline</span> MappedRange<const physx::PxVec4> readCurrentParticles(<span class="keyword">const</span> Cloth& cloth) +<a name="l00440"></a>00440 { +<a name="l00441"></a>00441 <span class="keywordflow">return</span> cloth.getCurrentParticles(); +<a name="l00442"></a>00442 } +<a name="l00443"></a>00443 <span class="keyword">inline</span> MappedRange<const physx::PxVec4> readPreviousParticles(<span class="keyword">const</span> Cloth& cloth) +<a name="l00444"></a>00444 { +<a name="l00445"></a>00445 <span class="keywordflow">return</span> cloth.getPreviousParticles(); +<a name="l00446"></a>00446 } +<a name="l00447"></a>00447 +<a name="l00448"></a>00448 } <span class="comment">// namespace cloth</span> +<a name="l00449"></a>00449 } <span class="comment">// namespace nv</span> </pre></div></div> <!-- start footer part --> <div class="footer"> diff --git a/NvCloth/docs/doxy/files/_cloth_mesh_desc_8h-source.html b/NvCloth/docs/doxy/files/_cloth_mesh_desc_8h-source.html index 718904e..5d01fcc 100644 --- a/NvCloth/docs/doxy/files/_cloth_mesh_desc_8h-source.html +++ b/NvCloth/docs/doxy/files/_cloth_mesh_desc_8h-source.html @@ -126,7 +126,7 @@ <a name="l00159"></a>00159 PX_INLINE <span class="keywordtype">bool</span> isValid() <span class="keyword">const</span>; <a name="l00160"></a>00160 }; <a name="l00161"></a>00161 -<a name="l00162"></a><a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e475fee21a2442dd86f30d836a6ad1af">00162</a> PX_INLINE <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e475fee21a2442dd86f30d836a6ad1af" title="constructor sets to default.">ClothMeshDesc::ClothMeshDesc</a>() <span class="comment">//constructor sets to default</span> +<a name="l00162"></a><a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e475fee21a2442dd86f30d836a6ad1af">00162</a> PX_INLINE <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e475fee21a2442dd86f30d836a6ad1af" title="constructor sets to default.">ClothMeshDesc::ClothMeshDesc</a>() <a name="l00163"></a>00163 { <a name="l00164"></a>00164 <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e87cb1303f9939d674b448657abd434a" title="Flags bits, combined from values of the enum MeshFlag.">flags</a> = 0; <a name="l00165"></a>00165 } @@ -138,20 +138,20 @@ <a name="l00171"></a>00171 <a name="l00172"></a><a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#3dbb3dc26cddbdf72c5455a485f0a4f4">00172</a> PX_INLINE <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#3dbb3dc26cddbdf72c5455a485f0a4f4" title="Returns true if the descriptor is valid.">ClothMeshDesc::isValid</a>()<span class="keyword"> const</span> <a name="l00173"></a>00173 <span class="keyword"></span>{ -<a name="l00174"></a>00174 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> < 3) <span class="comment">//at least 1 trig's worth of points</span> +<a name="l00174"></a>00174 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> < 3) <span class="comment">// at least 1 triangle</span> <a name="l00175"></a>00175 <span class="keywordflow">return</span> <span class="keyword">false</span>; -<a name="l00176"></a>00176 <span class="keywordflow">if</span>((<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#035d7ca18e3feef858f273e0afe16598" title="Pointer to first stiffness value in stiffnes per vertex array.">pointsStiffness</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> != <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a>) && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#035d7ca18e3feef858f273e0afe16598" title="Pointer to first stiffness value in stiffnes per vertex array.">pointsStiffness</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> != 0) -<a name="l00177"></a>00177 <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">//Either all or none of the points can have stiffness information</span> -<a name="l00178"></a>00178 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> > 0xffff && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e87cb1303f9939d674b448657abd434a" title="Flags bits, combined from values of the enum MeshFlag.">flags</a> & <a class="code" href="structnv_1_1cloth_1_1_mesh_flag.html#204e0a905a94be6c3f33d82941329489ce9385a0c5594cbf4f7de7e76d993d93" title="Denotes the use of 16-bit vertex indices.">MeshFlag::e16_BIT_INDICES</a>) +<a name="l00176"></a>00176 <span class="keywordflow">if</span> ((<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#035d7ca18e3feef858f273e0afe16598" title="Pointer to first stiffness value in stiffnes per vertex array.">pointsStiffness</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> != <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a>) && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#035d7ca18e3feef858f273e0afe16598" title="Pointer to first stiffness value in stiffnes per vertex array.">pointsStiffness</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> != 0) +<a name="l00177"></a>00177 <span class="keywordflow">return</span> <span class="keyword">false</span>; <span class="comment">// either all or none of the points can have stiffness information</span> +<a name="l00178"></a>00178 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> > 0xffff && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e87cb1303f9939d674b448657abd434a" title="Flags bits, combined from values of the enum MeshFlag.">flags</a> & <a class="code" href="structnv_1_1cloth_1_1_mesh_flag.html#204e0a905a94be6c3f33d82941329489ce9385a0c5594cbf4f7de7e76d993d93" title="Denotes the use of 16-bit vertex indices.">MeshFlag::e16_BIT_INDICES</a>) <a name="l00179"></a>00179 <span class="keywordflow">return</span> <span class="keyword">false</span>; -<a name="l00180"></a>00180 <span class="keywordflow">if</span>(!<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#73e438c8aa4c46710a7f5933f131f5e1">data</a>) +<a name="l00180"></a>00180 <span class="keywordflow">if</span> (!<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#73e438c8aa4c46710a7f5933f131f5e1">data</a>) <a name="l00181"></a>00181 <span class="keywordflow">return</span> <span class="keyword">false</span>; -<a name="l00182"></a>00182 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < <span class="keyword">sizeof</span>(physx::PxVec3)) <span class="comment">//should be at least one point's worth of data</span> +<a name="l00182"></a>00182 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < <span class="keyword">sizeof</span>(physx::PxVec3)) <span class="comment">// should be at least one point</span> <a name="l00183"></a>00183 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00184"></a>00184 -<a name="l00185"></a>00185 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#73e438c8aa4c46710a7f5933f131f5e1">data</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < <span class="keyword">sizeof</span>(<span class="keywordtype">float</span>)) +<a name="l00185"></a>00185 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#73e438c8aa4c46710a7f5933f131f5e1">data</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < <span class="keyword">sizeof</span>(<span class="keywordtype">float</span>)) <a name="l00186"></a>00186 <span class="keywordflow">return</span> <span class="keyword">false</span>; -<a name="l00187"></a>00187 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#73e438c8aa4c46710a7f5933f131f5e1">data</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> != <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a>) +<a name="l00187"></a>00187 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#73e438c8aa4c46710a7f5933f131f5e1">data</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#73d92bee06c06b6748f1726990ca20de" title="Determines whether particle is simulated or static.">invMasses</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> != <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#1e8ccce29d38eb316537a4a24eb76855" title="Pointer to first vertex point.">points</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a>) <a name="l00188"></a>00188 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="keywordflow">if</span> (!<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e4517fa952e6cf3ac848b1b7bc67714e" title="Pointer to the first triangle.">triangles</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> && !<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#791bdd04c451e10b0155563766b25cdb" title="Pointer to the first quad.">quads</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a>) <span class="comment">// no support for non-indexed mesh</span> @@ -162,9 +162,9 @@ <a name="l00195"></a>00195 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00196"></a>00196 <a name="l00197"></a>00197 physx::PxU32 indexSize = (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e87cb1303f9939d674b448657abd434a" title="Flags bits, combined from values of the enum MeshFlag.">flags</a> & MeshFlag::e16_BIT_INDICES) ? <span class="keyword">sizeof</span>(physx::PxU16) : <span class="keyword">sizeof</span>(physx::PxU32); -<a name="l00198"></a>00198 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e4517fa952e6cf3ac848b1b7bc67714e" title="Pointer to the first triangle.">triangles</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e4517fa952e6cf3ac848b1b7bc67714e" title="Pointer to the first triangle.">triangles</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < indexSize*3) +<a name="l00198"></a>00198 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e4517fa952e6cf3ac848b1b7bc67714e" title="Pointer to the first triangle.">triangles</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#e4517fa952e6cf3ac848b1b7bc67714e" title="Pointer to the first triangle.">triangles</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < indexSize*3) <a name="l00199"></a>00199 <span class="keywordflow">return</span> <span class="keyword">false</span>; -<a name="l00200"></a>00200 <span class="keywordflow">if</span>(<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#791bdd04c451e10b0155563766b25cdb" title="Pointer to the first quad.">quads</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#791bdd04c451e10b0155563766b25cdb" title="Pointer to the first quad.">quads</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < indexSize*4) +<a name="l00200"></a>00200 <span class="keywordflow">if</span> (<a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#791bdd04c451e10b0155563766b25cdb" title="Pointer to the first quad.">quads</a>.<a class="code" href="structnv_1_1cloth_1_1_bounded_data.html#e13bda6410e1f7a793d23c3492e1507b">count</a> && <a class="code" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#791bdd04c451e10b0155563766b25cdb" title="Pointer to the first quad.">quads</a>.<a class="code" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba" title="The offset in bytes between consecutive samples in the data.">stride</a> < indexSize*4) <a name="l00201"></a>00201 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00202"></a>00202 <a name="l00203"></a>00203 <span class="keywordflow">return</span> <span class="keyword">true</span>; diff --git a/NvCloth/docs/doxy/files/_solver_8h-source.html b/NvCloth/docs/doxy/files/_solver_8h-source.html index 059204a..5f9fd48 100644 --- a/NvCloth/docs/doxy/files/_solver_8h-source.html +++ b/NvCloth/docs/doxy/files/_solver_8h-source.html @@ -65,54 +65,59 @@ <a name="l00030"></a>00030 <span class="preprocessor">#pragma once</span> <a name="l00031"></a>00031 <span class="preprocessor"></span> <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="_allocator_8h.html" title="This file together with Callbacks.h define most memory management interfaces for...">NvCloth/Allocator.h</a>"</span> -<a name="l00033"></a>00033 -<a name="l00034"></a>00034 <span class="keyword">namespace </span>nv -<a name="l00035"></a>00035 { -<a name="l00036"></a>00036 <span class="keyword">namespace </span>cloth -<a name="l00037"></a>00037 { -<a name="l00038"></a>00038 -<a name="l00039"></a>00039 <span class="keyword">class </span>Cloth; -<a name="l00040"></a>00040 -<a name="l00041"></a>00041 <span class="comment">// called during inter-collision, user0 and user1 are the user data from each cloth</span> -<a name="l00042"></a>00042 <span class="keyword">typedef</span> bool (*InterCollisionFilter)(<span class="keywordtype">void</span>* user0, <span class="keywordtype">void</span>* user1); -<a name="l00043"></a>00043 -<a name="l00045"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html">00045</a> <span class="keyword">class </span><a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a> : <span class="keyword">public</span> UserAllocated -<a name="l00046"></a>00046 { -<a name="l00047"></a>00047 <span class="keyword">protected</span>: -<a name="l00048"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">00048</a> <a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">Solver</a>() {} -<a name="l00049"></a>00049 <a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">Solver</a>(<span class="keyword">const</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>&); -<a name="l00050"></a>00050 <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>& <a class="code" href="classnv_1_1cloth_1_1_solver.html#0bc438b310a4989a96c426c83a1e0beb">operator = </a>(<span class="keyword">const</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>&); -<a name="l00051"></a>00051 -<a name="l00052"></a>00052 <span class="keyword">public</span>: -<a name="l00053"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html#4830e23f5fbaa9dfa7c8c0ce32fa85bd">00053</a> <span class="keyword">virtual</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#4830e23f5fbaa9dfa7c8c0ce32fa85bd">~Solver</a>() {} -<a name="l00054"></a>00054 -<a name="l00056"></a>00056 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#9f2265058804d818c00653af1edb554d" title="Adds cloth object, returns true if successful.">addCloth</a>(<a class="code" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a>*) = 0; -<a name="l00057"></a>00057 -<a name="l00059"></a>00059 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#c28839d9a9fbe39e5adcab44cc00fe96" title="Removes cloth object.">removeCloth</a>(<a class="code" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a>*) = 0; -<a name="l00060"></a>00060 -<a name="l00061"></a>00061 <span class="comment">// functions executing the simulation work.</span> -<a name="l00067"></a>00067 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#d2efbe447bf07138c615973c349ab839" title="Begins a simulation frame.">beginSimulation</a>(<span class="keywordtype">float</span> dt) = 0; -<a name="l00068"></a>00068 -<a name="l00074"></a>00074 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#62d209d861c8f5aa0523536d851de093" title="Do the computationally heavy part of the simulation.">simulateChunk</a>(<span class="keywordtype">int</span> idx) = 0; +<a name="l00033"></a>00033 <span class="preprocessor">#include "PsArray.h"</span> +<a name="l00034"></a>00034 +<a name="l00035"></a>00035 <span class="keyword">namespace </span>nv +<a name="l00036"></a>00036 { +<a name="l00037"></a>00037 <span class="keyword">namespace </span>cloth +<a name="l00038"></a>00038 { +<a name="l00039"></a>00039 +<a name="l00040"></a>00040 <span class="keyword">class </span>Cloth; +<a name="l00041"></a>00041 +<a name="l00042"></a>00042 <span class="comment">// called during inter-collision, user0 and user1 are the user data from each cloth</span> +<a name="l00043"></a>00043 <span class="keyword">typedef</span> bool (*InterCollisionFilter)(<span class="keywordtype">void</span>* user0, <span class="keywordtype">void</span>* user1); +<a name="l00044"></a>00044 +<a name="l00046"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html">00046</a> <span class="keyword">class </span><a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a> : <span class="keyword">public</span> UserAllocated +<a name="l00047"></a>00047 { +<a name="l00048"></a>00048 <span class="keyword">protected</span>: +<a name="l00049"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">00049</a> <a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">Solver</a>() {} +<a name="l00050"></a>00050 <a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">Solver</a>(<span class="keyword">const</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>&); +<a name="l00051"></a>00051 <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>& <a class="code" href="classnv_1_1cloth_1_1_solver.html#0bc438b310a4989a96c426c83a1e0beb">operator = </a>(<span class="keyword">const</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>&); +<a name="l00052"></a>00052 +<a name="l00053"></a>00053 <span class="keyword">public</span>: +<a name="l00054"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html#4830e23f5fbaa9dfa7c8c0ce32fa85bd">00054</a> <span class="keyword">virtual</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#4830e23f5fbaa9dfa7c8c0ce32fa85bd">~Solver</a>() {} +<a name="l00055"></a>00055 +<a name="l00057"></a>00057 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#63e732712c5a43c44e6018cca6c1fb82" title="Adds cloth object.">addCloth</a>(<a class="code" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a>* cloth) = 0; +<a name="l00058"></a>00058 +<a name="l00060"></a>00060 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#1ed765a15ab2dabbb5186d14bc5f70b1" title="Removes cloth object.">removeCloth</a>(<a class="code" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a>* cloth) = 0; +<a name="l00061"></a>00061 +<a name="l00063"></a>00063 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#de377e651711ebbb9e70f928cbb682e2" title="Returns the numer of cloths added to the solver.">getNumCloths</a>() <span class="keyword">const</span> = 0; +<a name="l00064"></a>00064 +<a name="l00066"></a>00066 <span class="keyword">virtual</span> <a class="code" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> * <span class="keyword">const</span> * <a class="code" href="classnv_1_1cloth_1_1_solver.html#a3e121ffbccc07180e08a2387eb4f6ac" title="Returns the pointer to the first cloth added to the solver.">getClothList</a>() <span class="keyword">const</span> = 0; +<a name="l00067"></a>00067 +<a name="l00068"></a>00068 <span class="comment">// functions executing the simulation work.</span> +<a name="l00074"></a>00074 <span class="comment"></span> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#d2efbe447bf07138c615973c349ab839" title="Begins a simulation frame.">beginSimulation</a>(<span class="keywordtype">float</span> dt) = 0; <a name="l00075"></a>00075 -<a name="l00079"></a>00079 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#19d777a3882814910f8a024d92072d48" title="Finishes up the simulation.">endSimulation</a>() = 0; -<a name="l00080"></a>00080 -<a name="l00083"></a>00083 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#54e393ba3b9fd5305385e2f57d3ca165" title="Returns the number of chunks that need to be simulated this frame.">getSimulationChunkCount</a>() <span class="keyword">const</span> = 0; -<a name="l00084"></a>00084 -<a name="l00085"></a>00085 <span class="comment">// inter-collision parameters</span> -<a name="l00086"></a>00086 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#5043adf6727bf66b966de6393e7d67d9">setInterCollisionDistance</a>(<span class="keywordtype">float</span> distance) = 0; -<a name="l00087"></a>00087 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#6a72529d713f46dbd17a5b541aaec6df">getInterCollisionDistance</a>() <span class="keyword">const</span> = 0; -<a name="l00088"></a>00088 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#4f15accbaeff04edbebd31bf7dd9be3e">setInterCollisionStiffness</a>(<span class="keywordtype">float</span> stiffness) = 0; -<a name="l00089"></a>00089 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#09e4be9b50229213a837d00a3f2f6a3f">getInterCollisionStiffness</a>() <span class="keyword">const</span> = 0; -<a name="l00090"></a>00090 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#3046ea1153c1f9decfc161155cc9810b">setInterCollisionNbIterations</a>(uint32_t nbIterations) = 0; -<a name="l00091"></a>00091 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_solver.html#124dc836903890185934c6eaedec2079">getInterCollisionNbIterations</a>() <span class="keyword">const</span> = 0; -<a name="l00092"></a>00092 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#31b3d4d36f2025f10cb04a32e28fada4">setInterCollisionFilter</a>(InterCollisionFilter filter) = 0; -<a name="l00093"></a>00093 -<a name="l00095"></a>00095 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#12a60f43b537d78499e30508bd9a6d3c" title="Returns true if an unrecoverable error has occurred.">hasError</a>() <span class="keyword">const</span> = 0; -<a name="l00096"></a>00096 }; -<a name="l00097"></a>00097 -<a name="l00098"></a>00098 } <span class="comment">// namespace cloth</span> -<a name="l00099"></a>00099 } <span class="comment">// namespace nv</span> +<a name="l00081"></a>00081 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#62d209d861c8f5aa0523536d851de093" title="Do the computationally heavy part of the simulation.">simulateChunk</a>(<span class="keywordtype">int</span> idx) = 0; +<a name="l00082"></a>00082 +<a name="l00086"></a>00086 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#19d777a3882814910f8a024d92072d48" title="Finishes up the simulation.">endSimulation</a>() = 0; +<a name="l00087"></a>00087 +<a name="l00090"></a>00090 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#54e393ba3b9fd5305385e2f57d3ca165" title="Returns the number of chunks that need to be simulated this frame.">getSimulationChunkCount</a>() <span class="keyword">const</span> = 0; +<a name="l00091"></a>00091 +<a name="l00092"></a>00092 <span class="comment">// inter-collision parameters</span> +<a name="l00093"></a>00093 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#5043adf6727bf66b966de6393e7d67d9">setInterCollisionDistance</a>(<span class="keywordtype">float</span> distance) = 0; +<a name="l00094"></a>00094 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#6a72529d713f46dbd17a5b541aaec6df">getInterCollisionDistance</a>() <span class="keyword">const</span> = 0; +<a name="l00095"></a>00095 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#4f15accbaeff04edbebd31bf7dd9be3e">setInterCollisionStiffness</a>(<span class="keywordtype">float</span> stiffness) = 0; +<a name="l00096"></a>00096 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#09e4be9b50229213a837d00a3f2f6a3f">getInterCollisionStiffness</a>() <span class="keyword">const</span> = 0; +<a name="l00097"></a>00097 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#3046ea1153c1f9decfc161155cc9810b">setInterCollisionNbIterations</a>(uint32_t nbIterations) = 0; +<a name="l00098"></a>00098 <span class="keyword">virtual</span> uint32_t <a class="code" href="classnv_1_1cloth_1_1_solver.html#124dc836903890185934c6eaedec2079">getInterCollisionNbIterations</a>() <span class="keyword">const</span> = 0; +<a name="l00099"></a>00099 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#31b3d4d36f2025f10cb04a32e28fada4">setInterCollisionFilter</a>(InterCollisionFilter filter) = 0; +<a name="l00100"></a>00100 +<a name="l00102"></a>00102 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#12a60f43b537d78499e30508bd9a6d3c" title="Returns true if an unrecoverable error has occurred.">hasError</a>() <span class="keyword">const</span> = 0; +<a name="l00103"></a>00103 }; +<a name="l00104"></a>00104 +<a name="l00105"></a>00105 } <span class="comment">// namespace cloth</span> +<a name="l00106"></a>00106 } <span class="comment">// namespace nv</span> </pre></div></div> <!-- start footer part --> <div class="footer"> diff --git a/NvCloth/docs/doxy/files/_solver_8h.html b/NvCloth/docs/doxy/files/_solver_8h.html index 13ddfd5..a42d87e 100644 --- a/NvCloth/docs/doxy/files/_solver_8h.html +++ b/NvCloth/docs/doxy/files/_solver_8h.html @@ -36,6 +36,7 @@ </div> <div class="contents"> <h1>Solver.h File Reference</h1><code>#include "<a class="el" href="_allocator_8h-source.html">NvCloth/Allocator.h</a>"</code><br> +<code>#include "PsArray.h"</code><br> <p> <a href="_solver_8h-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> diff --git a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth-members.html b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth-members.html index 4c2b8b1..0fc2135 100644 --- a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth-members.html +++ b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth-members.html @@ -61,6 +61,7 @@ <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#16b04df700089098bb956fcdc30e77b4">getDragCoefficient</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#14174ed06c234119fd42bbddbaabc5f1">getFabric</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#dfb665fce893853e21ddbd3241685d7f">getFactory</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#31aeac4d22831073a79d2b6da53c17ae">getFluidDensity</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#a2daf756406fd64e1b7b2174eb040367">getFriction</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#8d31c57a119fb853d4ceb1e197b2351a">getGpuParticles</a>()=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#92a76707f82caf33088f23983d5ede03">getGravity</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> @@ -117,6 +118,7 @@ <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#b05513e796029c7562a1ff6fb740e561">setConvexes</a>(Range< const uint32_t > convexMasks, uint32_t first, uint32_t last)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#f1e7d559fd4942d82432aeb6ab477cf6">setDamping</a>(const physx::PxVec3 &)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#fce3065c14afac4e5cf6e93b5d60a007">setDragCoefficient</a>(float)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752">setFluidDensity</a>(float)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#c10abfe96f96b65c9b3a5f37fee68715">setFriction</a>(float)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#0223c7c82b616a6df01d7a4ffb57d916">setGravity</a>(const physx::PxVec3 &)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html#17b5a40330eb57bdc495a2eb0d713193">setLiftCoefficient</a>(float)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_cloth.html">nv::cloth::Cloth</a></td><td><code> [pure virtual]</code></td></tr> diff --git a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth.html b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth.html index c23a1f9..0e30c3f 100644 --- a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth.html +++ b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth.html @@ -103,6 +103,9 @@ physx::PxVec4 > </td><td class="memItemRight" valign="bottom"><a class=" <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classnv_1_1cloth_1_1_factory.html">Factory</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#dfb665fce893853e21ddbd3241685d7f">getFactory</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the <a class="el" href="classnv_1_1cloth_1_1_factory.html" title="abstract factory to create context-specific simulation components such as cloth,...">Factory</a> used to create this <a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a>. <a href="#dfb665fce893853e21ddbd3241685d7f"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#31aeac4d22831073a79d2b6da53c17ae">getFluidDensity</a> () const =0</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns value set with <a class="el" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752" title="/brief Sets the fluid density used for air drag/lift calculations.">setFluidDensity()</a>. <a href="#31aeac4d22831073a79d2b6da53c17ae"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#a2daf756406fd64e1b7b2174eb040367">getFriction</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns value set with <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c10abfe96f96b65c9b3a5f37fee68715" title="Set the cloth collision shape friction coefficient.">setFriction()</a>. <a href="#a2daf756406fd64e1b7b2174eb040367"></a><br></td></tr> @@ -149,6 +152,7 @@ physx::PxVec4 > </td><td class="memItemRight" valign="bottom"><a class=" <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#44b430eff88a119b5242e5ed87722ee0">getNumSelfCollisionIndices</a> () const =0</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of self collision indices set. <a href="#44b430eff88a119b5242e5ed87722ee0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#7951527b51d5e4c523c179c5c7f34d3c">getNumSeparationConstraints</a> () const =0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#4b6b1d7fd2adfbc9d7ac66bbb9c418dc">getNumSpheres</a> () const =0</td></tr> @@ -246,6 +250,9 @@ physx::PxVec4 > </td><td class="memItemRight" valign="bottom"><a class=" <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#fce3065c14afac4e5cf6e93b5d60a007">setDragCoefficient</a> (float)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">/brief Sets the air drag coefficient. <a href="#fce3065c14afac4e5cf6e93b5d60a007"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752">setFluidDensity</a> (float)=0</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">/brief Sets the fluid density used for air drag/lift calculations. <a href="#23bb80bd7b7acd3caa9c2b792c41a752"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#c10abfe96f96b65c9b3a5f37fee68715">setFriction</a> (float)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the cloth collision shape friction coefficient. <a href="#c10abfe96f96b65c9b3a5f37fee68715"></a><br></td></tr> @@ -279,6 +286,7 @@ physx::PxVec4 > </td><td class="memItemRight" valign="bottom"><a class=" <tr><td class="mdescLeft"> </td><td class="mdescRight">/brief Set the distance particles need to be separated from each other withing the cloth. <a href="#8677510130ff4438306d20a413abd5d8"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#e77122c9d483539afe4b944429d5d464">setSelfCollisionIndices</a> (<a class="el" href="structnv_1_1cloth_1_1_range.html">Range</a>< const uint32_t >)=0</td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Set self collision indices. <a href="#e77122c9d483539afe4b944429d5d464"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_cloth.html#b9988307f35da068e3d2ff08b56d95a1">setSelfCollisionStiffness</a> (float stiffness)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">/brief Set the constraint stiffness for the self collision constraints. <a href="#b9988307f35da068e3d2ff08b56d95a1"></a><br></td></tr> @@ -807,6 +815,27 @@ Returns the <a class="el" href="classnv_1_1cloth_1_1_factory.html" title="abstra </div> </div><p> +<a class="anchor" name="31aeac4d22831073a79d2b6da53c17ae"></a><!-- doxytag: member="nv::cloth::Cloth::getFluidDensity" ref="31aeac4d22831073a79d2b6da53c17ae" args="() const =0" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">virtual float nv::cloth::Cloth::getFluidDensity </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td> const<code> [pure virtual]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns value set with <a class="el" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752" title="/brief Sets the fluid density used for air drag/lift calculations.">setFluidDensity()</a>. +<p> + +</div> +</div><p> <a class="anchor" name="a2daf756406fd64e1b7b2174eb040367"></a><!-- doxytag: member="nv::cloth::Cloth::getFriction" ref="a2daf756406fd64e1b7b2174eb040367" args="() const =0" --> <div class="memitem"> <div class="memproto"> @@ -1166,6 +1195,8 @@ Returns the number of planes currently set. <div class="memdoc"> <p> +Returns the number of self collision indices set. +<p> </div> </div><p> @@ -1976,6 +2007,28 @@ Sets damping of local particle velocity (1/stiffnessFrequency). </div> </div><p> +<a class="anchor" name="23bb80bd7b7acd3caa9c2b792c41a752"></a><!-- doxytag: member="nv::cloth::Cloth::setFluidDensity" ref="23bb80bd7b7acd3caa9c2b792c41a752" args="(float)=0" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">virtual void nv::cloth::Cloth::setFluidDensity </td> + <td>(</td> + <td class="paramtype">float </td> + <td class="paramname"> </td> + <td> ) </td> + <td><code> [pure virtual]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +/brief Sets the fluid density used for air drag/lift calculations. +<p> + +</div> +</div><p> <a class="anchor" name="c10abfe96f96b65c9b3a5f37fee68715"></a><!-- doxytag: member="nv::cloth::Cloth::setFriction" ref="c10abfe96f96b65c9b3a5f37fee68715" args="(float)=0" --> <div class="memitem"> <div class="memproto"> @@ -2271,7 +2324,9 @@ Similar to <a class="el" href="classnv_1_1cloth_1_1_cloth.html#080cb97581d6e3707 <div class="memdoc"> <p> - +Set self collision indices. +<p> +Each index in the range indicates that the particle at that index should be used for self collision. If set to an empty range (default) all particles will be used. </div> </div><p> <a class="anchor" name="b9988307f35da068e3d2ff08b56d95a1"></a><!-- doxytag: member="nv::cloth::Cloth::setSelfCollisionStiffness" ref="b9988307f35da068e3d2ff08b56d95a1" args="(float stiffness)=0" --> diff --git a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver-members.html b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver-members.html index db30383..ae29791 100644 --- a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver-members.html +++ b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver-members.html @@ -39,16 +39,18 @@ </div> <div class="contents"> <h1>nv::cloth::Solver Member List</h1>This is the complete list of members for <a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a>, including all inherited members.<p><table> - <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#9f2265058804d818c00653af1edb554d">addCloth</a>(Cloth *)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#63e732712c5a43c44e6018cca6c1fb82">addCloth</a>(Cloth *cloth)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#d2efbe447bf07138c615973c349ab839">beginSimulation</a>(float dt)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#19d777a3882814910f8a024d92072d48">endSimulation</a>()=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#a3e121ffbccc07180e08a2387eb4f6ac">getClothList</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#6a72529d713f46dbd17a5b541aaec6df">getInterCollisionDistance</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#124dc836903890185934c6eaedec2079">getInterCollisionNbIterations</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#09e4be9b50229213a837d00a3f2f6a3f">getInterCollisionStiffness</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#de377e651711ebbb9e70f928cbb682e2">getNumCloths</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#54e393ba3b9fd5305385e2f57d3ca165">getSimulationChunkCount</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#12a60f43b537d78499e30508bd9a6d3c">hasError</a>() const =0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#0bc438b310a4989a96c426c83a1e0beb">operator=</a>(const Solver &)</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [protected]</code></td></tr> - <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#c28839d9a9fbe39e5adcab44cc00fe96">removeCloth</a>(Cloth *)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> + <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#1ed765a15ab2dabbb5186d14bc5f70b1">removeCloth</a>(Cloth *cloth)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#5043adf6727bf66b966de6393e7d67d9">setInterCollisionDistance</a>(float distance)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#31b3d4d36f2025f10cb04a32e28fada4">setInterCollisionFilter</a>(InterCollisionFilter filter)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> <tr class="memlist"><td><a class="el" href="classnv_1_1cloth_1_1_solver.html#3046ea1153c1f9decfc161155cc9810b">setInterCollisionNbIterations</a>(uint32_t nbIterations)=0</td><td><a class="el" href="classnv_1_1cloth_1_1_solver.html">nv::cloth::Solver</a></td><td><code> [pure virtual]</code></td></tr> diff --git a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver.html b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver.html index cb9de89..b2262bf 100644 --- a/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver.html +++ b/NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver.html @@ -50,30 +50,36 @@ <a href="classnv_1_1cloth_1_1_solver-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#9f2265058804d818c00653af1edb554d">addCloth</a> (<a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> *)=0</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#63e732712c5a43c44e6018cca6c1fb82">addCloth</a> (<a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> *cloth)=0</td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds cloth object, returns true if successful. <a href="#9f2265058804d818c00653af1edb554d"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Adds cloth object. <a href="#63e732712c5a43c44e6018cca6c1fb82"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#d2efbe447bf07138c615973c349ab839">beginSimulation</a> (float dt)=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Begins a simulation frame. <a href="#d2efbe447bf07138c615973c349ab839"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#19d777a3882814910f8a024d92072d48">endSimulation</a> ()=0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Finishes up the simulation. <a href="#19d777a3882814910f8a024d92072d48"></a><br></td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> *const * </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#a3e121ffbccc07180e08a2387eb4f6ac">getClothList</a> () const =0</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the pointer to the first cloth added to the solver. <a href="#a3e121ffbccc07180e08a2387eb4f6ac"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#6a72529d713f46dbd17a5b541aaec6df">getInterCollisionDistance</a> () const =0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#124dc836903890185934c6eaedec2079">getInterCollisionNbIterations</a> () const =0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual float </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#09e4be9b50229213a837d00a3f2f6a3f">getInterCollisionStiffness</a> () const =0</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#de377e651711ebbb9e70f928cbb682e2">getNumCloths</a> () const =0</td></tr> + +<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the numer of cloths added to the solver. <a href="#de377e651711ebbb9e70f928cbb682e2"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual int </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#54e393ba3b9fd5305385e2f57d3ca165">getSimulationChunkCount</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the number of chunks that need to be simulated this frame. <a href="#54e393ba3b9fd5305385e2f57d3ca165"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#12a60f43b537d78499e30508bd9a6d3c">hasError</a> () const =0</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if an unrecoverable error has occurred. <a href="#12a60f43b537d78499e30508bd9a6d3c"></a><br></td></tr> -<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#c28839d9a9fbe39e5adcab44cc00fe96">removeCloth</a> (<a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> *)=0</td></tr> +<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#1ed765a15ab2dabbb5186d14bc5f70b1">removeCloth</a> (<a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> *cloth)=0</td></tr> -<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes cloth object. <a href="#c28839d9a9fbe39e5adcab44cc00fe96"></a><br></td></tr> +<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes cloth object. <a href="#1ed765a15ab2dabbb5186d14bc5f70b1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#5043adf6727bf66b966de6393e7d67d9">setInterCollisionDistance</a> (float distance)=0</td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#31b3d4d36f2025f10cb04a32e28fada4">setInterCollisionFilter</a> (InterCollisionFilter filter)=0</td></tr> @@ -156,7 +162,7 @@ base class for solvers <hr><h2>Constructor & Destructor Documentation</h2> </div> </div><p> <hr><h2>Member Function Documentation</h2> -<a class="anchor" name="9f2265058804d818c00653af1edb554d"></a><!-- doxytag: member="nv::cloth::Solver::addCloth" ref="9f2265058804d818c00653af1edb554d" args="(Cloth *)=0" --> +<a class="anchor" name="63e732712c5a43c44e6018cca6c1fb82"></a><!-- doxytag: member="nv::cloth::Solver::addCloth" ref="63e732712c5a43c44e6018cca6c1fb82" args="(Cloth *cloth)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> @@ -164,7 +170,7 @@ base class for solvers <hr><h2>Constructor & Destructor Documentation</h2> <td class="memname">virtual void nv::cloth::Solver::addCloth </td> <td>(</td> <td class="paramtype"><a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> * </td> - <td class="paramname"> </td> + <td class="paramname"> <em>cloth</em> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> @@ -173,7 +179,7 @@ base class for solvers <hr><h2>Constructor & Destructor Documentation</h2> <div class="memdoc"> <p> -Adds cloth object, returns true if successful. +Adds cloth object. <p> </div> @@ -226,6 +232,27 @@ Finishes up the simulation. This function can be expensive if inter-collision is enabled. </div> </div><p> +<a class="anchor" name="a3e121ffbccc07180e08a2387eb4f6ac"></a><!-- doxytag: member="nv::cloth::Solver::getClothList" ref="a3e121ffbccc07180e08a2387eb4f6ac" args="() const =0" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">virtual <a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a>* const* nv::cloth::Solver::getClothList </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td> const<code> [pure virtual]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the pointer to the first cloth added to the solver. +<p> + +</div> +</div><p> <a class="anchor" name="6a72529d713f46dbd17a5b541aaec6df"></a><!-- doxytag: member="nv::cloth::Solver::getInterCollisionDistance" ref="6a72529d713f46dbd17a5b541aaec6df" args="() const =0" --> <div class="memitem"> <div class="memproto"> @@ -283,6 +310,27 @@ This function can be expensive if inter-collision is enabled. </div> </div><p> +<a class="anchor" name="de377e651711ebbb9e70f928cbb682e2"></a><!-- doxytag: member="nv::cloth::Solver::getNumCloths" ref="de377e651711ebbb9e70f928cbb682e2" args="() const =0" --> +<div class="memitem"> +<div class="memproto"> + <table class="memname"> + <tr> + <td class="memname">virtual int nv::cloth::Solver::getNumCloths </td> + <td>(</td> + <td class="paramname"> </td> + <td> ) </td> + <td> const<code> [pure virtual]</code></td> + </tr> + </table> +</div> +<div class="memdoc"> + +<p> +Returns the numer of cloths added to the solver. +<p> + +</div> +</div><p> <a class="anchor" name="54e393ba3b9fd5305385e2f57d3ca165"></a><!-- doxytag: member="nv::cloth::Solver::getSimulationChunkCount" ref="54e393ba3b9fd5305385e2f57d3ca165" args="() const =0" --> <div class="memitem"> <div class="memproto"> @@ -345,7 +393,7 @@ Returns true if an unrecoverable error has occurred. </div> </div><p> -<a class="anchor" name="c28839d9a9fbe39e5adcab44cc00fe96"></a><!-- doxytag: member="nv::cloth::Solver::removeCloth" ref="c28839d9a9fbe39e5adcab44cc00fe96" args="(Cloth *)=0" --> +<a class="anchor" name="1ed765a15ab2dabbb5186d14bc5f70b1"></a><!-- doxytag: member="nv::cloth::Solver::removeCloth" ref="1ed765a15ab2dabbb5186d14bc5f70b1" args="(Cloth *cloth)=0" --> <div class="memitem"> <div class="memproto"> <table class="memname"> @@ -353,7 +401,7 @@ Returns true if an unrecoverable error has occurred. <td class="memname">virtual void nv::cloth::Solver::removeCloth </td> <td>(</td> <td class="paramtype"><a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> * </td> - <td class="paramname"> </td> + <td class="paramname"> <em>cloth</em> </td> <td> ) </td> <td><code> [pure virtual]</code></td> </tr> diff --git a/NvCloth/docs/doxy/files/functions.html b/NvCloth/docs/doxy/files/functions.html index dcb8353..9bae6da 100644 --- a/NvCloth/docs/doxy/files/functions.html +++ b/NvCloth/docs/doxy/files/functions.html @@ -79,7 +79,7 @@ Here is a list of all class members with links to the classes they belong to: <li>acquireContext() : <a class="el" href="classnv_1_1cloth_1_1_dx_context_manager_callback.html#4d8cafe2879665280b8e9e8daa18e95f">nv::cloth::DxContextManagerCallback</a> <li>addCloth() -: <a class="el" href="classnv_1_1cloth_1_1_solver.html#9f2265058804d818c00653af1edb554d">nv::cloth::Solver</a> +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#63e732712c5a43c44e6018cca6c1fb82">nv::cloth::Solver</a> <li>at() : <a class="el" href="structnv_1_1cloth_1_1_strided_data.html#127ee8d050b77cd58ccece6eb3495ccb">nv::cloth::StridedData</a> </ul> diff --git a/NvCloth/docs/doxy/files/functions_0x67.html b/NvCloth/docs/doxy/files/functions_0x67.html index 87dc343..fec5bb3 100644 --- a/NvCloth/docs/doxy/files/functions_0x67.html +++ b/NvCloth/docs/doxy/files/functions_0x67.html @@ -88,6 +88,8 @@ Here is a list of all class members with links to the classes they belong to: : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#4b16c7cedaecc35b5d722040b28f7bdf">nv::cloth::Cloth</a> <li>getCentrifugalInertia() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#f87e077bafe91061772683416c849484">nv::cloth::Cloth</a> +<li>getClothList() +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#a3e121ffbccc07180e08a2387eb4f6ac">nv::cloth::Solver</a> <li>getCollisionMassScale() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c5c1bf8f32e9add7d6978cd80344a829">nv::cloth::Cloth</a> <li>getContext() @@ -101,8 +103,8 @@ Here is a list of all class members with links to the classes they belong to: <li>getDamping() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#e12abf9173dbcbb09690f229b8c8b7dd">nv::cloth::Cloth</a> <li>getDescriptor() -: <a class="el" href="classnv_1_1cloth_1_1_cloth_fabric_cooker.html#24e4bd5204366e6f8ddcfb7e27d4d19f">nv::cloth::ClothFabricCooker</a> -, <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_quadifier.html#35d0eeb9e4dc7156bf4993cd5c13a9d8">nv::cloth::ClothMeshQuadifier</a> +: <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_quadifier.html#35d0eeb9e4dc7156bf4993cd5c13a9d8">nv::cloth::ClothMeshQuadifier</a> +, <a class="el" href="classnv_1_1cloth_1_1_cloth_fabric_cooker.html#24e4bd5204366e6f8ddcfb7e27d4d19f">nv::cloth::ClothFabricCooker</a> <li>getDevice() : <a class="el" href="classnv_1_1cloth_1_1_dx_context_manager_callback.html#b3ca0c862df8de0e4022fcbfee5351a3">nv::cloth::DxContextManagerCallback</a> <li>getDragCoefficient() @@ -112,6 +114,8 @@ Here is a list of all class members with links to the classes they belong to: <li>getFactory() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#dfb665fce893853e21ddbd3241685d7f">nv::cloth::Cloth</a> , <a class="el" href="classnv_1_1cloth_1_1_fabric.html#e6ab4bb76335c9af1a67435eb2520d62">nv::cloth::Fabric</a> +<li>getFluidDensity() +: <a class="el" href="classnv_1_1cloth_1_1_cloth.html#31aeac4d22831073a79d2b6da53c17ae">nv::cloth::Cloth</a> <li>getFriction() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#a2daf756406fd64e1b7b2174eb040367">nv::cloth::Cloth</a> <li>getGpuParticles() @@ -142,6 +146,8 @@ Here is a list of all class members with links to the classes they belong to: : <a class="el" href="classnv_1_1cloth_1_1_cloth_tether_cooker.html#683c0c2fbe6ba9127e55b20864b04035">nv::cloth::ClothTetherCooker</a> <li>getNumCapsules() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c9253d7ea3e5bb8b7389c6718d1d14e7">nv::cloth::Cloth</a> +<li>getNumCloths() +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#de377e651711ebbb9e70f928cbb682e2">nv::cloth::Solver</a> <li>getNumConvexes() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#72d40e0b094a67c5a75c3a442aff4d88">nv::cloth::Cloth</a> <li>getNumIndices() diff --git a/NvCloth/docs/doxy/files/functions_0x72.html b/NvCloth/docs/doxy/files/functions_0x72.html index fba304c..6dc60e3 100644 --- a/NvCloth/docs/doxy/files/functions_0x72.html +++ b/NvCloth/docs/doxy/files/functions_0x72.html @@ -81,7 +81,7 @@ Here is a list of all class members with links to the classes they belong to: <li>releaseContext() : <a class="el" href="classnv_1_1cloth_1_1_dx_context_manager_callback.html#df97ac38567b401fd34168e32cdc88cd">nv::cloth::DxContextManagerCallback</a> <li>removeCloth() -: <a class="el" href="classnv_1_1cloth_1_1_solver.html#c28839d9a9fbe39e5adcab44cc00fe96">nv::cloth::Solver</a> +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#1ed765a15ab2dabbb5186d14bc5f70b1">nv::cloth::Solver</a> <li>restvalues : <a class="el" href="classnv_1_1cloth_1_1_cloth_fabric_desc.html#5c77a4ffedc077675afb330b4c6dc8cd">nv::cloth::ClothFabricDesc</a> </ul> diff --git a/NvCloth/docs/doxy/files/functions_0x73.html b/NvCloth/docs/doxy/files/functions_0x73.html index d0726ce..29bbeaf 100644 --- a/NvCloth/docs/doxy/files/functions_0x73.html +++ b/NvCloth/docs/doxy/files/functions_0x73.html @@ -100,6 +100,8 @@ Here is a list of all class members with links to the classes they belong to: : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#f1e7d559fd4942d82432aeb6ab477cf6">nv::cloth::Cloth</a> <li>setDragCoefficient() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#fce3065c14afac4e5cf6e93b5d60a007">nv::cloth::Cloth</a> +<li>setFluidDensity() +: <a class="el" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752">nv::cloth::Cloth</a> <li>setFriction() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c10abfe96f96b65c9b3a5f37fee68715">nv::cloth::Cloth</a> <li>setGravity() @@ -157,12 +159,12 @@ Here is a list of all class members with links to the classes they belong to: <li>setTetherConstraintStiffness() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#7e8eadb5e98ea146ad2e079cfddeeb0c">nv::cloth::Cloth</a> <li>setToDefault() -: <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#d269d7bebc10b54088fc73e77c1372dd">nv::cloth::ClothMeshDesc</a> -, <a class="el" href="group__extensions.html#gc0dd7bb3155e63161744b3fc07132a98">nv::cloth::ClothFabricDesc</a> +: <a class="el" href="group__extensions.html#gc0dd7bb3155e63161744b3fc07132a98">nv::cloth::ClothFabricDesc</a> +, <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#d269d7bebc10b54088fc73e77c1372dd">nv::cloth::ClothMeshDesc</a> <li>setTranslation() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#080cb97581d6e37079b6f62a7abfced0">nv::cloth::Cloth</a> <li>setTriangles() -: <a class="el" href="classnv_1_1cloth_1_1_cloth.html#e5d69e455fee1bdd9f92ef888e8d2514">nv::cloth::Cloth</a> +: <a class="el" href="classnv_1_1cloth_1_1_cloth.html#dc7593d195a36d040181fbaa0c21ead6">nv::cloth::Cloth</a> <li>setUserData() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#e7c0b099e90d409a65ee14d6f77e57c5">nv::cloth::Cloth</a> <li>setVirtualParticles() @@ -174,7 +176,7 @@ Here is a list of all class members with links to the classes they belong to: <li>size() : <a class="el" href="structnv_1_1cloth_1_1_range.html#0ef526ff1b8eef5c117ad0e892ab5d24">nv::cloth::Range< T ></a> <li>Solver() -: <a class="el" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">nv::cloth::Solver</a> +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#21b6b117db42d8a3206cee521e6af4b0">nv::cloth::Solver</a> <li>stride : <a class="el" href="structnv_1_1cloth_1_1_strided_data.html#fa7d89f91e82b269c40ddaffb726e3ba">nv::cloth::StridedData</a> <li>StridedData() diff --git a/NvCloth/docs/doxy/files/functions_func.html b/NvCloth/docs/doxy/files/functions_func.html index 061bde4..c30ffb0 100644 --- a/NvCloth/docs/doxy/files/functions_func.html +++ b/NvCloth/docs/doxy/files/functions_func.html @@ -79,7 +79,7 @@ <li>acquireContext() : <a class="el" href="classnv_1_1cloth_1_1_dx_context_manager_callback.html#4d8cafe2879665280b8e9e8daa18e95f">nv::cloth::DxContextManagerCallback</a> <li>addCloth() -: <a class="el" href="classnv_1_1cloth_1_1_solver.html#9f2265058804d818c00653af1edb554d">nv::cloth::Solver</a> +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#63e732712c5a43c44e6018cca6c1fb82">nv::cloth::Solver</a> <li>at() : <a class="el" href="structnv_1_1cloth_1_1_strided_data.html#127ee8d050b77cd58ccece6eb3495ccb">nv::cloth::StridedData</a> </ul> diff --git a/NvCloth/docs/doxy/files/functions_func_0x67.html b/NvCloth/docs/doxy/files/functions_func_0x67.html index 02f8cab..50f1d7e 100644 --- a/NvCloth/docs/doxy/files/functions_func_0x67.html +++ b/NvCloth/docs/doxy/files/functions_func_0x67.html @@ -88,6 +88,8 @@ : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#4b16c7cedaecc35b5d722040b28f7bdf">nv::cloth::Cloth</a> <li>getCentrifugalInertia() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#f87e077bafe91061772683416c849484">nv::cloth::Cloth</a> +<li>getClothList() +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#a3e121ffbccc07180e08a2387eb4f6ac">nv::cloth::Solver</a> <li>getCollisionMassScale() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c5c1bf8f32e9add7d6978cd80344a829">nv::cloth::Cloth</a> <li>getContext() @@ -101,8 +103,8 @@ <li>getDamping() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#e12abf9173dbcbb09690f229b8c8b7dd">nv::cloth::Cloth</a> <li>getDescriptor() -: <a class="el" href="classnv_1_1cloth_1_1_cloth_fabric_cooker.html#24e4bd5204366e6f8ddcfb7e27d4d19f">nv::cloth::ClothFabricCooker</a> -, <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_quadifier.html#35d0eeb9e4dc7156bf4993cd5c13a9d8">nv::cloth::ClothMeshQuadifier</a> +: <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_quadifier.html#35d0eeb9e4dc7156bf4993cd5c13a9d8">nv::cloth::ClothMeshQuadifier</a> +, <a class="el" href="classnv_1_1cloth_1_1_cloth_fabric_cooker.html#24e4bd5204366e6f8ddcfb7e27d4d19f">nv::cloth::ClothFabricCooker</a> <li>getDevice() : <a class="el" href="classnv_1_1cloth_1_1_dx_context_manager_callback.html#b3ca0c862df8de0e4022fcbfee5351a3">nv::cloth::DxContextManagerCallback</a> <li>getDragCoefficient() @@ -112,6 +114,8 @@ <li>getFactory() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#dfb665fce893853e21ddbd3241685d7f">nv::cloth::Cloth</a> , <a class="el" href="classnv_1_1cloth_1_1_fabric.html#e6ab4bb76335c9af1a67435eb2520d62">nv::cloth::Fabric</a> +<li>getFluidDensity() +: <a class="el" href="classnv_1_1cloth_1_1_cloth.html#31aeac4d22831073a79d2b6da53c17ae">nv::cloth::Cloth</a> <li>getFriction() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#a2daf756406fd64e1b7b2174eb040367">nv::cloth::Cloth</a> <li>getGpuParticles() @@ -142,6 +146,8 @@ : <a class="el" href="classnv_1_1cloth_1_1_cloth_tether_cooker.html#683c0c2fbe6ba9127e55b20864b04035">nv::cloth::ClothTetherCooker</a> <li>getNumCapsules() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c9253d7ea3e5bb8b7389c6718d1d14e7">nv::cloth::Cloth</a> +<li>getNumCloths() +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#de377e651711ebbb9e70f928cbb682e2">nv::cloth::Solver</a> <li>getNumConvexes() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#72d40e0b094a67c5a75c3a442aff4d88">nv::cloth::Cloth</a> <li>getNumIndices() diff --git a/NvCloth/docs/doxy/files/functions_func_0x72.html b/NvCloth/docs/doxy/files/functions_func_0x72.html index bcd8d77..353242f 100644 --- a/NvCloth/docs/doxy/files/functions_func_0x72.html +++ b/NvCloth/docs/doxy/files/functions_func_0x72.html @@ -81,7 +81,7 @@ <li>releaseContext() : <a class="el" href="classnv_1_1cloth_1_1_dx_context_manager_callback.html#df97ac38567b401fd34168e32cdc88cd">nv::cloth::DxContextManagerCallback</a> <li>removeCloth() -: <a class="el" href="classnv_1_1cloth_1_1_solver.html#c28839d9a9fbe39e5adcab44cc00fe96">nv::cloth::Solver</a> +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#1ed765a15ab2dabbb5186d14bc5f70b1">nv::cloth::Solver</a> </ul> </div> <!-- start footer part --> diff --git a/NvCloth/docs/doxy/files/functions_func_0x73.html b/NvCloth/docs/doxy/files/functions_func_0x73.html index ef8c8b1..26522dc 100644 --- a/NvCloth/docs/doxy/files/functions_func_0x73.html +++ b/NvCloth/docs/doxy/files/functions_func_0x73.html @@ -100,6 +100,8 @@ : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#f1e7d559fd4942d82432aeb6ab477cf6">nv::cloth::Cloth</a> <li>setDragCoefficient() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#fce3065c14afac4e5cf6e93b5d60a007">nv::cloth::Cloth</a> +<li>setFluidDensity() +: <a class="el" href="classnv_1_1cloth_1_1_cloth.html#23bb80bd7b7acd3caa9c2b792c41a752">nv::cloth::Cloth</a> <li>setFriction() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#c10abfe96f96b65c9b3a5f37fee68715">nv::cloth::Cloth</a> <li>setGravity() @@ -153,8 +155,8 @@ <li>setTetherConstraintStiffness() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#7e8eadb5e98ea146ad2e079cfddeeb0c">nv::cloth::Cloth</a> <li>setToDefault() -: <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#d269d7bebc10b54088fc73e77c1372dd">nv::cloth::ClothMeshDesc</a> -, <a class="el" href="group__extensions.html#gc0dd7bb3155e63161744b3fc07132a98">nv::cloth::ClothFabricDesc</a> +: <a class="el" href="group__extensions.html#gc0dd7bb3155e63161744b3fc07132a98">nv::cloth::ClothFabricDesc</a> +, <a class="el" href="classnv_1_1cloth_1_1_cloth_mesh_desc.html#d269d7bebc10b54088fc73e77c1372dd">nv::cloth::ClothMeshDesc</a> <li>setTranslation() : <a class="el" href="classnv_1_1cloth_1_1_cloth.html#080cb97581d6e37079b6f62a7abfced0">nv::cloth::Cloth</a> <li>setTriangles() @@ -170,7 +172,7 @@ <li>size() : <a class="el" href="structnv_1_1cloth_1_1_range.html#0ef526ff1b8eef5c117ad0e892ab5d24">nv::cloth::Range< T ></a> <li>Solver() -: <a class="el" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">nv::cloth::Solver</a> +: <a class="el" href="classnv_1_1cloth_1_1_solver.html#21b6b117db42d8a3206cee521e6af4b0">nv::cloth::Solver</a> <li>StridedData() : <a class="el" href="structnv_1_1cloth_1_1_strided_data.html#06829ec148078b342bcf4bcdd11ff035">nv::cloth::StridedData</a> <li>synchronizeResources() diff --git a/NvCloth/docs/doxy/files/globals.html b/NvCloth/docs/doxy/files/globals.html index d6a8b18..f1a8bee 100644 --- a/NvCloth/docs/doxy/files/globals.html +++ b/NvCloth/docs/doxy/files/globals.html @@ -60,6 +60,8 @@ Here is a list of all file members with links to the files they belong to: , <a class="el" href="group__extensions.html#gf7a3e36d6f91e96f595c90a191bdf4a6">ClothTetherCooker.h</a> <li>NV_CLOTH_ASSERT : <a class="el" href="_callbacks_8h.html#95d1d44fde08004dd6fa0be04be6a445">Callbacks.h</a> +<li>NV_CLOTH_ASSERT_WITH_MESSAGE +: <a class="el" href="_callbacks_8h.html#7580256d644389afb1a6fbf123cd9747">Callbacks.h</a> <li>NV_CLOTH_CALL_CONV : <a class="el" href="_callbacks_8h.html#0a1f306c4d84c8362b056e8fd313629a">Callbacks.h</a> <li>NV_CLOTH_DLL_ID diff --git a/NvCloth/docs/doxy/files/globals_defs.html b/NvCloth/docs/doxy/files/globals_defs.html index 8ac15f6..7fa16e8 100644 --- a/NvCloth/docs/doxy/files/globals_defs.html +++ b/NvCloth/docs/doxy/files/globals_defs.html @@ -51,6 +51,8 @@ : <a class="el" href="_callbacks_8h.html#ca1463b4545d714cb99ba3e96d4245ff">Callbacks.h</a> <li>NV_CLOTH_ASSERT : <a class="el" href="_callbacks_8h.html#95d1d44fde08004dd6fa0be04be6a445">Callbacks.h</a> +<li>NV_CLOTH_ASSERT_WITH_MESSAGE +: <a class="el" href="_callbacks_8h.html#7580256d644389afb1a6fbf123cd9747">Callbacks.h</a> <li>NV_CLOTH_CALL_CONV : <a class="el" href="_callbacks_8h.html#0a1f306c4d84c8362b056e8fd313629a">Callbacks.h</a> <li>NV_CLOTH_DLL_ID diff --git a/NvCloth/include/NvCloth/Callbacks.h b/NvCloth/include/NvCloth/Callbacks.h index 13edaa2..72ebe24 100644 --- a/NvCloth/include/NvCloth/Callbacks.h +++ b/NvCloth/include/NvCloth/Callbacks.h @@ -99,16 +99,31 @@ NV_CLOTH_API(physx::PxAssertHandler*) GetNvClothAssertHandler(); //This function #if !PX_ENABLE_ASSERTS #if PX_VC #define NV_CLOTH_ASSERT(exp) __noop +#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) __noop #else #define NV_CLOTH_ASSERT(exp) ((void)0) +#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) ((void)0) #endif #else +#if PX_VC +#define PX_CODE_ANALYSIS_ASSUME(exp) \ + __analysis_assume(!!(exp)) // This macro will be used to get rid of analysis warning messages if a PX_ASSERT is used + // to "guard" illegal mem access, for example. +#else +#define PX_CODE_ANALYSIS_ASSUME(exp) +#endif #define NV_CLOTH_ASSERT(exp) \ { \ static bool _ignore = false; \ - (static_cast<void>((!!(exp)) || (!_ignore && ((*nv::cloth::GetNvClothAssertHandler())(#exp, __FILE__, __LINE__, _ignore), false)))); \ + ((void)((!!(exp)) || (!_ignore && ((*nv::cloth::GetNvClothAssertHandler())(#exp, __FILE__, __LINE__, _ignore), false)))); \ PX_CODE_ANALYSIS_ASSUME(exp); \ } +#define NV_CLOTH_ASSERT_WITH_MESSAGE(message, exp) \ + { \ + static bool _ignore = false; \ + ((void)((!!(exp)) || (!_ignore && (physx::PxGetAssertHandler()(message, __FILE__, __LINE__, _ignore), false)))); \ + PX_CODE_ANALYSIS_ASSUME(exp); \ + } #endif //Profiler diff --git a/NvCloth/samples/SampleBase/core/Application.cpp b/NvCloth/samples/SampleBase/core/Application.cpp index a7f81f1..2a7808b 100644 --- a/NvCloth/samples/SampleBase/core/Application.cpp +++ b/NvCloth/samples/SampleBase/core/Application.cpp @@ -44,11 +44,19 @@ int Application::run() #endif deviceParams.featureLevel = D3D_FEATURE_LEVEL_11_0; - if (FAILED(m_deviceManager->CreateWindowDeviceAndSwapChain(deviceParams, m_sampleName.c_str()))) + if(FAILED(m_deviceManager->CreateWindowDeviceAndSwapChain(deviceParams, m_sampleName.c_str()))) { - MessageBoxA(nullptr, "Cannot initialize the D3D11 device with the requested parameters", "Error", - MB_OK | MB_ICONERROR); - return 1; + //retry without debug device flag + if(deviceParams.createDeviceFlags | D3D11_CREATE_DEVICE_DEBUG) + { + deviceParams.createDeviceFlags ^= D3D11_CREATE_DEVICE_DEBUG; + } + if(FAILED(m_deviceManager->CreateWindowDeviceAndSwapChain(deviceParams, m_sampleName.c_str()))) + { + MessageBoxA(nullptr, "Cannot initialize the D3D11 device with the requested parameters", "Error", + MB_OK | MB_ICONERROR); + return 1; + } } for (auto it = m_controllers.begin(); it != m_controllers.end(); it++) diff --git a/NvCloth/src/Callbacks.cpp b/NvCloth/src/Callbacks.cpp index 22ba03d..f15a53b 100644 --- a/NvCloth/src/Callbacks.cpp +++ b/NvCloth/src/Callbacks.cpp @@ -54,8 +54,8 @@ static NvClothContext sContext; NV_CLOTH_API(void) InitializeNvCloth(PxAllocatorCallback* allocatorCallback, PxErrorCallback* errorCallback, PxAssertHandler* assertHandler, PxProfilerCallback* profilerCallback, int autoDllIDCheck) { PX_UNUSED(autoDllIDCheck); - NV_CLOTH_ASSERT(("NvCloth dll id mismatch, ensure you compile with matching headers/run with matching dll.", NV_CLOTH_DLL_ID == autoDllIDCheck)); - NV_CLOTH_ASSERT(("NvCloth initialized with invalid allocator", allocatorCallback != nullptr)); + NV_CLOTH_ASSERT_WITH_MESSAGE("NvCloth dll id mismatch, ensure you compile with matching headers/run with matching dll.", NV_CLOTH_DLL_ID == autoDllIDCheck); + NV_CLOTH_ASSERT_WITH_MESSAGE("NvCloth initialized with invalid allocator", allocatorCallback != nullptr); sContext.mAllocator = allocatorCallback; sContext.mErrorCallback = errorCallback; sContext.mAssertHandler = assertHandler; @@ -67,7 +67,7 @@ NV_CLOTH_API(void) InitializeNvCloth(PxAllocatorCallback* allocatorCallback, PxE PxAllocatorCallback* GetNvClothAllocator() { - NV_CLOTH_ASSERT(("NvCloth used before calling InitializeNvCloth", nv::cloth::sContext.mAllocator != nullptr)); + NV_CLOTH_ASSERT_WITH_MESSAGE("NvCloth used before calling InitializeNvCloth", nv::cloth::sContext.mAllocator != nullptr); return nv::cloth::sContext.mAllocator; } diff --git a/NvCloth/src/ClothImpl.h b/NvCloth/src/ClothImpl.h index 1e8d9a1..4d7b28d 100644 --- a/NvCloth/src/ClothImpl.h +++ b/NvCloth/src/ClothImpl.h @@ -316,7 +316,7 @@ inline physx::PxVec3 ClothImpl<T>::getGravity() const inline float safeLog2(float x) { - NV_CLOTH_ASSERT(("safeLog2",x >= 0.0f)); + NV_CLOTH_ASSERT_WITH_MESSAGE("safeLog2",x >= 0.0f); return x > 0 ? physx::shdfnd::log2(x) : -FLT_MAX_EXP; } diff --git a/NvCloth/src/MovingAverage.h b/NvCloth/src/MovingAverage.h index f524d95..4b447c7 100644 --- a/NvCloth/src/MovingAverage.h +++ b/NvCloth/src/MovingAverage.h @@ -40,112 +40,124 @@ namespace cloth struct MovingAverage { - struct Element - { - uint32_t mCount; - float mValue; - }; - public: - MovingAverage(uint32_t n = 1) : mCount(0), mSize(n) + MovingAverage(uint32_t n = 1) : mBegin(0), mCount(0), mSize(n) + { + mData = reinterpret_cast<float*>(NV_CLOTH_ALLOC(mSize *sizeof(float), "MovingAverage")); + } + MovingAverage(const MovingAverage& other): mData(nullptr), mBegin(0), mCount(0), mSize(0) { + *this = other; } + MovingAverage& operator=(const MovingAverage& other) + { + mBegin = other.mBegin; + mCount = other.mCount; + mSize = other.mSize; + NV_CLOTH_FREE(mData); + mData = reinterpret_cast<float*>(NV_CLOTH_ALLOC(mSize * sizeof(float), "MovingAverage")); + memcpy(mData, other.mData, mSize * sizeof(float)); + return *this; + } + ~MovingAverage() { NV_CLOTH_FREE(mData); } bool empty() const { - return mData.empty(); + return mCount == 0; } uint32_t size() const { return mSize; } - + void resize(uint32_t n) { - NV_CLOTH_ASSERT(n); + float* newData = reinterpret_cast<float*>(NV_CLOTH_ALLOC(n * sizeof(float), "MovingAverage")); + + const int cutOffFront = std::max(mCount - static_cast<int32_t>(n), 0); + int index = (mBegin + cutOffFront) % mSize; + for(int i = 0; i < static_cast<int>(n); i++) + { + newData[i] = mData[index]; + index = (index + 1) % mSize; + } + + mCount -= cutOffFront; + + NV_CLOTH_FREE(mData); + mSize = n; - trim(); + mData = newData; + mBegin = 0; } - + void reset() { - mData.resize(0); mCount = 0; + mBegin = 0; } void push(uint32_t n, float value) { - n = std::min(n, mSize); - - if (mData.empty() || mData.back().mValue != value) + n = std::min(n, static_cast<uint32_t>(mSize)); + const int start = (mBegin + mCount) % mSize; + const int end = start + n; + const int end1 = std::min(end, mSize); + const int end2 = std::max(end - end1, 0); + for(int i = start; i < end1; i++) { - Element element = { n, value }; - mData.pushBack(element); + mData[i] = value; } - else + for(int i = 0; i < end2; i++) { - mData.back().mCount += n; + mData[i] = value; } - mCount += n; - trim(); + int newCount = std::min(mCount + static_cast<int32_t>(n), mSize); + mBegin = (mBegin + n-(newCount-mCount))%mSize; //move mBegin by the amount of replaced elements + mCount = newCount; } float average() const { - NV_CLOTH_ASSERT(!mData.empty()); + NV_CLOTH_ASSERT(!empty()); float sum = 0.0f; - Vector<Element>::Type::ConstIterator it = mData.begin(), end = mData.end(); - for (; it != end; ++it) - sum += it->mCount * it->mValue; - - // linear weight ramps at both ends for smoother average - uint32_t n = mCount / 8; - float ramp = 0.0f, temp = 0.0f; - uint32_t countLo = (it = mData.begin())->mCount; - uint32_t countHi = (--end)->mCount; - for (uint32_t i = 0; i < n; ++i) + int totalWeight = 0; { - if (i == countLo) - countLo += (++it)->mCount; - if (i == countHi) - countHi += (--end)->mCount; - - temp += it->mValue + end->mValue; - ramp += temp; + int count = 0; + int end = std::min(mBegin + mCount, mSize); + int rampSize = std::max(1,mCount / 8); + for(int i = mBegin; i < end; i++) + { + //ramp weight /''''''\ . + int weight = std::min( + std::min(count+1, rampSize), //left ramp /''' + std::min(mCount-(count), rampSize)); //right ramp '''\ . + sum += mData[i] * weight; + totalWeight += weight; + count++; + } + int leftOver = mCount-(end - mBegin); + for(int i = 0; i < leftOver; i++) + { + int weight = std::min(std::min(count + 1, rampSize), std::min(mCount - (count), rampSize)); + sum += mData[i] * weight; + totalWeight += weight; + count++; + } + NV_CLOTH_ASSERT(count == mCount); } - uint32_t num = (mCount - n) * (n + 1); - return (sum * (n + 1) - ramp) / num; + return sum / static_cast<float>(totalWeight); } - private: - // remove oldest (front) values until mCount<=mSize - void trim() - { - Vector<Element>::Type::Iterator it = mData.begin(); - for (uint32_t k = mSize; k < mCount; it += k <= mCount) - { - k += it->mCount; - it->mCount = k - mCount; - } - - if (it != mData.begin()) - { - Vector<Element>::Type tmp; - tmp.assign(it, mData.end()); - tmp.swap(mData); - } - - mCount = std::min(mCount, mSize); - } - - Vector<Element>::Type mData; - - uint32_t mCount; - uint32_t mSize; +private: + float* mData; //Ring buffer + int32_t mBegin; //Index to first element + int32_t mCount; //current number of elements + int32_t mSize; //max ringbuffer size }; } } diff --git a/NvCloth/src/SwFactory.cpp b/NvCloth/src/SwFactory.cpp index 6f46c96..5c4b625 100644 --- a/NvCloth/src/SwFactory.cpp +++ b/NvCloth/src/SwFactory.cpp @@ -51,7 +51,7 @@ cloth::SwFactory::SwFactory() cloth::SwFactory::~SwFactory() { - NV_CLOTH_ASSERT(("All fabrics created by this factory need to be deleted before this factory is destroyed.", mFabrics.size() == 0)); + NV_CLOTH_ASSERT_WITH_MESSAGE("All fabrics created by this factory need to be deleted before this factory is destroyed.", mFabrics.size() == 0); } cloth::Fabric* cloth::SwFactory::createFabric(uint32_t numParticles, Range<const uint32_t> phaseIndices, diff --git a/NvCloth/src/SwSolverKernel.cpp b/NvCloth/src/SwSolverKernel.cpp index dec46d7..eec7956 100644 --- a/NvCloth/src/SwSolverKernel.cpp +++ b/NvCloth/src/SwSolverKernel.cpp @@ -414,7 +414,7 @@ void applyWind(T4f* __restrict curIt, const T4f* __restrict prevIt, const uint16 T4f previous = oneThird * (p0 + p1 + p2); //offset of the triangle center, including wind - T4f delta = current - previous + wind; //wind is also already multiplied by dt in the iteration state so everything it in the same units + T4f delta = current - previous + wind; //wind is also already multiplied by dt in the iteration state so everything is in the same units if (IsTurning) { diff --git a/NvCloth/src/cuda/CuSolverKernel.cu b/NvCloth/src/cuda/CuSolverKernel.cu index edb66dc..1ad5896 100644 --- a/NvCloth/src/cuda/CuSolverKernel.cu +++ b/NvCloth/src/cuda/CuSolverKernel.cu @@ -849,10 +849,17 @@ __device__ float3 cross3(const float3& u, const float3& v) __device__ void applyImpulse(SharedParticleData::ParticleReferenceType pos, const float3& impulse) { float scale = -pos.mReferences[3]; + +#if CONVERT_ADDRESSES //Use this instead of atomicAdd function to work around compiler issue treating the pointer as global memory instead of shared memory - asm("red.shared.add.f32 [%0], %1;" :: POINTER_CONSTRAINT(pos.mReferences[0].mPtr), "f"(impulse.x * scale)); - asm("red.shared.add.f32 [%0], %1;" :: POINTER_CONSTRAINT(pos.mReferences[1].mPtr), "f"(impulse.y * scale)); - asm("red.shared.add.f32 [%0], %1;" :: POINTER_CONSTRAINT(pos.mReferences[2].mPtr), "f"(impulse.z * scale)); + asm("red.shared.add.f32 [%0], %1;" ::POINTER_CONSTRAINT(pos.mReferences[0].mPtr), "f"(impulse.x * scale)); + asm("red.shared.add.f32 [%0], %1;" ::POINTER_CONSTRAINT(pos.mReferences[1].mPtr), "f"(impulse.y * scale)); + asm("red.shared.add.f32 [%0], %1;" ::POINTER_CONSTRAINT(pos.mReferences[2].mPtr), "f"(impulse.z * scale)); +#else + atomicAdd(pos.mReferences[0].mPtr, impulse.x * scale); + atomicAdd(pos.mReferences[1].mPtr, impulse.y * scale); + atomicAdd(pos.mReferences[2].mPtr, impulse.z * scale); +#endif } __device__ void applyImpulse(GlobalParticleData::ParticleReferenceType pos, const float3& impulse) { |