aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarijn Tamis <[email protected]>2017-10-20 14:30:56 +0200
committerMarijn Tamis <[email protected]>2017-10-20 14:36:12 +0200
commitfabb251458f4a2d6d4f87dd36038fac2774b378c (patch)
tree68a4a0ecd940dc949e0477d521d8c159968cfcd5
parentNvCloth 1.1.2 Release. (22576033) (diff)
downloadnvcloth-fabb251458f4a2d6d4f87dd36038fac2774b378c.tar.xz
nvcloth-fabb251458f4a2d6d4f87dd36038fac2774b378c.zip
NvCloth 1.1.3 Release. (23014067)v1.1.3
-rw-r--r--Externals/CMakeModules/NvidiaBuildOptions.cmake180
-rw-r--r--Externals/CMakeModules/ios/ios.toolchain.cmake334
-rw-r--r--NvCloth/CmakeGenerateAndroid.bat120
-rw-r--r--NvCloth/CmakeGenerateProjects.bat87
-rw-r--r--NvCloth/GenerateProjectsLinux.sh40
-rw-r--r--NvCloth/GenerateProjectsOsx.sh21
-rw-r--r--NvCloth/ReleaseNotes.txt88
-rw-r--r--NvCloth/clean.bat9
-rw-r--r--NvCloth/compiler/cmake/Linux/NvCloth.cmake86
-rw-r--r--NvCloth/compiler/cmake/android/CMakeLists.txt62
-rw-r--r--NvCloth/compiler/cmake/android/NvCloth.cmake39
-rw-r--r--NvCloth/compiler/cmake/windows/NvCloth.cmake2
-rw-r--r--NvCloth/docs/documentation/Compiling/index.html319
-rw-r--r--NvCloth/docs/documentation/CopyRight/Index.html27
-rw-r--r--NvCloth/docs/documentation/Modules/Index.html33
-rw-r--r--NvCloth/docs/documentation/NvCloth.html140
-rw-r--r--NvCloth/docs/documentation/ReleaseNotes/index.html156
-rw-r--r--NvCloth/docs/documentation/UserGuide/Index.html27
-rw-r--r--NvCloth/docs/documentation/genindex.html27
-rw-r--r--NvCloth/docs/documentation/index.html28
-rw-r--r--NvCloth/docs/documentation/search.html27
-rw-r--r--NvCloth/docs/documentation/searchindex.js2
-rw-r--r--NvCloth/docs/doxy/files/_solver_8h-source.html105
-rw-r--r--NvCloth/docs/doxy/files/_solver_8h.html1
-rw-r--r--NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_cloth.html2
-rw-r--r--NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver-members.html1
-rw-r--r--NvCloth/docs/doxy/files/classnv_1_1cloth_1_1_solver.html25
-rw-r--r--NvCloth/docs/doxy/files/functions.html2
-rw-r--r--NvCloth/docs/doxy/files/functions_func.html2
-rw-r--r--NvCloth/include/NvCloth/Cloth.h2
-rw-r--r--NvCloth/include/NvCloth/Solver.h4
-rw-r--r--NvCloth/samples/SampleBase/scene/Scene.cpp18
-rw-r--r--NvCloth/samples/SampleBase/scene/Scene.h4
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/CCDScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/CapsuleScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/ConvexCollisionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/DistanceConstraintScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/FrictionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/GeodesicScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/InterCollisionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/LocalGlobalScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/MultiSolverScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/ScaledScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/SelfCollisionScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/SimpleScene.cpp3
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/StiffnessPerConstraintScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/TetherScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/TriangleScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/scene/scenes/WindScene.cpp2
-rw-r--r--NvCloth/samples/SampleBase/ui/CommonUIController.cpp2
-rw-r--r--NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp1
-rw-r--r--NvCloth/samples/SampleBase/utils/ClothMeshGenerator.h4
-rw-r--r--NvCloth/samples/SampleBase/utils/JobManager.cpp5
-rw-r--r--NvCloth/samples/SampleBase/utils/MeshGenerator.cpp81
-rw-r--r--NvCloth/scripts/packman/config.packman.xml9
-rw-r--r--NvCloth/scripts/packman/packages/cmake.packman.xml7
-rw-r--r--NvCloth/scripts/packman/packman.cmd41
-rw-r--r--NvCloth/scripts/packman/packman.sh97
-rw-r--r--NvCloth/scripts/packman/packman_config.txt5
-rw-r--r--NvCloth/scripts/packman/test_packman.cmd6
-rw-r--r--NvCloth/scripts/packman/test_packman.sh8
-rw-r--r--NvCloth/scripts/packman/test_postscript.bat2
-rw-r--r--NvCloth/scripts/packman/win-bootstrap/configure.bat112
-rw-r--r--NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.cmd22
-rw-r--r--NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.ps160
-rw-r--r--NvCloth/scripts/packman/win-bootstrap/fetch_file_from_url.ps137
-rw-r--r--NvCloth/scripts/packman/win-bootstrap/generate_temp_file_name.ps12
-rw-r--r--NvCloth/scripts/packman/win-bootstrap/install_package.py39
-rw-r--r--NvCloth/src/BoundingBox.h40
-rw-r--r--NvCloth/src/ClothClone.h10
-rw-r--r--NvCloth/src/ClothImpl.h2
-rw-r--r--NvCloth/src/IterationState.h122
-rw-r--r--NvCloth/src/NvSimd/NvSimdTypes.h6
-rw-r--r--NvCloth/src/PointInterpolator.h32
-rw-r--r--NvCloth/src/SwCollision.cpp85
-rw-r--r--NvCloth/src/SwInterCollision.cpp1
-rw-r--r--NvCloth/src/SwSelfCollision.cpp78
-rw-r--r--NvCloth/src/SwSolver.cpp34
-rw-r--r--NvCloth/src/SwSolver.h5
-rw-r--r--NvCloth/src/SwSolverKernel.cpp8
-rw-r--r--NvCloth/src/cuda/CuCloth.cpp2
-rw-r--r--NvCloth/src/cuda/CuClothData.h2
-rw-r--r--NvCloth/src/cuda/CuFabric.cpp1
-rw-r--r--NvCloth/src/cuda/CuPinnedAllocator.h18
-rw-r--r--NvCloth/src/cuda/CuSolver.cpp52
-rw-r--r--NvCloth/src/cuda/CuSolver.h5
-rw-r--r--NvCloth/src/dx/DxBatchedVector.h2
-rw-r--r--NvCloth/src/dx/DxClothData.h2
-rw-r--r--NvCloth/src/dx/DxFactory.cpp42
-rw-r--r--NvCloth/src/dx/DxSolver.cpp68
-rw-r--r--NvCloth/src/dx/DxSolver.h5
-rw-r--r--NvCloth/src/neon/NeonSolverKernel.cpp12
-rw-r--r--NvCloth/src/scalar/SwCollisionHelpers.h3
-rw-r--r--NvCloth/src/sse2/SwCollisionHelpers.h3
-rw-r--r--PxShared/include/foundation/PxFoundation.h11
-rw-r--r--PxShared/include/foundation/PxMemory.h2
-rw-r--r--PxShared/include/foundation/PxPreprocessor.h7
-rw-r--r--PxShared/include/foundation/PxSimpleTypes.h2
-rw-r--r--PxShared/include/foundation/unix/PxUnixIntrinsics.h18
-rw-r--r--PxShared/include/foundation/windows/PxWindowsIntrinsics.h2
-rw-r--r--PxShared/src/compiler/cmake/Android/CMakeLists.txt2
-rw-r--r--PxShared/src/compiler/cmake/Android/PsFastXml.cmake26
-rw-r--r--PxShared/src/compiler/cmake/Android/PxFoundation.cmake26
-rw-r--r--PxShared/src/compiler/cmake/Android/PxPvdSDK.cmake25
-rw-r--r--PxShared/src/compiler/cmake/Android/PxTask.cmake25
-rw-r--r--PxShared/src/compiler/cmake/IOS/CMakeLists.txt39
-rw-r--r--PxShared/src/compiler/cmake/Linux/CMakeLists.txt10
-rw-r--r--PxShared/src/foundation/include/PsArray.h129
-rw-r--r--PxShared/src/foundation/include/PsMathUtils.h3
-rw-r--r--PxShared/src/foundation/include/PsMutex.h2
-rw-r--r--PxShared/src/foundation/include/PsSList.h2
-rw-r--r--PxShared/src/foundation/include/PsSync.h6
-rw-r--r--PxShared/src/foundation/include/PsThread.h6
-rw-r--r--PxShared/src/foundation/include/PsUtilities.h8
-rw-r--r--PxShared/src/foundation/include/PsVecMathAoSScalar.h3
-rw-r--r--PxShared/src/foundation/include/unix/PsUnixInlineAoS.h3
-rw-r--r--PxShared/src/foundation/include/unix/PsUnixIntrinsics.h2
-rw-r--r--PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h3
-rw-r--r--PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h3
-rw-r--r--PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h3
-rw-r--r--PxShared/src/foundation/src/PsString.cpp4
-rw-r--r--PxShared/src/foundation/src/unix/PsUnixMutex.cpp5
-rw-r--r--PxShared/src/foundation/src/unix/PsUnixSList.cpp6
-rw-r--r--PxShared/src/foundation/src/unix/PsUnixSync.cpp5
-rw-r--r--PxShared/src/foundation/src/unix/PsUnixThread.cpp13
-rw-r--r--PxShared/src/foundation/src/windows/PsWindowsMutex.cpp6
-rw-r--r--PxShared/src/foundation/src/windows/PsWindowsSList.cpp6
-rw-r--r--PxShared/src/foundation/src/windows/PsWindowsSocket.cpp2
-rw-r--r--PxShared/src/foundation/src/windows/PsWindowsSync.cpp5
-rw-r--r--PxShared/src/foundation/src/windows/PsWindowsThread.cpp5
-rw-r--r--PxShared/src/pvd/src/PxProfileEvents.h4
-rw-r--r--PxShared/src/task/src/TaskManager.cpp2
-rw-r--r--README.md34
135 files changed, 2682 insertions, 1020 deletions
diff --git a/Externals/CMakeModules/NvidiaBuildOptions.cmake b/Externals/CMakeModules/NvidiaBuildOptions.cmake
new file mode 100644
index 0000000..e5d89af
--- /dev/null
+++ b/Externals/CMakeModules/NvidiaBuildOptions.cmake
@@ -0,0 +1,180 @@
+# Define the options up front
+
+OPTION(APPEND_CONFIG_NAME "Append config (DEBUG, CHECKED, PROFILE or '' for release) to outputted binaries." OFF)
+OPTION(USE_GAMEWORKS_OUTPUT_DIRS "Use new GameWorks folder structure for binary output." ON)
+OPTION(USE_STATIC_WINCRT "Use the statically linked windows CRT" OFF)
+OPTION(USE_DEBUG_WINCRT "Use the debug version of the CRT" OFF)
+OPTION(GENERATE_STATIC_LIBRARIES "Generate static libraries" OFF)
+
+INCLUDE(SetOutputPaths)
+
+ # Set the WINCRT_DEBUG and WINCRT_NDEBUG variables for use in project compile settings
+ # Really only relevant to windows
+
+ SET(DISABLE_ITERATOR_DEBUGGING "/D \"_HAS_ITERATOR_DEBUGGING=0\" /D \"_ITERATOR_DEBUG_LEVEL=0\"")
+ SET(DISABLE_ITERATOR_DEBUGGING_CUDA "-D_HAS_ITERATOR_DEBUGGING=0 -D_ITERATOR_DEBUG_LEVEL=0")
+ SET(CRT_DEBUG_FLAG "/D \"_DEBUG\"")
+ SET(CRT_NDEBUG_FLAG "/D \"NDEBUG\"")
+
+ # Need a different format for CUDA
+ SET(CUDA_DEBUG_FLAG "-DNDEBUG ${DISABLE_ITERATOR_DEBUGGING_CUDA}")
+ SET(CUDA_NDEBUG_FLAG "-DNDEBUG")
+
+ SET(CUDA_CRT_COMPILE_OPTIONS_NDEBUG "")
+ SET(CUDA_CRT_COMPILE_OPTIONS_DEBUG "")
+
+
+ IF(USE_STATIC_WINCRT)
+ SET(WINCRT_NDEBUG "/MT ${DISABLE_ITERATOR_DEBUGGING} ${CRT_NDEBUG_FLAG}" CACHE INTERNAL "Windows CRT build setting")
+ SET(CUDA_CRT_COMPILE_OPTIONS_NDEBUG "/MT")
+
+ IF (USE_DEBUG_WINCRT)
+ SET(CUDA_DEBUG_FLAG "-D_DEBUG")
+ SET(WINCRT_DEBUG "/MTd ${CRT_DEBUG_FLAG}" CACHE INTERNAL "Windows CRT build setting")
+ SET(CUDA_CRT_COMPILE_OPTIONS_DEBUG "/MTd")
+ ELSE()
+ SET(WINCRT_DEBUG "/MT ${DISABLE_ITERATOR_DEBUGGING} ${CRT_NDEBUG_FLAG}" CACHE INTERNAL "Windows CRT build setting")
+ SET(CUDA_CRT_COMPILE_OPTIONS_DEBUG "/MT")
+ ENDIF()
+ ELSE()
+ SET(WINCRT_NDEBUG "/MD ${DISABLE_ITERATOR_DEBUGGING} ${CRT_NDEBUG_FLAG}")
+ SET(CUDA_CRT_COMPILE_OPTIONS_NDEBUG "/MD")
+
+ IF(USE_DEBUG_WINCRT)
+ SET(CUDA_DEBUG_FLAG "-D_DEBUG")
+ SET(WINCRT_DEBUG "/MDd ${CRT_DEBUG_FLAG}" CACHE INTERNAL "Windows CRT build setting")
+ SET(CUDA_CRT_COMPILE_OPTIONS_DEBUG "/MDd")
+ ELSE()
+ SET(WINCRT_DEBUG "/MD ${DISABLE_ITERATOR_DEBUGGING} ${CRT_NDEBUG_FLAG}" CACHE INTERNAL "Windows CRT build setting")
+ SET(CUDA_CRT_COMPILE_OPTIONS_DEBUG "/MD")
+ ENDIF()
+ ENDIF()
+
+
+IF(USE_GAMEWORKS_OUTPUT_DIRS)
+
+ # New bitness suffix
+ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(LIBPATH_SUFFIX "64")
+ # Set default exe suffix. Unset on platforms that don't need it. Include underscore since it's optional
+ SET(EXE_SUFFIX "_64")
+ ELSE()
+ SET(LIBPATH_SUFFIX "32")
+ # Set default exe suffix. Unset on platforms that don't need it. Include underscore since it's optional
+ SET(EXE_SUFFIX "_32")
+ ENDIF()
+
+ IF (NOT DEFINED PX_OUTPUT_LIB_DIR)
+ MESSAGE(FATAL_ERROR "When using the GameWorks output structure you must specify PX_OUTPUT_LIB_DIR as the base")
+ ENDIF()
+
+ IF (NOT DEFINED PX_OUTPUT_BIN_DIR)
+ MESSAGE(FATAL_ERROR "When using the GameWorks output structure you must specify PX_OUTPUT_BIN_DIR as the base")
+ ENDIF()
+
+
+ INCLUDE(GetCompilerAndPlatform)
+ # Get the compiler and platform string into COMPILER_AND_PLATFORM
+ GetCompilerAndPlatform(COMPILER_AND_PLATFORM)
+
+ GetStaticCRTString(CRT_STRING)
+
+ IF(NOT CRT_STRING) # Non windows returns empty string
+ IF (NOT DEFINED PX_OUTPUT_ARCH) # platforms with fixed arch like ps4 dont need to have arch defined
+ # Set the path the DLLs and static libs go to
+ SET(PX_ROOT_LIB_DIR "bin/${COMPILER_AND_PLATFORM}" CACHE INTERNAL "Relative root of the lib output directory")
+ SET(PX_ROOT_EXE_DIR "bin/${COMPILER_AND_PLATFORM}" CACHE INTERNAL "Relative root dir of the exe output directory")
+
+ # If there's no arch, then no bitness either.
+
+ SET(EXE_SUFFIX "")
+ ELSE()
+ # Set the path the DLLs and static libs go to
+ SET(PX_ROOT_LIB_DIR "bin/${COMPILER_AND_PLATFORM}/${PX_OUTPUT_ARCH}" CACHE INTERNAL "Relative root of the lib output directory")
+ SET(PX_ROOT_EXE_DIR "bin/${COMPILER_AND_PLATFORM}/${PX_OUTPUT_ARCH}" CACHE INTERNAL "Relative root dir of the exe output directory")
+ ENDIF()
+ ELSE()
+ # Set the path the DLLs and static libs go to
+ SET(PX_ROOT_LIB_DIR "bin/${COMPILER_AND_PLATFORM}/${PX_OUTPUT_ARCH}/${CRT_STRING}" CACHE INTERNAL "Relative root of the lib output directory")
+ SET(PX_ROOT_EXE_DIR "bin/${COMPILER_AND_PLATFORM}/${PX_OUTPUT_ARCH}/${CRT_STRING}" CACHE INTERNAL "Relative root dir of the exe output directory")
+ ENDIF()
+
+ # Override our normal PX_ROOT_LIB_DIR for Android
+ IF(TARGET_BUILD_PLATFORM STREQUAL "Android")
+ SET(PX_ROOT_LIB_DIR "bin/${COMPILER_AND_PLATFORM}/${ANDROID_ABI}/${CM_ANDROID_FP}" CACHE INTERNAL "Relative root of the lib output directory")
+ ENDIF()
+
+ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/debug" )
+ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_PROFILE "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/profile" )
+ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CHECKED "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/checked" )
+ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/release" )
+
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/debug" )
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_PROFILE "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/profile" )
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_CHECKED "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/checked" )
+ SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${PX_OUTPUT_LIB_DIR}/${PX_ROOT_LIB_DIR}/release" )
+
+ # Set the RUNTIME output directories - this is executables, etc.
+ # Override our normal PX_ROOT_EXE_DIR for Android
+ IF(TARGET_BUILD_PLATFORM STREQUAL "Android")
+ SET(PX_ROOT_EXE_DIR "bin/${COMPILER_AND_PLATFORM}/${ANDROID_ABI}/${CM_ANDROID_FP}" CACHE INTERNAL "Relative root dir of the exe output directory")
+ ENDIF()
+
+ # RFC 108, we're doing EXEs as the special case since there will be presumable be less of those.
+ SET(PX_EXE_OUTPUT_DIRECTORY_DEBUG "${PX_OUTPUT_BIN_DIR}/${PX_ROOT_EXE_DIR}/debug" CACHE INTERNAL "Directory to put debug exes in")
+ SET(PX_EXE_OUTPUT_DIRECTORY_PROFILE "${PX_OUTPUT_BIN_DIR}/${PX_ROOT_EXE_DIR}/profile" CACHE INTERNAL "Directory to put profile exes in")
+ SET(PX_EXE_OUTPUT_DIRECTORY_CHECKED "${PX_OUTPUT_BIN_DIR}/${PX_ROOT_EXE_DIR}/checked" CACHE INTERNAL "Directory to put checked exes in")
+ SET(PX_EXE_OUTPUT_DIRECTORY_RELEASE "${PX_OUTPUT_BIN_DIR}/${PX_ROOT_EXE_DIR}/release" CACHE INTERNAL "Directory to put release exes in")
+
+ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG} )
+ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_PROFILE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_PROFILE} )
+ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_CHECKED ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_CHECKED} )
+ SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE} )
+
+
+ELSE()
+ # old bitness suffix
+ IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(LIBPATH_SUFFIX "x64")
+ ELSE()
+ SET(LIBPATH_SUFFIX "x86")
+ ENDIF()
+
+
+ IF(DEFINED PX_OUTPUT_EXE_DIR)
+ SetExeOutputPath(${PX_OUTPUT_EXE_DIR})
+ ENDIF()
+ IF(DEFINED PX_OUTPUT_DLL_DIR)
+ SetDllOutputPath(${PX_OUTPUT_DLL_DIR})
+ ENDIF()
+ IF(DEFINED PX_OUTPUT_LIB_DIR)
+ SetLibOutputPath(${PX_OUTPUT_LIB_DIR})
+ ENDIF()
+ # All EXE/DLL/LIB output will be overwritten if PX_OUTPUT_ALL_DIR is defined
+ IF(DEFINED PX_OUTPUT_ALL_DIR)
+ SetSingleOutputPath(${PX_OUTPUT_ALL_DIR})
+ ENDIF()
+ENDIF()
+
+IF(APPEND_CONFIG_NAME)
+ SET(CMAKE_DEBUG_POSTFIX "DEBUG_${LIBPATH_SUFFIX}")
+ SET(CMAKE_PROFILE_POSTFIX "PROFILE_${LIBPATH_SUFFIX}")
+ SET(CMAKE_CHECKED_POSTFIX "CHECKED_${LIBPATH_SUFFIX}")
+ SET(CMAKE_RELEASE_POSTFIX "_${LIBPATH_SUFFIX}")
+ELSE()
+ IF (DEFINED PX_OUTPUT_ARCH) # platforms with fixed arch like ps4 dont need to have arch defined, then dont add bitness
+ SET(CMAKE_DEBUG_POSTFIX "_${LIBPATH_SUFFIX}")
+ SET(CMAKE_PROFILE_POSTFIX "_${LIBPATH_SUFFIX}")
+ SET(CMAKE_CHECKED_POSTFIX "_${LIBPATH_SUFFIX}")
+ SET(CMAKE_RELEASE_POSTFIX "_${LIBPATH_SUFFIX}")
+ ENDIF()
+ENDIF()
+
+# Can no longer just use LIBPATH_SUFFIX since it depends on build type
+IF(CMAKE_CL_64)
+ SET(RESOURCE_LIBPATH_SUFFIX "x64")
+ELSE(CMAKE_CL_64)
+ SET(RESOURCE_LIBPATH_SUFFIX "x86")
+ENDIF(CMAKE_CL_64)
+
+
diff --git a/Externals/CMakeModules/ios/ios.toolchain.cmake b/Externals/CMakeModules/ios/ios.toolchain.cmake
new file mode 100644
index 0000000..1f6ed45
--- /dev/null
+++ b/Externals/CMakeModules/ios/ios.toolchain.cmake
@@ -0,0 +1,334 @@
+# This file is part of the ios-cmake project. It was retrieved from
+# https://github.com/cristeab/ios-cmake.git, which is a fork of
+# https://code.google.com/p/ios-cmake/. Which in turn is based off of
+# the Platform/Darwin.cmake and Platform/UnixPaths.cmake files which
+# are included with CMake 2.8.4
+#
+# The ios-cmake project is licensed under the new BSD license.
+#
+# Copyright (c) 2014, Bogdan Cristea and LTE Engineering Software,
+# Kitware, Inc., Insight Software Consortium. All rights reserved.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# 3. Neither the name of the copyright holder nor the names of its
+# contributors may be used to endorse or promote products derived from
+# this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+# This file is based off of the Platform/Darwin.cmake and
+# Platform/UnixPaths.cmake files which are included with CMake 2.8.4
+# It has been altered for iOS development.
+#
+# Updated by Alex Stewart ([email protected]).
+# The following variables control the behaviour of this toolchain:
+#
+# IOS_PLATFORM: OS (default) or SIMULATOR or SIMULATOR64
+# OS = Build for iPhoneOS.
+# SIMULATOR = Build for x86 i386 iPhone Simulator.
+# SIMULATOR64 = Build for x86 x86_64 iPhone Simulator.
+# CMAKE_OSX_SYSROOT: Path to the iOS SDK to use. By default this is
+# automatically determined from IOS_PLATFORM and xcodebuild, but
+# can also be manually specified (although this should not be required).
+# CMAKE_IOS_DEVELOPER_ROOT: Path to the Developer directory for the iOS platform
+# being compiled for. By default this is automatically determined from
+# CMAKE_OSX_SYSROOT, but can also be manually specified (although this should
+# not be required).
+# ENABLE_BITCODE: (true|false) Enables or disables bitcode support. Default true
+#
+# This toolchain defines the following variables for use externally:
+#
+# XCODE_VERSION: Version number (not including Build version) of Xcode detected.
+# IOS_SDK_VERSION: Version of iOS SDK being used.
+# CMAKE_OSX_ARCHITECTURES: Architectures being compiled for (generated from
+# IOS_PLATFORM).
+#
+# This toolchain defines the following macros for use externally:
+#
+# set_xcode_property (TARGET XCODE_PROPERTY XCODE_VALUE XCODE_VARIANT)
+# A convenience macro for setting xcode specific properties on targets.
+# Available variants are: All, Release, RelWithDebInfo, Debug, MinSizeRel
+# example: set_xcode_property (myioslib IPHONEOS_DEPLOYMENT_TARGET "3.1" "all").
+#
+# find_host_package (PROGRAM ARGS)
+# A macro used to find executable programs on the host system, not within the
+# iOS environment. Thanks to the android-cmake project for providing the
+# command.
+
+# Fix for PThread library not in path
+set(CMAKE_THREAD_LIBS_INIT "-lpthread")
+set(CMAKE_HAVE_THREADS_LIBRARY 1)
+set(CMAKE_USE_WIN32_THREADS_INIT 0)
+set(CMAKE_USE_PTHREADS_INIT 1)
+
+# Get the Xcode version being used.
+execute_process(COMMAND xcodebuild -version
+ OUTPUT_VARIABLE XCODE_VERSION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+string(REGEX MATCH "Xcode [0-9\\.]+" XCODE_VERSION "${XCODE_VERSION}")
+string(REGEX REPLACE "Xcode ([0-9\\.]+)" "\\1" XCODE_VERSION "${XCODE_VERSION}")
+message(STATUS "Building with Xcode version: ${XCODE_VERSION}")
+# Default to building for iPhoneOS if not specified otherwise, and we cannot
+# determine the platform from the CMAKE_OSX_ARCHITECTURES variable. The use
+# of CMAKE_OSX_ARCHITECTURES is such that try_compile() projects can correctly
+# determine the value of IOS_PLATFORM from the root project, as
+# CMAKE_OSX_ARCHITECTURES is propagated to them by CMake.
+if (NOT DEFINED IOS_PLATFORM)
+ if (CMAKE_OSX_ARCHITECTURES)
+ if (CMAKE_OSX_ARCHITECTURES MATCHES ".*arm.*")
+ set(IOS_PLATFORM "OS")
+ elseif (CMAKE_OSX_ARCHITECTURES MATCHES "i386")
+ set(IOS_PLATFORM "SIMULATOR")
+ elseif (CMAKE_OSX_ARCHITECTURES MATCHES "x86_64")
+ set(IOS_PLATFORM "SIMULATOR64")
+ endif()
+ endif()
+ if (NOT IOS_PLATFORM)
+ set(IOS_PLATFORM "OS")
+ endif()
+endif()
+set(IOS_PLATFORM ${IOS_PLATFORM} CACHE STRING
+ "Type of iOS platform for which to build.")
+# Determine the platform name and architectures for use in xcodebuild commands
+# from the specified IOS_PLATFORM name.
+if (IOS_PLATFORM STREQUAL "OS")
+ set(XCODE_IOS_PLATFORM iphoneos)
+ set(IOS_ARCH armv7 armv7s arm64)
+elseif (IOS_PLATFORM STREQUAL "SIMULATOR")
+ set(XCODE_IOS_PLATFORM iphonesimulator)
+ set(IOS_ARCH i386)
+elseif(IOS_PLATFORM STREQUAL "SIMULATOR64")
+ set(XCODE_IOS_PLATFORM iphonesimulator)
+ set(IOS_ARCH x86_64)
+else()
+ message(FATAL_ERROR "Invalid IOS_PLATFORM: ${IOS_PLATFORM}")
+endif()
+message(STATUS "Configuring iOS build for platform: ${IOS_PLATFORM}, "
+ "architecture(s): ${IOS_ARCH}")
+# If user did not specify the SDK root to use, then query xcodebuild for it.
+if (NOT CMAKE_OSX_SYSROOT)
+ execute_process(COMMAND xcodebuild -version -sdk ${XCODE_IOS_PLATFORM} Path
+ OUTPUT_VARIABLE CMAKE_OSX_SYSROOT
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Using SDK: ${CMAKE_OSX_SYSROOT} for platform: ${IOS_PLATFORM}")
+endif()
+if (NOT EXISTS ${CMAKE_OSX_SYSROOT})
+ message(FATAL_ERROR "Invalid CMAKE_OSX_SYSROOT: ${CMAKE_OSX_SYSROOT} "
+ "does not exist.")
+endif()
+# Specify minimum version of deployment target.
+if (NOT DEFINED IOS_DEPLOYMENT_TARGET)
+ # Unless specified, SDK version 8.0 is used by default as minimum target version.
+ set(IOS_DEPLOYMENT_TARGET "8.0"
+ CACHE STRING "Minimum iOS version to build for." )
+ message(STATUS "Using the default min-version since IOS_DEPLOYMENT_TARGET not provided!")
+endif()
+# Use bitcode or not
+if (NOT DEFINED ENABLE_BITCODE)
+ # Unless specified, enable bitcode support by default
+ set(ENABLE_BITCODE FALSE CACHE BOOL "Wheter or not to enable bitcode")
+ message(STATUS "Disabling bitcode support by default. ENABLE_BITCODE not provided!")
+endif()
+# Get the SDK version information.
+execute_process(COMMAND xcodebuild -sdk ${CMAKE_OSX_SYSROOT} -version SDKVersion
+ OUTPUT_VARIABLE IOS_SDK_VERSION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+# Find the Developer root for the specific iOS platform being compiled for
+# from CMAKE_OSX_SYSROOT. Should be ../../ from SDK specified in
+# CMAKE_OSX_SYSROOT. There does not appear to be a direct way to obtain
+# this information from xcrun or xcodebuild.
+if (NOT CMAKE_IOS_DEVELOPER_ROOT)
+ get_filename_component(IOS_PLATFORM_SDK_DIR ${CMAKE_OSX_SYSROOT} PATH)
+ get_filename_component(CMAKE_IOS_DEVELOPER_ROOT ${IOS_PLATFORM_SDK_DIR} PATH)
+endif()
+if (NOT EXISTS ${CMAKE_IOS_DEVELOPER_ROOT})
+ message(FATAL_ERROR "Invalid CMAKE_IOS_DEVELOPER_ROOT: "
+ "${CMAKE_IOS_DEVELOPER_ROOT} does not exist.")
+endif()
+message("CMAKE_IOS_DEVELOPER_ROOT: ${CMAKE_IOS_DEVELOPER_ROOT}")
+# Find the C & C++ compilers for the specified SDK.
+if (NOT CMAKE_C_COMPILER)
+ execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang
+ OUTPUT_VARIABLE CMAKE_C_COMPILER
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Using C compiler: ${CMAKE_C_COMPILER}")
+endif()
+if (NOT CMAKE_CXX_COMPILER)
+ execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find clang++
+ OUTPUT_VARIABLE CMAKE_CXX_COMPILER
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ message(STATUS "Using CXX compiler: ${CMAKE_CXX_COMPILER}")
+endif()
+# Find (Apple's) libtool.
+execute_process(COMMAND xcrun -sdk ${CMAKE_OSX_SYSROOT} -find libtool
+ OUTPUT_VARIABLE IOS_LIBTOOL
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+message(STATUS "Using libtool: ${IOS_LIBTOOL}")
+# Configure libtool to be used instead of ar + ranlib to build static libraries.
+# This is required on Xcode 7+, but should also work on previous versions of
+# Xcode.
+set(CMAKE_C_CREATE_STATIC_LIBRARY
+ "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY
+ "${IOS_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
+# Get the version of Darwin (OS X) of the host.
+execute_process(COMMAND uname -r
+ OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_VERSION
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+# Standard settings.
+set(CMAKE_SYSTEM_NAME Darwin CACHE INTERNAL "")
+set(CMAKE_SYSTEM_VERSION ${IOS_SDK_VERSION} CACHE INTERNAL "")
+set(UNIX TRUE CACHE BOOL "")
+set(APPLE TRUE CACHE BOOL "")
+set(IOS TRUE CACHE BOOL "")
+set(CMAKE_AR ar CACHE FILEPATH "" FORCE)
+set(CMAKE_RANLIB ranlib CACHE FILEPATH "" FORCE)
+# Force unset of OS X-specific deployment target (otherwise autopopulated),
+# required as of cmake 2.8.10.
+set(CMAKE_OSX_DEPLOYMENT_TARGET "" CACHE STRING
+ "Must be empty for iOS builds." FORCE)
+# Set the architectures for which to build.
+set(CMAKE_OSX_ARCHITECTURES ${IOS_ARCH} CACHE STRING "Build architecture for iOS")
+# Skip the platform compiler checks for cross compiling.
+set(CMAKE_CXX_COMPILER_FORCED TRUE)
+set(CMAKE_CXX_COMPILER_WORKS TRUE)
+set(CMAKE_C_COMPILER_FORCED TRUE)
+set(CMAKE_C_COMPILER_WORKS TRUE)
+# All iOS/Darwin specific settings - some may be redundant.
+set(CMAKE_SHARED_LIBRARY_PREFIX "lib")
+set(CMAKE_SHARED_LIBRARY_SUFFIX ".dylib")
+set(CMAKE_SHARED_MODULE_PREFIX "lib")
+set(CMAKE_SHARED_MODULE_SUFFIX ".so")
+set(CMAKE_MODULE_EXISTS 1)
+set(CMAKE_DL_LIBS "")
+set(CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
+set(CMAKE_C_OSX_CURRENT_VERSION_FLAG "-current_version ")
+set(CMAKE_CXX_OSX_COMPATIBILITY_VERSION_FLAG "${CMAKE_C_OSX_COMPATIBILITY_VERSION_FLAG}")
+set(CMAKE_CXX_OSX_CURRENT_VERSION_FLAG "${CMAKE_C_OSX_CURRENT_VERSION_FLAG}")
+message(STATUS "Building for minimum iOS version: ${IOS_DEPLOYMENT_TARGET}"
+ " (SDK version: ${IOS_SDK_VERSION})")
+# Note that only Xcode 7+ supports the newer more specific:
+# -m${XCODE_IOS_PLATFORM}-version-min flags, older versions of Xcode use:
+# -m(ios/ios-simulator)-version-min instead.
+if (IOS_PLATFORM STREQUAL "OS")
+ if (XCODE_VERSION VERSION_LESS 7.0)
+ set(XCODE_IOS_PLATFORM_VERSION_FLAGS
+ "-mios-version-min=${IOS_DEPLOYMENT_TARGET}")
+ else()
+ # Xcode 7.0+ uses flags we can build directly from XCODE_IOS_PLATFORM.
+ set(XCODE_IOS_PLATFORM_VERSION_FLAGS
+ "-m${XCODE_IOS_PLATFORM}-version-min=${IOS_DEPLOYMENT_TARGET}")
+ endif()
+else()
+ # SIMULATOR or SIMULATOR64 both use -mios-simulator-version-min.
+ set(XCODE_IOS_PLATFORM_VERSION_FLAGS
+ "-mios-simulator-version-min=${IOS_DEPLOYMENT_TARGET}")
+endif()
+message(STATUS "Version flags set to: ${XCODE_IOS_PLATFORM_VERSION_FLAGS}")
+
+if (ENABLE_BITCODE)
+ set(BITCODE "-fembed-bitcode")
+ message(STATUS "Enabling bitcode support.")
+else()
+ set(BITCODE "")
+ message(STATUS "Disabling bitcode support.")
+endif()
+
+set(CMAKE_C_FLAGS
+"${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} -fobjc-abi-version=2 -fobjc-arc ${CMAKE_C_FLAGS}")
+# Hidden visibilty is required for C++ on iOS.
+set(CMAKE_CXX_FLAGS
+ "${XCODE_IOS_PLATFORM_VERSION_FLAGS} ${BITCODE} ${CMAKE_CXX_FLAGS}")
+set(CMAKE_CXX_FLAGS_RELEASE "${BITCODE} ${CMAKE_CXX_FLAGS_RELEASE}")
+set(CMAKE_C_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_C_LINK_FLAGS}")
+set(CMAKE_CXX_LINK_FLAGS "${XCODE_IOS_PLATFORM_VERSION_FLAGS} -Wl,-search_paths_first ${CMAKE_CXX_LINK_FLAGS}")
+# In order to ensure that the updated compiler flags are used in try_compile()
+# tests, we have to forcibly set them in the CMake cache, not merely set them
+# in the local scope.
+list(APPEND VARS_TO_FORCE_IN_CACHE
+ CMAKE_C_FLAGS
+ CMAKE_CXX_FLAGS
+ CMAKE_CXX_RELEASE
+ CMAKE_C_LINK_FLAGS
+ CMAKE_CXX_LINK_FLAGS)
+foreach(VAR_TO_FORCE ${VARS_TO_FORCE_IN_CACHE})
+ set(${VAR_TO_FORCE} "${${VAR_TO_FORCE}}" CACHE STRING "" FORCE)
+endforeach()
+set(CMAKE_PLATFORM_HAS_INSTALLNAME 1)
+set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-dynamiclib -headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "-bundle -headerpad_max_install_names")
+set(CMAKE_SHARED_MODULE_LOADER_C_FLAG "-Wl,-bundle_loader,")
+set(CMAKE_SHARED_MODULE_LOADER_CXX_FLAG "-Wl,-bundle_loader,")
+set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib" ".so" ".a")
+# Hack: if a new cmake (which uses CMAKE_INSTALL_NAME_TOOL) runs on an old
+# build tree (where install_name_tool was hardcoded) and where
+# CMAKE_INSTALL_NAME_TOOL isn't in the cache and still cmake didn't fail in
+# CMakeFindBinUtils.cmake (because it isn't rerun) hardcode
+# CMAKE_INSTALL_NAME_TOOL here to install_name_tool, so it behaves as it did
+# before, Alex.
+if (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
+ find_program(CMAKE_INSTALL_NAME_TOOL install_name_tool)
+endif (NOT DEFINED CMAKE_INSTALL_NAME_TOOL)
+# Set the find root to the iOS developer roots and to user defined paths.
+set(CMAKE_FIND_ROOT_PATH ${CMAKE_IOS_DEVELOPER_ROOT} ${CMAKE_OSX_SYSROOT}
+ ${CMAKE_PREFIX_PATH} CACHE string "iOS find search path root" FORCE)
+# Default to searching for frameworks first.
+set(CMAKE_FIND_FRAMEWORK FIRST)
+# Set up the default search directories for frameworks.
+set(CMAKE_SYSTEM_FRAMEWORK_PATH
+ ${CMAKE_OSX_SYSROOT}/System/Library/Frameworks
+ ${CMAKE_OSX_SYSROOT}/System/Library/PrivateFrameworks
+ ${CMAKE_OSX_SYSROOT}/Developer/Library/Frameworks)
+# Only search the specified iOS SDK, not the remainder of the host filesystem.
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+# This little macro lets you set any XCode specific property.
+macro(set_xcode_property TARGET XCODE_PROPERTY XCODE_VALUE XCODE_RELVERSION)
+ set(XCODE_RELVERSION_I "${XCODE_RELVERSION}")
+ if (XCODE_RELVERSION_I STREQUAL "All")
+ set_property(TARGET ${TARGET} PROPERTY
+ XCODE_ATTRIBUTE_${XCODE_PROPERTY} "${XCODE_VALUE}")
+ else()
+ set_property(TARGET ${TARGET} PROPERTY
+ XCODE_ATTRIBUTE_${XCODE_PROPERTY}[variant=${XCODE_RELVERSION_I}] "${XCODE_VALUE}")
+ endif()
+endmacro(set_xcode_property)
+# This macro lets you find executable programs on the host system.
+macro(find_host_package)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER)
+ set(IOS FALSE)
+ find_package(${ARGN})
+ set(IOS TRUE)
+ set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+endmacro(find_host_package)
diff --git a/NvCloth/CmakeGenerateAndroid.bat b/NvCloth/CmakeGenerateAndroid.bat
new file mode 100644
index 0000000..00a0307
--- /dev/null
+++ b/NvCloth/CmakeGenerateAndroid.bat
@@ -0,0 +1,120 @@
+@echo off
+set EXIT_CODE=0
+
+REM Make sure the various variables that we need are set
+
+CD /D %~dp0
+REM echo "Note: You need to run this with admin rights for the first time to set GW_DEPS_ROOT globally."
+call "./scripts/locate_gw_root.bat" GW_DEPS_ROOT_F
+@echo on
+set GW_DEPS_ROOT=%GW_DEPS_ROOT_F%
+echo GW_DEPS_ROOT = %GW_DEPS_ROOT%
+call "./scripts/locate_cmake.bat" CMAKE_PATH_F
+echo CMAKE_PATH_F = %CMAKE_PATH_F%
+
+SET PATH=%PATH%;%CMAKE_PATH_F%
+
+@echo off
+
+IF EXIST %~dp0..\Externals\CMakeModules (
+ set GW_DEPS_ROOT=%~dp0..\
+)
+
+IF NOT DEFINED GW_DEPS_ROOT GOTO GW_DEPS_ROOT_UNDEFINED
+
+set PX_OUTPUT_ROOT=%~dp0
+
+REM Generate projects here
+
+:: 1. Use system NDK
+IF %ANDROID_NDK_ROOT%. EQU . (
+ echo The ANDROID_NDK_ROOT environment variable is not set. Please set it to point to NDK root folder
+ set EXIT_CODE=1
+ GOTO :End
+)
+set "NDK=%ANDROID_NDK_ROOT:\=/%"
+set "NDK_MAKE=%NDK%/prebuilt/windows-x86_64/bin/make.exe"
+:: 2. Use NDK from physx externals
+REM set "PHYSX_ROOT=%GW_DEPS_ROOT:\=/%sw/physx"
+REM set "NDK=%PHYSX_ROOT%/externals/android-ndk/r13b-win32"
+REM set "NDK_MAKE=%NDK%/prebuilt/windows/bin/make.exe"
+::
+
+:: IF [%1] == []
+set CONFIG_NAME=%1
+IF %CONFIG_NAME%. EQU debug. (
+ GOTO :Build
+)
+IF %CONFIG_NAME%. EQU profile. (
+ GOTO :Build
+)
+IF %CONFIG_NAME%. EQU checked. (
+ GOTO :Build
+)
+IF %CONFIG_NAME%. EQU release. (
+ GOTO :Build
+)
+echo "Usage CmakeGenerateAndroid.bat <build_configuration:debug|profile|checked|release>"
+set EXIT_CODE=1
+GOTO :End
+
+:Build
+set ANDROID_API=21
+REM set ANDROID_ABI="armeabi-v7a with NEON"
+REM set ANDROID_ABI="armeabi-v7a"
+set ANDROID_ABI="arm64-v8a"
+set ANDROID_DIR_NAME=android-%ANDROID_ABI%-%CONFIG_NAME%-cmake
+
+rmdir /s /q compiler\%ANDROID_DIR_NAME%\
+mkdir compiler\%ANDROID_DIR_NAME%\
+pushd compiler\%ANDROID_DIR_NAME%\
+
+REM https://cmake.org/cmake/help/v3.7/manual/cmake-toolchains.7.html#cross-compiling-for-android-with-nvidia-nsight-tegra-visual-studio-edition
+REM https://developer.android.com/ndk/guides/cmake.html
+
+REM REM Common cmd line params
+set CMAKE_COMMON_PARAMS=-DANDROID_NDK=%NDK% -DANDROID_ABI=%ANDROID_ABI% -DGW_DEPS_ROOT=%GW_DEPS_ROOT% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME% -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\%ANDROID_DIR_NAME% -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME%
+
+REM Compiler dependent cmd line params
+set CMAKE_COMPILER_PARAMS=-G "MinGW Makefiles" -DCMAKE_MAKE_PROGRAM=%NDK_MAKE% -DCMAKE_BUILD_TYPE=%CONFIG_NAME% -DCMAKE_ANDROID_ARCH_ABI=%ANDROID_ABI%
+REM set CMAKE_COMPILER_PARAMS=-G "Visual Studio 14 2015" -DCMAKE_ANDROID_ARCH=%ANDROID_ABI%
+
+REM Toolchain dependent cmd line params
+REM set CMAKE_TOOLCHAIN_PARAMS=-DCMAKE_TOOLCHAIN_FILE=C:\Users\lpanov\projects\nvidia\NvCloth\Externals\CMakeModules\Android\android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=android-%ANDROID_API% -DANDROID_ABI=%ANDROID_ABI% -DANDROID_STL="gnustl_static" -DTARGET_BUILD_PLATFORM=android
+set CMAKE_TOOLCHAIN_PARAMS=-DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_API_MIN=%ANDROID_API% -DCMAKE_ANDROID_API=%ANDROID_API%
+
+cmake ..\cmake\android %CMAKE_COMPILER_PARAMS% %CMAKE_TOOLCHAIN_PARAMS% %CMAKE_COMMON_PARAMS%
+IF %ERRORLEVEL% NEQ 0 (
+ set EXIT_CODE=%ERRORLEVEL%
+ GOTO :End
+)
+
+REM reference cmd line
+REM cmake ..\cmake\android -G "MinGW Makefiles" -DANDROID_NDK=%NDK% -DCMAKE_MAKE_PROGRAM=%NDK_MAKE% -DTARGET_BUILD_PLATFORM=android -DCMAKE_BUILD_TYPE=%CONFIG_NAME% -DCMAKE_SYSTEM_NAME=Android -DCMAKE_ANDROID_API_MIN=%ANDROID_API% -DCMAKE_ANDROID_API=%ANDROID_API% -DCMAKE_ANDROID_ARCH=%ANDROID_ABI% -DCMAKE_ANDROID_ARCH_ABI=%ANDROID_ABI% -DANDROID_ABI=%ANDROID_ABI% -DCMAKE_ANDROID_GUI=FALSE -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME%-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\%ANDROID_DIR_NAME%-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\%ANDROID_DIR_NAME%-cmake
+
+REM To build the project, go to compiler/%ANDROID_DIR_NAME% and run
+REM %ANDROID_NDK_ROOT%\prebuilt\windows-x86_64\bin\make.exe
+
+popd
+
+
+GOTO :End
+
+:GW_DEPS_ROOT_UNDEFINED
+ECHO GW_DEPS_ROOT has to be defined, pointing to the root of the dependency tree.
+PAUSE
+GOTO END
+
+:BOOST_ROOT_UNDEFINED
+ECHO BOOST_ROOT has to be defined, pointing to the root of your local Boost install.
+PAUSE
+GOTO END
+
+:End
+IF /I "%EXIT_CODE%" NEQ "0" (
+ echo The error code is %EXIT_CODE%
+ exit /b %EXIT_CODE%
+)
+
+echo Configuration succeeded!
+exit /b 0 \ No newline at end of file
diff --git a/NvCloth/CmakeGenerateProjects.bat b/NvCloth/CmakeGenerateProjects.bat
index 36bddde..469e0f3 100644
--- a/NvCloth/CmakeGenerateProjects.bat
+++ b/NvCloth/CmakeGenerateProjects.bat
@@ -1,16 +1,16 @@
@echo off
+REM Usage: CmakeGenerateProjects.bat <0|1:use_cuda (default is 1)> <0|1:use_dx11 (default is 1)>
+set EXIT_CODE=0
+REM Make sure the various variables that we need are set
CD /D %~dp0
echo "Note: You need to run this with admin rights for the first time to set GW_DEPS_ROOT globally."
call "./scripts/locate_gw_root.bat" GW_DEPS_ROOT_F
-@echo on
+REM single " is not a mistake
setx GW_DEPS_ROOT "%GW_DEPS_ROOT_F%
+REM this one is for local use
+set GW_DEPS_ROOT=%GW_DEPS_ROOT_F%
echo GW_DEPS_ROOT = %GW_DEPS_ROOT%
-call "./scripts/locate_cmake.bat" CMAKE_PATH_F
-echo CMAKE_PATH_F = %CMAKE_PATH_F%
-
-
-SET PATH=%PATH%;"%CMAKE_PATH_F%"
REM Make sure the various variables that we need are set
@@ -21,65 +21,84 @@ IF EXIST %~dp0..\Externals\CMakeModules (
set GW_DEPS_ROOT=%~dp0..\
)
-IF NOT DEFINED GW_DEPS_ROOT GOTO GW_DEPS_ROOT_UNDEFINED
+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
+REM handle optional command line arguments
+set USE_CUDA=1
+set USE_DX11=1
+IF %1. NEQ . (set USE_CUDA=%1)
+IF %2. NEQ . (set USE_DX11=%2)
+
+REM Install cmake using packman
+set PACKMAN=call scripts/packman/packman.cmd
+%PACKMAN% pull -p windows "scripts/packman/packages/cmake.packman.xml"
+IF %ERRORLEVEL% NEQ 0 (
+ set EXIT_CODE=%ERRORLEVEL%
+ goto End
+)
+set CMAKE=%PM_PACKAGES_ROOT%/cmake-x64/3.7.0/bin/cmake.exe
-rmdir /s /q compiler\vc11win32-cmake\
-mkdir compiler\vc11win32-cmake\
-pushd compiler\vc11win32-cmake\
-cmake ..\cmake\windows -G "Visual Studio 11 2012" -AWin32 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc11win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win32-cmake
-popd
+REM Common for all generators
+set CMAKE_COMMON_PARAMS=-DTARGET_BUILD_PLATFORM=windows -DNV_CLOTH_ENABLE_DX11=%USE_DX11% -DNV_CLOTH_ENABLE_CUDA=%USE_CUDA% -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DWIN8SDK_PATH="%WIN8SDK_PATH%" -DSTATIC_WINCRT=1
-rmdir /s /q compiler\vc11win64-cmake\
-mkdir compiler\vc11win64-cmake\
-pushd compiler\vc11win64-cmake\
-cmake ..\cmake\windows -G "Visual Studio 11 2012" -Ax64 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc11win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc11win64-cmake
-popd
+REM Generate projects here
+
+REM vc11 isn't officially supported
+REM rmdir /s /q compiler\vc11win32-cmake\
+REM mkdir compiler\vc11win32-cmake\
+REM pushd compiler\vc11win32-cmake\
+REM %CMAKE% ..\cmake\windows -G "Visual Studio 11 2012" -AWin32 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc11win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc11win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc11win32-cmake
+REM popd
+REM rmdir /s /q compiler\vc11win64-cmake\
+REM mkdir compiler\vc11win64-cmake\
+REM pushd compiler\vc11win64-cmake\
+REM %CMAKE% ..\cmake\windows -G "Visual Studio 11 2012" -Ax64 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc11win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc11win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc11win64-cmake
+REM popd
rmdir /s /q compiler\vc12win32-cmake\
mkdir compiler\vc12win32-cmake\
pushd compiler\vc12win32-cmake\
-cmake ..\cmake\windows -G "Visual Studio 12 2013" -AWin32 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc12win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win32-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 12 2013" -AWin32 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc12win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc12win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc12win32-cmake
popd
rmdir /s /q compiler\vc12win64-cmake\
mkdir compiler\vc12win64-cmake\
pushd compiler\vc12win64-cmake\
-cmake ..\cmake\windows -G "Visual Studio 12 2013" -Ax64 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc12win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc12win64-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 12 2013" -Ax64 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc12win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc12win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc12win64-cmake
popd
rmdir /s /q compiler\vc14win32-cmake\
mkdir compiler\vc14win32-cmake\
pushd compiler\vc14win32-cmake\
-cmake ..\cmake\windows -G "Visual Studio 14 2015" -AWin32 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc14win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win32-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 14 2015" -AWin32 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc14win32-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc14win32-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc14win32-cmake
popd
rmdir /s /q compiler\vc14win64-cmake\
mkdir compiler\vc14win64-cmake\
pushd compiler\vc14win64-cmake\
-cmake ..\cmake\windows -G "Visual Studio 14 2015" -Ax64 -DTARGET_BUILD_PLATFORM=windows -DPX_GENERATE_GPU_PROJECTS=1 -DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH_%" -DSTATIC_WINCRT=1 -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\Lib\vc14win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\Bin\vc14win64-cmake
+%CMAKE% ..\cmake\windows -G "Visual Studio 14 2015" -Ax64 %CMAKE_COMMON_PARAMS% -DPX_OUTPUT_DLL_DIR=%PX_OUTPUT_ROOT%\bin\vc14win64-cmake -DPX_OUTPUT_LIB_DIR=%PX_OUTPUT_ROOT%\lib\vc14win64-cmake -DPX_OUTPUT_EXE_DIR=%PX_OUTPUT_ROOT%\bin\vc14win64-cmake
popd
+goto End
-GOTO :End
:GW_DEPS_ROOT_UNDEFINED
-ECHO GW_DEPS_ROOT has to be defined, pointing to the root of the dependency tree.
-PAUSE
-GOTO END
-
-:BOOST_ROOT_UNDEFINED
-ECHO BOOST_ROOT has to be defined, pointing to the root of your local Boost install.
-PAUSE
-GOTO END
+echo GW_DEPS_ROOT has to be defined, pointing to the root of the dependency tree.
+set EXIT_CODE=1
+pause
+goto End
:CUDA_ROOT_UNDEFINED
-ECHO CUDA_BIN_PATH has to be defined, pointing to the bin folder of your local CUDA install.
-PAUSE
+echo CUDA_BIN_PATH has to be defined, pointing to the bin folder of your local CUDA install.
+set EXIT_CODE=1
+pause
+goto End
:End
+if /I "%EXIT_CODE%" EQU "1" (
+ echo CmakeGenerateProjects.bat: the error code is %EXIT_CODE%
+)
+exit /b 0
diff --git a/NvCloth/GenerateProjectsLinux.sh b/NvCloth/GenerateProjectsLinux.sh
index b56176b..c660b15 100644
--- a/NvCloth/GenerateProjectsLinux.sh
+++ b/NvCloth/GenerateProjectsLinux.sh
@@ -1,4 +1,4 @@
-#!/bin/sh +x
+#!/usr/bin/env bash
# Make sure the various variables that we need are set
@@ -14,28 +14,56 @@ fi
export PX_OUTPUT_ROOT="$PWD"
+# Check for the right g++ version (we need at least 4.7 for c++11)
+cur_ver="$(g++ -dumpversion)"
+req_ver="4.7"
+if [ "$(printf "$req_ver\n$cur_ver" | sort -V | head -n1)" == "$cur_ver" ] && [ "$cur_ver" != "$req_ver" ]; then
+ echo "g++ version $cur_ver < $req_ver"
+ if [ -f /usr/bin/g++-4.7 ]; then
+ echo "Forcing cmake to use g++ 4.7"
+ export CC=/usr/bin/gcc-4.7
+ export CXX=/usr/bin/g++-4.7
+ else
+ echo "Unable to find any compatible g++ version. Exiting now"
+ exit 1
+ fi
+ else
+ echo "g++ version $cur_ver >= $req_ver"
+ fi
+
+
+# Install cmake using packman
+export PACKMAN="scripts/packman/packman.sh"
+source $PACKMAN pull -p linux "scripts/packman/packages/cmake.packman.xml" || exit 1
+export CMAKE="$PM_PACKAGES_ROOT/cmake-linux-x86_64/3.7.2/bin/cmake"
+
+
+# You can enable/disable cuda support here
+export USE_CUDA=0
+
+
# Generate projects here
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 -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -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 || exit 1
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 -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -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 || exit 1
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 -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -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 || exit 1
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
-cd ../../ \ No newline at end of file
+$CMAKE ../cmake/linux -G "Unix Makefiles" -DTARGET_BUILD_PLATFORM=linux -DCMAKE_BUILD_TYPE=release -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -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 || exit 1
+cd ../../
diff --git a/NvCloth/GenerateProjectsOsx.sh b/NvCloth/GenerateProjectsOsx.sh
index 576ad2c..ea53921 100644
--- a/NvCloth/GenerateProjectsOsx.sh
+++ b/NvCloth/GenerateProjectsOsx.sh
@@ -2,10 +2,10 @@
# Make sure the various variables that we need are set
-export GW_DEPS_ROOT="$PWD""/../../../../../"
+export GW_DEPS_ROOT="$PWD""/../../../../"
if [ -e $PWD"/../Externals/CMakeModules" ]; then
- export GW_DEPS_ROOT="$PWD""/../"
+ export GW_DEPS_ROOT="$PWD""/../../"
fi
[ -z "$GW_DEPS_ROOT" ] && echo "GW_DEPS_ROOT not defined." && exit 1;
@@ -14,19 +14,28 @@ fi
export PX_OUTPUT_ROOT="$PWD"
+
+# Install cmake using packman
+export PACKMAN="./scripts/packman/packman.sh"
+source $PACKMAN pull -p mac "./scripts/packman/packages/cmake.packman.xml" || exit 1
+export CMAKE="$PM_PACKAGES_ROOT/cmake-mac-x86_64/3.7.2/bin/cmake"
+
+
+# Cuda isn't supported on mac yet
+export USE_CUDA=0
+
+
# Generate projects here
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 -DCMAKE_OSX_ARCHITECTURES=i386 -DPX_32BIT=1 -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DUSE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/osx32-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/osx32-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/osx32-cmake || exit 1
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 -DNV_CLOTH_ENABLE_CUDA=$USE_CUDA -DUSE_CUDA=$USE_CUDA -DPX_GENERATE_GPU_PROJECTS=0 -DPX_OUTPUT_DLL_DIR=$PX_OUTPUT_ROOT/bin/osx64-cmake -DPX_OUTPUT_LIB_DIR=$PX_OUTPUT_ROOT/lib/osx64-cmake -DPX_OUTPUT_EXE_DIR=$PX_OUTPUT_ROOT/bin/osx64-cmake || exit 1
cd ../../
-
-
diff --git a/NvCloth/ReleaseNotes.txt b/NvCloth/ReleaseNotes.txt
index d8ef679..3a398d6 100644
--- a/NvCloth/ReleaseNotes.txt
+++ b/NvCloth/ReleaseNotes.txt
@@ -1,57 +1,101 @@
NvCloth Release notes.
-[1.1.2]
+***************************
+Release Notes
+***************************
+
+1.1.3
+===========================================================================================
Supported platforms:
+
* Windows (CPU, CUDA, DX11)
* Mac (beta, tested on Sierra)
* Linux (beta, tested on Ubuntu 16.04.1 LTS x64)
* PlayStation 4 (beta) with PS4 SDK 4.5
* Xbox one (CPU, DX11, beta)
+* Android (arm64-v8a, API >= 21), tested on Shield TV
+
Note: beta platforms are not yet optimized.
Supported compilers (via cmake 3.7)
+
* Windows: Visual Studio 12, 14 (2013, 2015)
-* Linux: gcc (only x64)
+* Linux: gcc 5.4 (only x64)
* Mac: xcode
* PlayStation 4: Visual studio 14 (2015)
* Xbox one: Visual studio 14 (2015)
+* Android: NDK r12b and above
+
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.
+
+- Incorrect assertion in ClothImpl::setFluidDensity.
+- Make the simulation with MultithreadedSolverHelper work when no cloth present in the solver.
+- Correct number of simulation chunks calculation for DX11/CUDA solvers when no cloths were added to the solver.
+- Cuda wind simulation crashed on older hardware.
+- Internal simd library now lives inside the nv::cloth namespace to avoid issues when statically linked with PhysX.
+
New:
-Added cmake flags to disable dx11 and/or cuda support.
+
+- Introduce addCloths() method for all the solvers, which allows to perform a fast batch addition of multiple cloths.
+- Cuda support on linux (experimental)
+- Android support
+
Known issues:
-DirectX 11 solver has issues with ccd sphere/capsule collision.
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
-[1.1.1]
+1.1.2
+===========================================================================================
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.
+
+- Dynamic allocations at runtime removed from MovingAverage.
+- Possible error when starting samples due to gpu incompatible with dx debug mode.
+
+
+New:
+
+- Added cmake flags to disable dx11 and/or cuda support.
+
Known issues:
-DirectX 11 solver has issues with ccd sphere/capsule collision.
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
+
-[1.1.0]
+1.1.1
+===========================================================================================
Fixed:
-DirectX 11 solver now supports triangle collision shapes and air drag/lift.
-Fixed bug where changing friction on cloth already in simulation would cause assert or crash.
-Optimization flag now working on PS4 release build.
-New:
-Solver::getNumCloths and Solver::getClothList interface.
-Improved samples (new scenes and debug visualization)
+- 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.
Known issues:
-DirectX 11 solver has issues with ccd sphere/capsule collision.
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
+
+
+1.1.0
+===========================================================================================
+Fixed:
+
+- DirectX 11 solver now supports triangle collision shapes and air drag/lift.
+- Fixed bug where changing friction on cloth already in simulation would cause assert or crash.
+- Optimization flag now working on PS4 release build.
+
+
+New:
+
+- Solver::getNumCloths and Solver::getClothList interface.
+- Improved samples (new scenes and debug visualization)
+
-[1.0.0]
Known issues:
-DirectX 11 solver doesn�t support triangle collision shapes and air drag/lift
+- DirectX 11 solver has issues with ccd sphere/capsule collision.
+1.0.0
+===========================================================================================
+Known issues:
+- DirectX 11 solver doesn't support triangle collision shapes and air drag/lift
diff --git a/NvCloth/clean.bat b/NvCloth/clean.bat
index 7afce3a..a66d0a9 100644
--- a/NvCloth/clean.bat
+++ b/NvCloth/clean.bat
@@ -34,4 +34,13 @@ for /d %%G in (".\samples\compiler\vc*") do (
rd %%G /s /q
)
+for /d %%G in (".\compiler\android-*") do (
+rd %%G /s /q
+)
+
+for /d %%G in (".\test\compiler\android-*") do (
+rd %%G /s /q
+)
+
+
pause
diff --git a/NvCloth/compiler/cmake/Linux/NvCloth.cmake b/NvCloth/compiler/cmake/Linux/NvCloth.cmake
index 19038c6..323efd5 100644
--- a/NvCloth/compiler/cmake/Linux/NvCloth.cmake
+++ b/NvCloth/compiler/cmake/Linux/NvCloth.cmake
@@ -7,11 +7,26 @@ MESSAGE("[NvCloth]cmake/linux/NvCloth.cmake")
SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
FIND_PACKAGE(PxShared REQUIRED)
+IF(NOT DEFINED NV_CLOTH_ENABLE_CUDA)
+MESSAGE("NV_CLOTH_ENABLE_CUDA is not defined, setting to 0")
+SET(NV_CLOTH_ENABLE_CUDA 0)
+ENDIF()
+IF(NOT DEFINED NV_CLOTH_ENABLE_DX11)
+SET(NV_CLOTH_ENABLE_DX11 0)
+ENDIF()
+
+MESSAGE("NV_CLOTH_ENABLE_CUDA = " ${NV_CLOTH_ENABLE_CUDA})
+
+IF(${NV_CLOTH_ENABLE_CUDA})
+FIND_PACKAGE(CUDA 8 REQUIRED)
+MESSAGE("Found CUDA:" ${CUDA_INCLUDE_DIRS})
+ENDIF()
#FIND_PACKAGE(nvToolsExt REQUIRED)
SET(NVCLOTH_PLATFORM_INCLUDES
${NVTOOLSEXT_INCLUDE_DIRS}
+ PRIVATE ${CUDA_INCLUDE_DIRS}
)
SET(NVCLOTH_PLATFORM_SOURCE_FILES
@@ -20,12 +35,71 @@ SET(NVCLOTH_PLATFORM_SOURCE_FILES
#${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp
#${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h
)
+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
+ ${PROJECT_ROOT_DIR}/src/cuda/CuClothClone.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuClothData.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuClothData.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuCollision.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuContextLock.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuContextLock.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuDevicePointer.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuDeviceVector.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFabric.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFabric.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFactory.cpp
+ ${PROJECT_ROOT_DIR}/src/cuda/CuFactory.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuPhaseConfig.h
+ ${PROJECT_ROOT_DIR}/src/cuda/CuPinnedAllocator.h
+ ${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_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
+ ${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernel.cu
+)
+set(CUDA_BLOB "${PROJECT_ROOT_DIR}/src/cuda/CuSolverKernelBlob.h")
+cuda_include_directories(
+ ${PXSHARED_ROOT_DIR}/include
+ ${PXSHARED_ROOT_DIR}/src/foundation/include
+ ${PROJECT_ROOT_DIR}/include/NvCloth
+)
+cuda_compile_fatbin(CUDA_FATBIN ${NVCLOTH_CUDA_FILES})
+SET(NVCLOTH_PLATFORM_SOURCE_FILES ${NVCLOTH_PLATFORM_SOURCE_FILES} ${CUDA_BLOB} ${NVCLOTH_CUDA_FILES})
+add_custom_command(
+ OUTPUT ${CUDA_BLOB}
+COMMAND ${CUDA_TOOLKIT_ROOT_DIR}/bin/bin2c --name kCuSolverKernel ${CUDA_FATBIN} > ${CUDA_BLOB}
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+DEPENDS ${CUDA_FATBIN}
+ VERBATIM
+)
+ENDIF()
+
+
# Use generator expressions to set config specific preprocessor definitions
SET(NVCLOTH_COMPILE_DEFS
NV_CLOTH_IMPORT=PX_DLL_EXPORT
NV_CLOTH_ENABLE_DX11=0
- NV_CLOTH_ENABLE_CUDA=0
# Common to all configurations
${PHYSX_LINUX_COMPILE_DEFS};PX_PHYSX_CORE_EXPORTS
@@ -35,6 +109,15 @@ SET(NVCLOTH_COMPILE_DEFS
$<$<CONFIG:profile>:${PHYSX_LINUX_PROFILE_COMPILE_DEFS};PX_PHYSX_DLL_NAME_POSTFIX=PROFILE;>
$<$<CONFIG:release>:${PHYSX_LINUX_RELEASE_COMPILE_DEFS};>
)
+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)
@@ -46,6 +129,7 @@ INCLUDE(../common/NvCloth.cmake)
# TARGET_LINK_LIBRARIES(NvCloth PUBLIC ${NVTOOLSEXT_LIBRARIES} LowLevel LowLevelAABB LowLevelCloth LowLevelDynamics LowLevelParticles PhysXCommon PhysXGpu PxFoundation PxPvdSDK PxTask SceneQuery SimulationController)
TARGET_LINK_LIBRARIES(NvCloth PUBLIC PxFoundation)
+TARGET_LINK_LIBRARIES(NvCloth PUBLIC ${CUDA_CUDA_LIBRARY})
SET_TARGET_PROPERTIES(NvCloth PROPERTIES
LINK_FLAGS_DEBUG ""
diff --git a/NvCloth/compiler/cmake/android/CMakeLists.txt b/NvCloth/compiler/cmake/android/CMakeLists.txt
new file mode 100644
index 0000000..61a6892
--- /dev/null
+++ b/NvCloth/compiler/cmake/android/CMakeLists.txt
@@ -0,0 +1,62 @@
+cmake_minimum_required(VERSION 3.3)
+MESSAGE("[NvCloth]cmake/android/CMakeList.txt")
+include(../common/CMakeLists.txt)
+
+STRING(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWERCASE)
+
+IF(NOT DEFINED TARGET_BUILD_PLATFORM) # Not defined, default to android
+ SET(TARGET_BUILD_PLATFORM "android")
+ENDIF()
+
+SET(PLATFORM_LIST android)
+
+IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST)
+ MESSAGE(FATAL_ERROR "Invalid platform:" ${TARGET_BUILD_PLATFORM})
+ENDIF()
+
+if(${ANDROID_ABI} STREQUAL "armeabi-v7a")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "armeabi-v7a with NEON")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -ffast-math -fno-exceptions -ffunction-sections -funwind-tables -fomit-frame-pointer -funswitch-loops -finline-limit=300 -fno-strict-aliasing -fstack-protector -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "arm64-v8a")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof ")
+elseif(${ANDROID_ABI} STREQUAL "x86")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -fpack-struct=8 -malign-double ")
+elseif(${ANDROID_ABI} STREQUAL "x86_64")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Wno-invalid-offsetof -mstackrealign -msse3 ")
+endif()
+
+SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_CXX_FLAGS_CHECKED "-O3")
+SET(CMAKE_CXX_FLAGS_PROFILE "-O3")
+SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
+
+# a version from pxshared
+#SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;)
+# TODO: __ARM_NEON__;__arm64__ only on supporting archs
+SET(NVCLOTH_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;PX_NVCLOTH_STATIC_LIB;__ARM_NEON__;__arm64__)
+SET(NVCLOTH_ANDROID_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1)
+SET(NVCLOTH_ANDROID_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1)
+SET(NVCLOTH_ANDROID_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1)
+SET(NVCLOTH_ANDROID_RELEASE_COMPILE_DEFS NDEBUG)
+
+
+SET(PX_SELECT_COMPONENTS PxFoundation)
+FIND_PACKAGE(PxShared REQUIRED)
+
+################################################################################
+# TODO
+################################################################################
+# Include the PxShared-exports.cmake file that PxShared created. There's other ways to do this, but there's a bunch of issues with it in a CI environment
+# 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/android "${CMAKE_CURRENT_BINARY_DIR}/pxshared_bin")
+################################################################################
+
+# Include all of the projects
+INCLUDE(NvCloth.cmake)
+
+TARGET_LINK_LIBRARIES(NvCloth PUBLIC PxFoundation)
+
+MESSAGE("[NvCloth]cmake/android/CMakeList.txt END") \ No newline at end of file
diff --git a/NvCloth/compiler/cmake/android/NvCloth.cmake b/NvCloth/compiler/cmake/android/NvCloth.cmake
new file mode 100644
index 0000000..544a3b5
--- /dev/null
+++ b/NvCloth/compiler/cmake/android/NvCloth.cmake
@@ -0,0 +1,39 @@
+#
+# Build NvCloth
+#
+
+SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
+
+SET(NVCLOTH_SOURCE_DIR ${PROJECT_SOURCE_DIR}/../../../)
+
+SET(NVCLOTH_PLATFORM_SOURCE_FILES
+ ${PROJECT_ROOT_DIR}/src/neon/NeonCollision.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/NeonSelfCollision.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/NeonSolverKernel.cpp
+ ${PROJECT_ROOT_DIR}/src/neon/SwCollisionHelpers.h
+)
+
+SET(NVCLOTH_PLATFORM_INCLUDES
+ ${LL_SOURCE_DIR}/include/linux
+ ${ANDROID_NDK}/sources/android/cpufeatures
+)
+
+# Use generator expressions to set config specific preprocessor definitions
+SET(NVCLOTH_COMPILE_DEFS
+ ${NVCLOTH_ANDROID_COMPILE_DEFS};
+ NvCloth_STATIC_LIB; # TODO: needed?
+
+ NV_ANDROID
+ NV_SIMD_SCALAR=1 # always compile scalar paths on android, so we may use them as fallback
+ NV_CLOTH_IMPORT=PX_DLL_EXPORT
+ NV_CLOTH_ENABLE_DX11=0
+ NV_CLOTH_ENABLE_CUDA=0
+
+ $<$<CONFIG:debug>:${NVCLOTH_ANDROID_DEBUG_COMPILE_DEFS};>
+ $<$<CONFIG:checked>:${NVCLOTH_ANDROID_CHECKED_COMPILE_DEFS};>
+ $<$<CONFIG:profile>:${NVCLOTH_ANDROID_PROFILE_COMPILE_DEFS};>
+ $<$<CONFIG:release>:${NVCLOTH_ANDROID_RELEASE_COMPILE_DEFS};>
+)
+
+# include common low level settings
+INCLUDE(../common/NvCloth.cmake)
diff --git a/NvCloth/compiler/cmake/windows/NvCloth.cmake b/NvCloth/compiler/cmake/windows/NvCloth.cmake
index a867a75..2a757f5 100644
--- a/NvCloth/compiler/cmake/windows/NvCloth.cmake
+++ b/NvCloth/compiler/cmake/windows/NvCloth.cmake
@@ -6,9 +6,11 @@ MESSAGE("[NvCloth]cmake/windows/NvCloth.cmake")
IF(NOT DEFINED NV_CLOTH_ENABLE_CUDA)
SET(NV_CLOTH_ENABLE_CUDA 1)
+MESSAGE("Setting NV_CLOTH_ENABLE_CUDA 1")
ENDIF()
IF(NOT DEFINED NV_CLOTH_ENABLE_DX11)
SET(NV_CLOTH_ENABLE_DX11 1)
+MESSAGE("Setting NV_CLOTH_ENABLE_DX11 1")
ENDIF()
SET(GW_DEPS_ROOT $ENV{GW_DEPS_ROOT})
diff --git a/NvCloth/docs/documentation/Compiling/index.html b/NvCloth/docs/documentation/Compiling/index.html
new file mode 100644
index 0000000..90fe4a3
--- /dev/null
+++ b/NvCloth/docs/documentation/Compiling/index.html
@@ -0,0 +1,319 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="x-ua-compatible" content="IE=Edge"/>
+
+ <title>Compiling &mdash; NvCloth 1.1.3 documentation</title>
+
+ <link rel="stylesheet" href="../_static/default.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/breathe.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/application.css" type="text/css" />
+ <link rel="stylesheet" href="../_static/styleguide.css" type="text/css" />
+
+ <script type="text/javascript">
+ var DOCUMENTATION_OPTIONS = {
+ URL_ROOT: '../',
+ VERSION: '1.1.3',
+ COLLAPSE_INDEX: false,
+ FILE_SUFFIX: '.html',
+ HAS_SOURCE: true
+ };
+ </script>
+ <script type="text/javascript" src="../_static/jquery.js"></script>
+ <script type="text/javascript" src="../_static/underscore.js"></script>
+ <script type="text/javascript" src="../_static/doctools.js"></script>
+ <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
+ <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.1.3 documentation" href="../index.html" />
+ <link rel="next" title="Modules" href="../Modules/Index.html" />
+ <link rel="prev" title="Release Notes" href="../ReleaseNotes/index.html" />
+ </head>
+ <body>
+<nav class="navbar navbar-inverse navbar-default">
+ <div class="row">
+ <div class="navbar-brand">
+ <img class="logo" src="../_static/developerzone_gameworks_logo.png" alt="Logo"/>
+ </div>
+<div id="searchbox" style="display: none; float:right; padding-top:4px; padding-right:4px">
+ <form class="search form-inline" action="../search.html" method="get">
+ <div class="form-group">
+ <input type="text" name="q" class="form-control" />
+ <input type="submit" value="Search" class="btn btn-primary" />
+ </div>
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+ </div>
+</nav>
+<div class="masthead">
+ <div class="row">
+ <ul class="breadcrumb">
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
+ </ul>
+ </div>
+</div>
+<div class="row">
+ <div class="col-md-3 bs-sidenav" style="white-space: nowrap; overflow: auto;">
+<div class="bs-sidebar">
+ <div id="sidebar_toc">
+ <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#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1 current"><a class="current reference internal" href="">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#android">Android</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../Modules/Index.html">Modules</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../Modules/Index.html#nvcloth">NvCloth</a></li>
+<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="../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 &amp; 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="../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="../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>
+ <h4>Previous topic</h4>
+ <p class="topless"><a href="../ReleaseNotes/index.html"
+ title="previous chapter">Release Notes</a></p>
+ <h4>Next topic</h4>
+ <p class="topless"><a href="../Modules/Index.html"
+ title="next chapter">Modules</a></p>
+<div id="searchbox" style="display: none">
+ <h4>Quick search</h4>
+ <form class="search form-inline" action="../search.html" method="get">
+ <div class="form-group">
+ <input type="text" name="q" class="form-control" />
+ <input type="submit" value="Search" class="btn btn-primary" />
+ </div>
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ Enter search terms or a module, class or function name.
+ </p>
+</div>
+<script type="text/javascript">$('#searchbox').show(0);</script>
+</div>
+ </div>
+ <div class="document col-md-8">
+ <div class="body">
+
+ <div class="section" id="compiling">
+<h1>Compiling<a class="headerlink" href="#compiling" title="Permalink to this headline">¶</a></h1>
+<p>Cmake is automatically obtained using nvidia&#8217;s packman scripts for all platforms (except for Android).
+Internet connection is required for this.</p>
+<div class="section" id="windows">
+<h2>Windows<a class="headerlink" href="#windows" title="Permalink to this headline">¶</a></h2>
+<p>For windows: Download and install the following dependencies:</p>
+<ul class="simple">
+<li>Visual studio 12 or later (2013 or later)</li>
+<li>Windows 8.1 sdk <a class="reference external" href="https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk">https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk</a></li>
+<li>CUDA sdk <a class="reference external" href="https://developer.nvidia.com/cuda-downloads">https://developer.nvidia.com/cuda-downloads</a> (version 8 or later)</li>
+</ul>
+<p>Edit <tt class="code docutils literal"><span class="pre">scripts/locate_cuda.bat</span></tt> to point to the CUDA installation folder (that contains the bin, include and lib folder), edit <tt class="code docutils literal"><span class="pre">scripts/locate_win8sdk.bat</span></tt> to point to the windows SDK (<tt class="code docutils literal"><span class="pre">C:\Program</span> <span class="pre">Files</span> <span class="pre">(x86)\Windows</span> <span class="pre">Kits\8.1</span></tt> by default)</p>
+<p>Run <tt class="code docutils literal"><span class="pre">CmakeGenerateAll.bat</span></tt> to generate the visual studio solution files in <tt class="code docutils literal"><span class="pre">compiler/vcXXwinXX-cmake/</span></tt>.
+Run <tt class="code docutils literal"><span class="pre">samples/CmakeGenerateProjects.bat</span></tt> to generate the visual studio solution files in <tt class="code docutils literal"><span class="pre">samples/compiler/vcXXwinXX-cmake/</span></tt>.
+For example Visual Studio 2015 solution with 64-bit target processor will be placed to <tt class="code docutils literal"><span class="pre">compiler/vc14win64-cmake/</span></tt> folder.
+Then open <tt class="code docutils literal"><span class="pre">NvCloth.sln</span></tt>, choose the release/debug configuration and build the solution. The library binaries will be put to the <tt class="code docutils literal"><span class="pre">bin</span></tt> folder next to the <tt class="code docutils literal"><span class="pre">compiler</span></tt> folder.</p>
+<p>The above project generation script has optional command line arguments to control whether CUDA/DX11 solvers should be enabled:</p>
+<div class="highlight-python"><pre>CmakeGenerateProjects.bat &lt;0|1:use_cuda (default is 1)&gt; &lt;0|1:use_dx11 (default is 1)&gt;</pre>
+</div>
+<p>E.g.:</p>
+<div class="highlight-python"><pre>CmakeGenerateProjects.bat 1 0</pre>
+</div>
+<p>will include CUDA solver into the compilation but exclude the DX11 solver.</p>
+</div>
+<div class="section" id="linux">
+<h2>Linux<a class="headerlink" href="#linux" title="Permalink to this headline">¶</a></h2>
+<p>Run <tt class="code docutils literal"><span class="pre">GenerateProjectsLinux.sh</span></tt> to generate make files in <tt class="code docutils literal"><span class="pre">compiler/linux64-XXXXX-cmake/</span></tt></p>
+<p>Enable or disable CUDA support by simply changing the following line in the <tt class="code docutils literal"><span class="pre">BuildProjectsLinux.sh</span></tt> script included to the distribution:</p>
+<div class="highlight-python"><pre>export USE_CUDA=0 # 0 for disable 1 for enable</pre>
+</div>
+<p>Run <tt class="code docutils literal"><span class="pre">BuildProjectsLinux.sh</span></tt> script. It will generate various makefile-based projects in the <tt class="code docutils literal"><span class="pre">compiler</span></tt> folder.
+Choose the one you need, e.g.:</p>
+<div class="highlight-python"><pre>cd compiler/linux64-release-cmake</pre>
+</div>
+<p>then run the build process (using 5 compilation processes in parallel):</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">make</span> <span class="o">--</span><span class="n">jobs</span><span class="o">=</span><span class="mi">5</span>
+</pre></div>
+</div>
+<p>The library binaries will be put to the <tt class="code docutils literal"><span class="pre">bin</span></tt> folder next to the <tt class="code docutils literal"><span class="pre">compiler</span></tt> folder.</p>
+<p><strong>Note:</strong> In case you run the Linux project generation scripts <tt class="code docutils literal"><span class="pre">GenerateProjectsLinux.sh</span></tt> and see an error like this:</p>
+<div class="highlight-python"><pre>env: bash\r: No such file or directory</pre>
+</div>
+<p>this command will help to fix the line endings:</p>
+<div class="highlight-python"><pre>sed $'s/\r$//' GenerateProjectsLinux.sh &gt; GenerateProjectsLinux.sh.fixed &amp;&amp; mv GenerateProjectsLinux.sh.fixed GenerateProjectsLinux.sh &amp;&amp; chmod +x GenerateProjectsLinux.sh</pre>
+</div>
+<p>or use your favorite text editor.</p>
+</div>
+<div class="section" id="mac">
+<h2>Mac<a class="headerlink" href="#mac" title="Permalink to this headline">¶</a></h2>
+<p>Running <tt class="code docutils literal"><span class="pre">BuildProjectsOsx.sh</span></tt> will generate various xcode-based projects in the <tt class="code docutils literal"><span class="pre">compiler</span></tt> folder.
+Choose the one you need, e.g. <tt class="code docutils literal"><span class="pre">cd</span> <span class="pre">compiler/osx64-cmake</span></tt>, open the project in XCode and build inside the IDE.</p>
+<p>The library binaries will be put to the <tt class="code docutils literal"><span class="pre">bin</span></tt> folder next to the <tt class="code docutils literal"><span class="pre">compiler</span></tt> folder.</p>
+<p><strong>Note:</strong> In case if you run the Mac project generation scripts GenerateProjectsOsx.sh and see an error like this:</p>
+<div class="highlight-python"><pre>env: bash\r: No such file or directory</pre>
+</div>
+<p>this command will help to fix the line endings:</p>
+<div class="highlight-python"><pre>sed $'s/\r$//' GenerateProjectsOsx.sh &gt; GenerateProjectsOsx.sh.fixed &amp;&amp; mv GenerateProjectsOsx.sh.fixed GenerateProjectsOsx.sh &amp;&amp; chmod +x GenerateProjectsOsx.sh</pre>
+</div>
+</div>
+<div class="section" id="android">
+<h2>Android<a class="headerlink" href="#android" title="Permalink to this headline">¶</a></h2>
+<p>Download and install CMake 3.7 from <a class="reference external" href="https://cmake.org/download/">https://cmake.org/download/</a>. Edit <tt class="code docutils literal"><span class="pre">scripts/locate_cmake.bat</span></tt> to point to the cmake executable.</p>
+<p>Download NDK from <a class="reference external" href="https://developer.android.com/ndk/downloads/index.html">https://developer.android.com/ndk/downloads/index.html</a> (tested versions are r15c, r13b, r12b). Set <tt class="code docutils literal"><span class="pre">ANDROID_NDK_ROOT</span></tt> environment variable to point to the root NDK folder.
+Run project generation script:</p>
+<div class="highlight-python"><pre>CmakeGenerateAndroid.bat release</pre>
+</div>
+<p>You need <tt class="code docutils literal"><span class="pre">cmake</span></tt> to be in your PATH.</p>
+<p>Go to <tt class="code docutils literal"><span class="pre">compiler\android-arm64-v8a-release-cmake</span></tt> folder and run:</p>
+<div class="highlight-python"><pre>cmake --build . -- -j5</pre>
+</div>
+<p>The library binaries will be put to the <tt class="code docutils literal"><span class="pre">bin</span></tt> folder next to the <tt class="code docutils literal"><span class="pre">compiler</span></tt> folder.</p>
+<p><strong>Note:</strong> To be able to build the Android binaries using CMake you need to make sure a certain folders in your NDK point to needed binaries.
+Specifically, you need to create a symlink/copy/rename:</p>
+<div class="highlight-python"><pre>&lt;path_to_android_ndk&gt;/toolchains/aarch64-linux-android-4.9/prebuilt/windows</pre>
+</div>
+<p>to:</p>
+<div class="highlight-python"><pre>&lt;path_to_android_ndk&gt;/toolchains/aarch64-linux-android-4.9/prebuilt/windows-x86_64</pre>
+</div>
+<p>Newer NDK versions might not require doing that at all, but some versions do.</p>
+</div>
+</div>
+
+
+ </div>
+ <div class="clearer"></div>
+ </div>
+ <div class="col-md-1"></div>
+</div>
+<div class="masthead">
+ <div class="row">
+ <ul class="breadcrumb">
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
+ </ul>
+ </div>
+</div>
+
+<footer>
+ <div class="footer-boilerplate">
+ <div class="row">
+ <div class="boilerplate">
+ Copyright &copy; 2014, NVIDIA Corporation &nbsp; | &nbsp; <a href="http://www.nvidia.com/object/about-nvidia.html" onclick="s_objectID=&quot;http://www.nvidia.com/object/about-nvidia.html_1&quot;;return this.s_oc?this.s_oc(e):true">About NVIDIA </a>&nbsp; | &nbsp; <a href="http://www.nvidia.com/object/legal_info.html" onclick="s_objectID=&quot;http://www.nvidia.com/object/legal_info.html_1&quot;;return this.s_oc?this.s_oc(e):true">Legal Information </a>&nbsp; | &nbsp; <a href="http://www.nvidia.com/object/privacy_policy.html" onclick="s_objectID=&quot;http://www.nvidia.com/object/privacy_policy.html_1&quot;;return this.s_oc?this.s_oc(e):true">Privacy Policy </a>
+ </div>
+ </div>
+ </div>
+</div>
+</footer>
+
+
+<script type="text/x-mathjax-config">
+ MathJax.Hub.Config({
+ extensions: ["tex2jax.js"],
+ jax: ["input/TeX", "output/HTML-CSS"],
+ tex2jax: {
+ processEscapes: true,
+ skipTags: ["script","noscript","style","textarea"]
+ },
+ "HTML-CSS": { availableFonts: ["TeX"] },
+ TeX: {
+ Macros: {
+ Lrg: ['\\displaystyle{#1}', 1, ""]
+ }
+ }
+ });
+</script>
+
+
+<script type="text/javascript" async
+ src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
+</script>
+
+<script>
+var treestatename = 'GWDocsTreeState';
+var protocol = location.href.split('/')[0].toLowerCase();
+var storage;
+if (protocol.substring(0,4) == 'http') {
+ storage = $.cookieStorage;
+ storage.setPath('/');
+} else {
+ storage = $.localStorage;
+}
+
+if (storage.isEmpty(treestatename)) {
+ storage.set(treestatename, {});
+}
+
+var treestate = storage.get(treestatename);
+
+$.each($("#sidebar_toc ul li"), toc_walker);
+
+function toc_walker(key, value) {
+ var handleSpan = $("<span></span>")
+ .addClass("toc_handle").prependTo(value);
+ handleSpan.attr("id", $(value).closest("div").attr("id") + "." + key);
+
+ if($(value).has("ul li").size() > 0) {
+ var id = handleSpan.attr("id");
+ if (!(id in treestate)) {
+ treestate[id] = false;
+ }
+ handleSpan.addClass("toc_expanded").click(function() {
+ $(this).toggleClass("toc_expanded toc_collapsed").siblings("ul").toggle();
+ treestate[$(this).attr('id')] = $(this).hasClass('toc_expanded');
+ storage.set(treestatename, treestate);
+ });
+ if(!($(this).hasClass('current') || treestate[id])) {
+ handleSpan.click();
+ }
+ if($(this).hasClass('current')) {
+ treestate[handleSpan.attr('id')] = handleSpan.hasClass('toc_expanded');
+ storage.set(treestatename, treestate);
+ }
+ }
+}
+</script>
+ </body>
+</html> \ No newline at end of file
diff --git a/NvCloth/docs/documentation/CopyRight/Index.html b/NvCloth/docs/documentation/CopyRight/Index.html
index a570acb..3aa2c88 100644
--- a/NvCloth/docs/documentation/CopyRight/Index.html
+++ b/NvCloth/docs/documentation/CopyRight/Index.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>NVIDIA Copyright Notice &mdash; NvCloth 1.0.0 documentation</title>
+ <title>NVIDIA Copyright Notice &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,7 +31,7 @@
<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.1.3 documentation" href="../index.html" />
<link rel="prev" title="User Guide" href="../UserGuide/Index.html" />
</head>
<body>
@@ -56,7 +56,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -67,11 +67,18 @@
<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>
-<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Modules/Index.html">Modules</a><ul>
@@ -150,7 +157,7 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.</p>
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/Modules/Index.html b/NvCloth/docs/documentation/Modules/Index.html
index a959e4c..e65c6ff 100644
--- a/NvCloth/docs/documentation/Modules/Index.html
+++ b/NvCloth/docs/documentation/Modules/Index.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Modules &mdash; NvCloth 1.0.0 documentation</title>
+ <title>Modules &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,9 +31,9 @@
<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.1.3 documentation" href="../index.html" />
<link rel="next" title="User Guide" href="../UserGuide/Index.html" />
- <link rel="prev" title="Release Notes" href="../ReleaseNotes/index.html" />
+ <link rel="prev" title="Compiling" href="../Compiling/index.html" />
</head>
<body>
<nav class="navbar navbar-inverse navbar-default">
@@ -57,7 +57,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -68,11 +68,18 @@
<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>
-<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="">Modules</a><ul>
@@ -108,8 +115,8 @@
</div>
<h4>Previous topic</h4>
- <p class="topless"><a href="../ReleaseNotes/index.html"
- title="previous chapter">Release Notes</a></p>
+ <p class="topless"><a href="../Compiling/index.html"
+ title="previous chapter">Compiling</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../UserGuide/Index.html"
title="next chapter">User Guide</a></p>
@@ -156,7 +163,7 @@ Users that want to use their own cooking or offline cooking can bypass these fun
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/NvCloth.html b/NvCloth/docs/documentation/NvCloth.html
deleted file mode 100644
index 1c86187..0000000
--- a/NvCloth/docs/documentation/NvCloth.html
+++ /dev/null
@@ -1,140 +0,0 @@
-
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>NVIDIA(R) NvCloth Documentation &mdash; NVIDIA NvCloth Documentation</title>
- <link rel="stylesheet" href="_static/nvidia.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
- <link rel="stylesheet" href="_static/custom.css" type="text/css" />
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '',
- VERSION: '0.0',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="NVIDIA NvCloth Documentation" href="index.html" />
- <link rel="next" title="Modules" href="Modules/Index.html" />
- </head>
- <body>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="Modules/Index.html" title="Modules"
- accesskey="N">next</a></li>
- <li><a href="#">NVIDIA NvCloth Documentation</a> &raquo;</li>
- </ul>
- </div>
-
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body">
-
- <div class="section" id="nvidia-r-nvcloth-documentation">
-<h1>NVIDIA(R) NvCloth Documentation<a class="headerlink" href="#nvidia-r-nvcloth-documentation" title="Permalink to this headline">¶</a></h1>
-<blockquote>
-<p>(NVIDIA(R) NvCloth)</p>
-<p>Contents:</p>
-<div class="toctree-wrapper compound">
-<ul>
-<li class="toctree-l1"><a class="reference internal" href="Modules/Index.html">Modules</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="Modules/Index.html#nvcloth">NvCloth</a></li>
-<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></li>
-<li class="toctree-l2"><a class="reference internal" href="UsersGuide/Index.html#usage">Usage</a></li>
-</ul>
-</li>
-<li class="toctree-l1"><a class="reference internal" href="CopyRight/Index.html">NVIDIA Copyright Notice</a></li>
-</ul>
-</div>
-</blockquote>
-</div>
-
-
- </div>
- </div>
- </div>
- <div class="sphinxsidebar">
- <div class="sphinxsidebarwrapper">
- <h4>Next topic</h4>
- <p class="topless"><a href="Modules/Index.html"
- title="next chapter">Modules</a></p>
-<div id="searchbox" style="display: none">
- <h3>Quick search</h3>
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" size="18" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- <p class="searchtip" style="font-size: 90%">
- Enter search terms or a module, class or function name.
- </p>
-</div>
-<script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="Modules/Index.html" title="Modules"
- >next</a></li>
- <li><a href="#">NVIDIA NvCloth Documentation</a> &raquo;</li>
- </ul>
- </div>
-
- <script type="text/javascript">
- $(document).ready(function() {
- $(".toggle > *").hide();
- $(".toggle .header").show();
- $(".toggle .header").click(function() {
- $(this).parent().children().not(".header").toggle(400);
- $(this).parent().children(".header").toggleClass("open");
- })
- });
-</script>
-
-
-<script type="text/x-mathjax-config">
- MathJax.Hub.Config({
- extensions: ["tex2jax.js"],
- jax: ["input/TeX", "output/HTML-CSS"],
- tex2jax: {
- processEscapes: true,
- skipTags: ["script","noscript","style","textarea"]
- },
- "HTML-CSS": { availableFonts: ["TeX"] },
- TeX: {
- Macros: {
- Lrg: ['\\displaystyle{#1}', 1, ""]
- }
- }
- });
-</script>
-
-
-<script type="text/javascript" async
- src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
-</script>
-
-
- </body>
-</html> \ No newline at end of file
diff --git a/NvCloth/docs/documentation/ReleaseNotes/index.html b/NvCloth/docs/documentation/ReleaseNotes/index.html
index 214a7db..694273a 100644
--- a/NvCloth/docs/documentation/ReleaseNotes/index.html
+++ b/NvCloth/docs/documentation/ReleaseNotes/index.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Release Notes &mdash; NvCloth 1.0.0 documentation</title>
+ <title>Release Notes &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,8 +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="next" title="Modules" href="../Modules/Index.html" />
+ <link rel="top" title="NvCloth 1.1.3 documentation" href="../index.html" />
+ <link rel="next" title="Compiling" href="../Compiling/index.html" />
<link rel="prev" title="NvCloth" href="../index.html" />
</head>
<body>
@@ -57,7 +57,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -68,11 +68,18 @@
<h4>Table Of Contents</h4>
<ul class="current">
<li class="toctree-l1 current"><a class="current reference internal" href="">Release Notes</a><ul>
-<li class="toctree-l2"><a class="reference internal" href="#fixes">Fixes</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#new-features">New Features</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#supported-platforms">Supported Platforms</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#supported-compilers">Supported Compilers</a></li>
-<li class="toctree-l2"><a class="reference internal" href="#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Modules/Index.html">Modules</a><ul>
@@ -111,8 +118,8 @@
<p class="topless"><a href="../index.html"
title="previous chapter">NvCloth</a></p>
<h4>Next topic</h4>
- <p class="topless"><a href="../Modules/Index.html"
- title="next chapter">Modules</a></p>
+ <p class="topless"><a href="../Compiling/index.html"
+ title="next chapter">Compiling</a></p>
<div id="searchbox" style="display: none">
<h4>Quick search</h4>
<form class="search form-inline" action="../search.html" method="get">
@@ -135,88 +142,89 @@
<div class="section" id="release-notes">
<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>
+<div class="section" id="id1">
+<h2>1.1.3<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
+<p>Supported platforms:</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 &#8220;unused typedef <cite>__t100</cite>&#8221; warning in xcode.</li>
+<li>Windows (CPU, CUDA, DX11)</li>
+<li>Mac (beta, tested on Sierra)</li>
+<li>Linux (beta, tested on Ubuntu 16.04.1 LTS x64)</li>
+<li>PlayStation 4 (beta) with PS4 SDK 4.5</li>
+<li>Xbox one (CPU, DX11, beta)</li>
+<li>Android (arm64-v8a, API &gt;= 21), tested on Shield TV</li>
</ul>
-<p><strong>1.1.0</strong></p>
+<p>Note: beta platforms are not yet optimized.</p>
+<p>Supported compilers (via cmake 3.7)</p>
<ul class="simple">
-<li>DirectX 11 solver now supports triangle collision shapes and air drag/lift.</li>
-<li>Fixed bug where changing friction on cloth already in simulation would cause assert or crash.</li>
-<li>Optimization flag now working on PS4 release build.</li>
+<li>Windows: Visual Studio 12, 14 (2013, 2015)</li>
+<li>Linux: gcc 5.4 (only x64)</li>
+<li>Mac: xcode</li>
+<li>PlayStation 4: Visual studio 14 (2015)</li>
+<li>Xbox one: Visual studio 14 (2015)</li>
+<li>Android: NDK r12b and above</li>
</ul>
-</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>
+<p>Fixed:</p>
<ul class="simple">
-<li>Added cmake flags to disable dx11 and/or cuda support.</li>
+<li>Incorrect assertion in ClothImpl::setFluidDensity.</li>
+<li>Make the simulation with MultithreadedSolverHelper work when no cloth present in the solver.</li>
+<li>Correct number of simulation chunks calculation for DX11/CUDA solvers when no cloths were added to the solver.</li>
+<li>Cuda wind simulation crashed on older hardware.</li>
+<li>Internal simd library now lives inside the nv::cloth namespace to avoid issues when statically linked with PhysX.</li>
</ul>
-<p><strong>1.1.0</strong></p>
+<p>New:</p>
<ul class="simple">
-<li>Solver::getNumCloths and Solver::getClothList interface.</li>
-<li>Improved samples (new scenes and debug visualization)</li>
-</ul>
-<p><strong>1.0.0</strong></p>
-<ul class="simple">
-<li>Initial release of NvCloth</li>
-<li>Stiffness per constraint feature</li>
-<li>New wind (air drag/lift) implementation</li>
+<li>Introduce addCloths() method for all the solvers, which allows to perform a fast batch addition of multiple cloths.</li>
+<li>Cuda support on linux (experimental)</li>
+<li>Android support</li>
</ul>
+<p>Known issues:
+- DirectX 11 solver has issues with ccd sphere/capsule collision.</p>
</div>
-<div class="section" id="supported-platforms">
-<h2>Supported Platforms<a class="headerlink" href="#supported-platforms" title="Permalink to this headline">¶</a></h2>
-<p><strong>1.1.0</strong></p>
+<div class="section" id="id2">
+<h2>1.1.2<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2>
+<p>Fixed:</p>
<ul class="simple">
-<li>Windows (CPU, CUDA, DX11, RenderCloth)</li>
-<li>Mac (beta, tested on Sierra, RenderCloth)</li>
-<li>Linux (beta, tested on Ubuntu 16.04.1 LTS x64)</li>
-<li>PlayStation 4 (beta) with PS4 4.5 SDK</li>
-<li>Xbox one (CPU, DX11, beta)</li>
+<li>Dynamic allocations at runtime removed from MovingAverage.</li>
+<li>Possible error when starting samples due to gpu incompatible with dx debug mode.</li>
</ul>
-<p>Note: beta platforms are not yet optimized.</p>
-<p><strong>1.0.0</strong></p>
+<p>New:</p>
<ul class="simple">
-<li>Windows (CPU, CUDA, DX11, RenderCloth)</li>
-<li>Mac (beta, tested on Sierra, RenderCloth)</li>
-<li>Linux (beta, tested on Ubuntu 16.04.1 LTS x64)</li>
-<li>PlayStation 4 (beta)</li>
-<li>Xbox one (CPU, DX11, beta)</li>
+<li>Added cmake flags to disable dx11 and/or cuda support.</li>
</ul>
-<p>Note: beta platforms are not yet optimized.</p>
+<p>Known issues:
+- DirectX 11 solver has issues with ccd sphere/capsule collision.</p>
</div>
-<div class="section" id="supported-compilers">
-<h2>Supported Compilers<a class="headerlink" href="#supported-compilers" title="Permalink to this headline">¶</a></h2>
-<p><strong>1.0.0</strong></p>
-<p>Using cmake 3.7</p>
+<div class="section" id="id3">
+<h2>1.1.1<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h2>
+<p>Fixed:</p>
<ul class="simple">
-<li>Windows: Visual Studio 12, 14 (2013, 2015)</li>
-<li>Linux: gcc (only x64)</li>
-<li>Mac: xcode</li>
-<li>PlayStation 4: Visual studio 14 (2015)</li>
-<li>Xbox one: Visual studio 14 (2015)</li>
+<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 &#8220;unused typedef <cite>__t100</cite>&#8221; warning in xcode.</li>
</ul>
+<p>Known issues:
+- DirectX 11 solver has issues with ccd sphere/capsule collision.</p>
</div>
-<div class="section" id="known-issues">
-<h2>Known Issues<a class="headerlink" href="#known-issues" title="Permalink to this headline">¶</a></h2>
-<p><strong>1.1.0</strong></p>
+<div class="section" id="id4">
+<h2>1.1.0<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h2>
+<p>Fixed:</p>
<ul class="simple">
-<li>DirectX 11 solver has issues with ccd sphere/capsule collision.</li>
+<li>DirectX 11 solver now supports triangle collision shapes and air drag/lift.</li>
+<li>Fixed bug where changing friction on cloth already in simulation would cause assert or crash.</li>
+<li>Optimization flag now working on PS4 release build.</li>
</ul>
-<p><strong>1.0.0</strong></p>
+<p>New:</p>
<ul class="simple">
-<li>DirectX 11 solver doesn&#8217;t support triangle collision shapes and air drag/lift</li>
+<li>Solver::getNumCloths and Solver::getClothList interface.</li>
+<li>Improved samples (new scenes and debug visualization)</li>
</ul>
+<p>Known issues:
+- DirectX 11 solver has issues with ccd sphere/capsule collision.</p>
+</div>
+<div class="section" id="id5">
+<h2>1.0.0<a class="headerlink" href="#id5" title="Permalink to this headline">¶</a></h2>
+<p>Known issues:
+- DirectX 11 solver doesn&#8217;t support triangle collision shapes and air drag/lift</p>
</div>
</div>
@@ -229,7 +237,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/UserGuide/Index.html b/NvCloth/docs/documentation/UserGuide/Index.html
index 0beb791..007e3b9 100644
--- a/NvCloth/docs/documentation/UserGuide/Index.html
+++ b/NvCloth/docs/documentation/UserGuide/Index.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>User Guide &mdash; NvCloth 1.0.0 documentation</title>
+ <title>User Guide &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,7 +31,7 @@
<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.1.3 documentation" href="../index.html" />
<link rel="next" title="NVIDIA Copyright Notice" href="../CopyRight/Index.html" />
<link rel="prev" title="Modules" href="../Modules/Index.html" />
</head>
@@ -57,7 +57,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -68,11 +68,18 @@
<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>
-<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="../Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="../Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../Modules/Index.html">Modules</a><ul>
@@ -507,7 +514,7 @@ cloth-&gt;setLiftCoefficient(0.6f);</pre>
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="../index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="../index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/genindex.html b/NvCloth/docs/documentation/genindex.html
index dacd262..5b5455f 100644
--- a/NvCloth/docs/documentation/genindex.html
+++ b/NvCloth/docs/documentation/genindex.html
@@ -8,7 +8,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Index &mdash; NvCloth 1.0.0 documentation</title>
+ <title>Index &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -19,7 +19,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -32,7 +32,7 @@
<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.1.3 documentation" href="index.html" />
</head>
<body>
<nav class="navbar navbar-inverse navbar-default">
@@ -56,7 +56,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -67,11 +67,18 @@
<h4>Table Of Contents</h4>
<ul>
<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>
-<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Modules/Index.html">Modules</a><ul>
@@ -145,7 +152,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/index.html b/NvCloth/docs/documentation/index.html
index fbaa4fe..d62e021 100644
--- a/NvCloth/docs/documentation/index.html
+++ b/NvCloth/docs/documentation/index.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>NvCloth &mdash; NvCloth 1.0.0 documentation</title>
+ <title>NvCloth &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -31,7 +31,7 @@
<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="#" />
+ <link rel="top" title="NvCloth 1.1.3 documentation" href="#" />
<link rel="next" title="Release Notes" href="ReleaseNotes/index.html" />
</head>
<body>
@@ -56,7 +56,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="#">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="#">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -67,11 +67,18 @@
<h4>Table Of Contents</h4>
<ul>
<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>
-<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Modules/Index.html">Modules</a><ul>
@@ -148,6 +155,7 @@
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="ReleaseNotes/index.html">Release Notes</a></li>
+<li class="toctree-l1"><a class="reference internal" href="Compiling/index.html">Compiling</a></li>
<li class="toctree-l1"><a class="reference internal" href="Modules/Index.html">Modules</a></li>
<li class="toctree-l1"><a class="reference internal" href="UserGuide/Index.html">User Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="CopyRight/Index.html">NVIDIA Copyright Notice</a></li>
@@ -165,7 +173,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="#">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="#">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/search.html b/NvCloth/docs/documentation/search.html
index 0cc48f4..27fab06 100644
--- a/NvCloth/docs/documentation/search.html
+++ b/NvCloth/docs/documentation/search.html
@@ -7,7 +7,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=Edge"/>
- <title>Search &mdash; NvCloth 1.0.0 documentation</title>
+ <title>Search &mdash; NvCloth 1.1.3 documentation</title>
<link rel="stylesheet" href="_static/default.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
@@ -18,7 +18,7 @@
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
- VERSION: '1.0.0',
+ VERSION: '1.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -32,7 +32,7 @@
<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.1.3 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
@@ -52,7 +52,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
@@ -63,11 +63,18 @@
<h4>Table Of Contents</h4>
<ul>
<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>
-<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#known-issues">Known Issues</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id1">1.1.3</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id2">1.1.2</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id3">1.1.1</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id4">1.1.0</a></li>
+<li class="toctree-l2"><a class="reference internal" href="ReleaseNotes/index.html#id5">1.0.0</a></li>
+</ul>
+</li>
+<li class="toctree-l1"><a class="reference internal" href="Compiling/index.html">Compiling</a><ul>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#windows">Windows</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#linux">Linux</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#mac">Mac</a></li>
+<li class="toctree-l2"><a class="reference internal" href="Compiling/index.html#android">Android</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="Modules/Index.html">Modules</a><ul>
@@ -139,7 +146,7 @@
<div class="masthead">
<div class="row">
<ul class="breadcrumb">
- <li><a href="index.html">NvCloth 1.0.0 documentation</a></li>
+ <li><a href="index.html">NvCloth 1.1.3 documentation</a></li>
</ul>
</div>
</div>
diff --git a/NvCloth/docs/documentation/searchindex.js b/NvCloth/docs/documentation/searchindex.js
index 0ac2dee..03c0429 100644
--- a/NvCloth/docs/documentation/searchindex.js
+++ b/NvCloth/docs/documentation/searchindex.js
@@ -1 +1 @@
-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
+Search.setIndex({envversion:42,terms:{represent:2,all:[1,2,5,4,6,7,9],code:[8,2,3,4],edg:[],orthogon:3,osx:[],skip:[2,4],global:4,yellow:1,signific:1,sleep:3,overlap:2,capsul:[],follow:[2,9,4,3],content:8,depend:[3,1,9,4],negativescal:2,descript:7,setselfcollisiondist:1,solvefabr:3,text:[3,9],kits8:[],introduc:5,sourc:3,everi:[2,1],lrg:3,offlin:7,setfrict:4,volum:[2,3],friction:[2,5,4],setplan:4,cook:[4,7],evert:4,ajust:3,brows:0,cuctxcreat:4,pbw:3,info:2,dampen:4,doesn:[2,5,4],stiff:[1,3,4],did:5,list:[3,4,7],iter:[2,3,4],calculatefrictionimpuls:2,tunnel:4,adjust:4,phase:[1,3,4],d_o:2,sqdeltalegnth:2,small:[2,3],setdragcoeffici:4,refer:[2,3,4],dir:3,upper:1,smaller:[1,3,4],p_j:3,unnorm:3,natur:4,compens:3,direct:3,batch:5,past:2,particle_invmass:3,second:2,design:0,pass:4,download:9,massscal:3,p_t:3,blue:2,index:[3,1,9,4],lastkei:1,hide:3,r15c:9,neg:2,section:[2,4],abl:9,brief:7,current:[2,1,3,4,7],delet:4,experiment:5,invers:[3,4],intersect:[2,1,4],"new":[3,5,4],impuls:[2,3,4],method:[5,4],movement:[2,3,4],cull:[2,1],intellectu:6,hash:1,deriv:2,locate_cuda:9,cellcount:1,swcollis:[2,1],getsimulationchunkcount:4,coeffici:[3,4],onli:[2,1,5,4],here:[2,3,4,7],tangent:2,ubuntu:5,path:9,along:[2,1],vertic:[3,4],p_2:3,sinc:4,valu:[2,1,3,4],p_1:3,convert:[2,1],shift:4,larger:1,bot:2,bitmask:2,r12b:[9,5],setposit:4,edison55:[],pick:[1,4],chang:[2,9,5,4],eshear:4,via:5,regardless:4,repositori:[],appli:[2,3,4],sphereradiu:2,linearli:5,c_1:[2,3],c_0:3,c_2:[2,3],clothfabriccook:4,oscil:4,instabl:[3,4],instal:9,unit:5,parallelizetarget:[],from:[1,2,3,5,4,6,7,9],describ:[8,2,1,3,4],would:[2,5],memori:4,doubl:[2,3],visit:0,two:[2,1,4],next:[2,1,9],live:[5,4],program:9,call:4,shortest:1,taken:1,suppos:1,type:[3,4],tell:4,"const":4,desir:4,settetherconstraintstiff:4,c_i:2,c_j:3,finit:2,warn:5,vcxxwinxx:9,visual:[9,5],all_build:[],particular:3,known:[1,5],ebend:4,hold:4,reproduct:6,graphic:4,stretchlimit:3,prepar:7,work:[8,2,3,5,4],fast:[0,5,4],dxcontextmanagercallbackimpl:4,penetr:2,remain:[1,3],pxquat:4,vertexcount:4,can:[2,1,3,4,7],whether:9,particledelta:2,d3d11:4,root:9,veloc:[2,3],control:[9,4],nearest:3,give:[2,3,4,7],process:[1,9],lock:4,sudo:[],share:4,calcul:[2,1,3,5,4],indic:[2,1,3,4],high:3,sphere:[],minimum:[2,1],proprietari:6,bend:3,want:[1,4,7],setconvex:4,ratio:1,alwai:4,differenti:[3,4],multipl:[3,5,4],straightforward:4,divid:[2,1,3,4],georg:[],snippet:4,how:[1,3,4],pseudo:3,consist:4,env:9,instead:[1,3,4],simpl:4,sin:[2,3],updat:3,editor:9,product:0,collisionshap:4,frac:[2,3],clothdata:1,teleport:4,tetherconstraintstiff:3,setangularinertia:4,after:[3,4],surfac:[2,3],usabl:2,constraint:[],diagram:[2,1],befor:[2,4],mac:[],mesh:[1,4,7],generatecon:2,buildacceler:2,mai:4,end:[3,9,4],data:[],parallel:9,physic:5,stabil:4,alloc:[5,4],setwindveloc:4,interpol:[2,3],amount:1,createcloth:4,explicit:3,correspond:[2,4],element:3,issu:[5,4],inform:[3,4],"switch":4,green:2,compressionlimit:3,allow:[5,4],"253x253":1,order:[1,3,4],wind:[],vc14win64:9,oper:1,rotat:3,v_r:2,osxxx:[],over:[2,4],move:[2,3,4],becaus:[2,1],sphere_radiu:3,nv_cloth_delet:4,through:[2,4],sqrt:[2,3],left:[2,3],v_l:2,still:4,pointer:1,directx:5,paramet:[5,4],divis:3,typedef:5,group:4,directli:[2,1,4,7],fix:[3,9,5,4],curesult:4,better:4,platform:[3,9,5,4],window:[],pend:4,mrestvalu:3,bypass:7,clothimpl:[3,5],featurelevel:4,might:[3,9,4],tri:1,non:[2,1],good:4,crash:5,thei:[2,1,4],handl:[2,4,7],safe:4,sooner:3,number:5,"break":4,mappedrang:4,now:[1,5,4],discuss:2,bigger:2,somewher:4,name:3,anyth:4,edit:9,config:4,solver:[],win32:[],easili:4,mode:5,each:[2,1,3,4],debug:[9,5],ndk:[9,5],mean:[3,4],compil:[],prohibit:6,cudacontext:4,weight:3,replac:[3,4],individu:1,continu:[2,1,4],playstat:5,dx11:[9,5,4],"static":[5,4],connect:[3,9,4],fluctuat:3,happen:3,firstkei:1,variabl:[1,9],getnumcloth:5,won:2,space:[],goe:3,settriangl:4,your:[9,4],profil:4,rewrit:3,vector:[3,4],suitabl:0,rel:[1,4],internet:9,hardwar:5,chmod:9,gridbia:1,correct:[5,4],red:2,mphase:3,model:[3,5],log2:3,insid:[2,9,5],advanc:4,midpoint:2,selfcollideparticl:3,reason:1,base:[1,9],removecloth:4,put:9,org:9,"byte":[1,4],compressionlimitc:3,combin:[2,1,3],bash:9,setliftcoeffici:4,reusabl:4,thread:4,angl:3,frequenc:[3,4],could:4,keep:[2,1,3,4],motion:[3,4],thing:4,length:[2,1,3,4],enforc:3,place:9,outsid:3,nvcloth:[],retain:6,onto:2,licens:6,first:[2,1,3,4],origin:[3,4],softwar:6,render:4,x86_64:9,cuda_success:4,arrai:[1,3,4],independ:3,scene:[5,4],sometim:4,alreadi:[5,4],done:[2,1,3],least:[1,4],setcapsul:4,thick:2,miss:4,primari:2,size:[1,3,4],given:[2,1,3],script:9,interact:0,system:4,construct:[2,1,4],averag:2,circl:2,gpu:[5,4],dt1:3,dt0:3,store:[2,1,3,4],too:[1,3],dampexpon:3,getnumtriangl:4,option:[9,4],endsimul:4,namespac:5,aabb:1,copi:9,lower:[1,4],plane:[8,2,3,4],part:[2,3,4,7],mostli:3,quad:[4,7],exactli:[2,3],than:[2,1],ehorizont:4,f_d:3,stiffnessc:3,prune:2,provid:[0,1,4,7],remov:[5,4],d3d11createdevic:4,rate:2,charact:0,project:[2,9],reus:[1,3],includ:[3,9,4,7],were:5,posit:[2,1,3,4],dxcontextmanagercallback:4,lowest:2,comput:2,behavior:[3,5,4],nicer:1,favorit:9,sphererang:4,getclothlist:5,ani:[6,4],nvclothcookfabricfrommesh:4,dash:2,thereto:6,constrainteth:3,have:[2,4],reserv:[6,1],need:[2,1,9,4,3],clothmeshdesc:4,incompat:5,border:2,caus:[3,5,4],strength:4,d3d_feature_level:4,lib:[9,7],min:[1,3],r_p:2,destroi:4,self:[],accuraci:4,note:[],also:[2,1,3,4],without:[6,1,3,4],r_m:2,which:[1,5,4,2,7,3],stretchi:[3,4],environ:9,depenetr:2,graviti:4,singl:3,clearinertia:4,even:[2,4],begin:[2,1,3,4],sure:9,android_ndk_root:9,distribut:[6,9],normal:[2,3],multipli:[2,3,4],dxdevic:4,previou:[2,1,3,4],reach:[3,4],react:[5,4],most:4,beta:5,regular:[2,1],cucontext:4,specifi:[1,3,4],rho:3,thi:[1,2,3,4,6,7,8,9],pair:[2,1,3,4],alpha:2,cap:2,"8x8x8":2,cmakegenerateal:9,r_1:2,clear:4,later:[9,4],cover:1,doe:[2,1,3,4],settetherconstraintscal:4,runtim:[7,5,4],clean:[],hresult:4,gridscal:1,constrain:[3,4],cmakegenerateproject:9,sum:2,dot:2,slope:2,settodefault:4,radix:1,getcurrentparticl:4,show:[3,4],opposit:3,xcode:[9,5],stiffnessexpon:3,radiu:[2,3,4],radii:2,concurr:4,dxdevicecontext:4,threshold:3,callback:4,help:[3,9,4],cell:[2,1],id3d11devic:4,slow:[1,3],locat:4,mathrm:3,simulatechunk:4,explain:[2,3],configur:[9,4],solut:9,state:3,should:[3,9,4],computebound:[1,3],version:9,black:2,sierra:5,folder:9,local:[],count:[2,1,3,4],unus:5,variou:9,get:4,pxallocatorcallback:4,einvalid:4,express:6,fluid:[3,5],bucketmask:1,cannot:[1,4],phasetypeinfo:4,longest:1,increas:[3,4],requir:[1,9,4],target:[3,9,4],bat:9,enabl:[2,9],twice:2,gust:4,v8a:[9,5],shape:[5,4],f_l:3,though:[2,1],contain:[2,1,9,4,3],cudevicegetcount:4,where:[2,1,3,5],view:0,set:[2,1,9,4,3],sear:3,frame:[2,3,4],physx_root:[],maximum:[2,3],graphicscontextmanag:4,d3d_driver_type_hardwar:4,see:[2,9],sed:9,result:[2,3,5,4],mstiff:4,close:1,horizont:[3,4],xxxxx:9,mergeacceler:2,closer:3,nvclothcreatefactorycuda:4,pxerrorcallback:4,collisiondist:1,correctli:2,sphere_cent:3,vari:4,someth:4,dll:7,written:3,devicecount:4,dynam:5,movingaverag:5,between:[2,1,3,4],prebuilt:9,theta:3,awai:1,previous:4,approach:2,across:4,altern:[],teamciti:[],extend:2,osx64:9,nvclothdestroyfactori:4,job:9,solv:[2,3,4],let:4,inertia:4,addit:[3,5,4],mstretchlimit:4,both:[2,3],last:[1,3,4],planesr:4,howev:2,equal:4,against:[2,1],nearbi:1,etc:4,instanc:[3,4],equat:3,context:4,improv:[5,4],whole:[1,4],multithreadedsolverhelp:5,comment:3,springi:4,simpli:9,point:[2,9,4,3],within:[2,1],int32_t:4,decrefcount:4,chunk:5,pop:3,addcloth:[5,4],featur:[0,3,4,7],linux:[],sentinel:1,trianglecount:4,duplic:1,coupl:4,stretch:3,damp:[3,4],infinit:2,devic:4,due:[3,5],been:4,mark:[2,1],p_0:3,modif:6,quickli:1,stretchlimitc:3,particle_position0:3,stride:4,clothfabricphasetyp:4,imag:2,densiti:[3,5],search:0,unnecessarili:2,argument:[9,4],assert:[5,4],coordin:[1,4],zero:3,togeth:4,nvclothcreatefactorydx11:4,renam:9,present:5,"case":[2,9,4,3],highest:2,nvclothext:4,align:[2,4],properti:[],mcloth:4,setgrav:4,air:[3,5,4],log_2:3,defin:[3,4],sln:9,euler:3,mindic:3,error:[3,9,5,4],report:4,anchor:3,loop:1,subsect:2,bin:[1,9],use_dx11:9,stiffnessfrequ:3,togglecont:3,helper:4,mcompressionlimit:4,getnumconvex:4,initializenvcloth:4,them:4,particle_posit:3,itself:4,setsolverfrequ:4,abov:[1,3,5,4,2,9],"return":4,routin:2,triangler:4,mset:3,develop:[0,9],open:9,paw:3,perform:[5,4],make:[1,9,5,4],belong:3,x64:5,same:[3,4,7],"while":[2,3,4],binari:[2,9],html:9,split:2,freed:4,largest:1,android:[],fill:[2,4],start:[1,3,5,4],higher:4,ignor:2,deiniti:4,http:9,x86:9,t4f:[2,1],constrainmot:3,optim:[1,5],effect:4,kit:9,getnorm:4,user:[],mani:[1,4],extern:[],robust:0,implement:[3,4],sqrlength:3,usemultipli:3,task:7,beginsimul:4,older:5,com:9,usual:3,know:4,anim:0,exampl:[9,4],command:9,uint32_t:4,choos:9,ccd:5,everyth:4,dimension:3,impulseaccumul:2,explan:3,distanc:[],identifi:1,getnumphas:4,execut:[9,4],less:[2,3],deltax:4,deltaz:4,exclud:9,obtain:[2,1,9],"4th":4,particleposit:4,simd:5,deltai:4,rest:[2,1,3,4],speed:[3,5],yet:5,ps4:5,settransl:4,struct:4,easi:0,r_i:2,iterationst:3,makefil:9,except:9,littl:0,add:4,other:[1,3,4],r13b:9,primit:4,els:3,hat:3,match:3,build:[9,5],real:[],applic:[0,4],numteth:3,sap:2,around:1,format:1,meshdesc:4,currentparticlekei:1,bia:[1,3],game:0,apt:[],vacuum:4,pxvec4:[3,4],world:4,bit:[2,1,9,4],a_l:2,you:[9,4],pxvec3:4,insert:4,xcodeproj:[],like:[9,4],specif:[3,1,9],arbitrari:[1,4],cdot:[2,1,3],corpor:6,manual:[1,4],stiffnessmultipli:3,xbox:5,api:5,necessari:4,use_cuda:9,realtim:0,inter:8,page:0,right:[6,3,2],often:3,simplifi:4,spring:4,numsweepcel:1,some:[2,9,4],d3d_feature_level_11_0:4,certain:9,s_ok:4,xcodebuild:[],lowerbound:1,sampl:[9,5],diff:1,home:0,sizeof:4,librari:[],basic:1,scale:[2,1,3,5,4],setfluiddens:5,avoid:[2,5,4],setlinearinertia:4,per:[1,3,4],studio:[9,5],circ:3,linux64:9,larg:[1,3],"__t100":5,complic:4,constraintmot:3,spherecent:2,machin:[],core:7,object:4,run:9,phaseconfig:[3,4],locate_win8sdk:9,updatesleepst:3,agreement:6,symlink:9,interfac:[0,5,4],broken:4,step:[2,3,4],although:3,offset:[2,1,3],getnumplan:4,subtract:1,d3d11_sdk_version:4,stage:4,about:[],generateprojectsosx:9,particlecount:4,applywind:3,deltatim:4,toolchain:9,createsolv:4,shield:5,simul:[],aarch64:9,disclosur:6,cuda:[9,5,4],neighbor:1,span:2,t_2:2,t_3:2,underwat:4,t_1:2,disabl:[2,9,5,4],processor:9,setcentrifugalinertia:4,ppa:[],own:[1,4,7],packman:9,regist:2,xyz:[3,4],"float":[3,4],bound:[2,1],automat:9,particle_position1:3,nullptr:4,integrateparticl:3,vertexarrai:4,notat:3,ensur:[2,1,3,4],mphaseindex:4,destructor:4,precomput:2,setspher:4,manag:4,accordingli:4,strechlimitc:3,triangl:[5,4,2,7,8,3],fabric:[],wai:[2,4],area:3,buildprojectsosx:9,support:[9,5,7],transform:[3,4],"long":4,createfabr:4,avail:1,getnumspher:4,restlength:3,low:0,overhead:0,strictli:6,physx:[3,5,4],"function":[],properli:4,enough:1,forc:[3,4],epsilon:[2,1,3],constrainsepar:3,refcount:4,idea:4,cloth:[],link:5,newer:9,delta:[2,1,3],don:[2,1],line:[2,9],level:0,bug:5,sdk:[9,5],reset:4,path_to_android_ndk:9,made:2,tetherlength:3,locate_cmak:9,possibl:[1,5],"default":[9,4],access:[0,1],displai:4,inaccuraci:3,below:[2,1,3,4],limit:3,arm64:[9,5],getnumcapsul:4,"export":9,problem:[2,3,4],more:[],similar:[2,4],r_2:2,r_3:2,constant:3,creat:[3,9,4],"int":4,flow:[3,5],inv:3,convex:[8,4],mstiffnessmultipli:4,repres:4,decreas:4,file:9,setrot:4,numparticl:3,check:[2,1,3,4],piw:3,incorrect:5,again:4,collid:[2,1,3,4],cmake:[9,5],buffer:1,setdamp:[3,4],when:[2,1,3,5,4],detail:[2,1,3,4],cuctxdestroi:4,cleanup:4,capsuleindic:4,setphaseconfig:4,test:[2,1,9,5,3],generateprojectslinux:9,buildprojectslinux:9,logdamp:3,multiplierc:3,relat:[6,7],symbol:3,center:[2,3,4],vertex:4,pxasserthandl:4,gcc:5,"class":4,drag:[],track:2,occasion:3,veri:4,nvclothcreatefactorycpu:4,cmakegenerateandroid:9,pxprofilercallback:4,reduc:[3,4],max:3,axi:[2,1],id3d11devicecontext:4,featurelevelresult:4,cooker:4,directori:9,mask:[2,4],flag:5,microsoft:9,influenc:4,lift:[],mass:[2,3,4],time:[2,3,4],onc:1,licensor:6,indirectli:4,cpu:[5,4],c_t:3},objtypes:{},objnames:{},filenames:["index","CollisionDetection/SelfCollision","CollisionDetection/SphereCapsuleCollision","Solver/Index","UserGuide/Index","ReleaseNotes/index","CopyRight/Index","Modules/Index","CollisionDetection/Index","Compiling/index"],titles:["NvCloth","Self Collision","Sphere Capsule collision detection","Internal solver function/algorithm documentation","User Guide","Release Notes","NVIDIA Copyright Notice","Modules","Internal collision detection documentation","Compiling"],objects:{},titleterms:{compil:9,sort:1,acceler:[2,1],distanc:3,edg:3,nvidia:6,overview:[8,1,3],modul:[8,7],respons:1,sweep:1,sphere:2,intern:[8,3],cone:2,capsul:[2,1],linux:9,invmass:3,guid:4,todo:8,tether:[3,4],particl:[1,3],note:5,differ:8,detect:[8,2,1,4],fabric:[3,4],copyright:6,space:4,self:1,compon:3,window:9,collis:[8,2,1,4],librari:4,android:9,document:[8,3],local:4,factori:4,integr:3,"function":3,kei:1,gener:2,nvcloth:[0,7],usag:4,notic:6,constraint:3,cloth:4,drag:4,lift:4,grid:1,user:4,releas:5,collideparticl:2,rang:1,data:[3,4],about:0,retriev:4,slack:3,algorithm:3,extens:7,setup:[1,4],solver:[3,4],mac:9,structur:[2,1,3],simul:[3,4],separ:3,properti:4,common:4,learn:0,more:0,initi:4,wind:[3,4]}}) \ No newline at end of file
diff --git a/NvCloth/docs/doxy/files/_solver_8h-source.html b/NvCloth/docs/doxy/files/_solver_8h-source.html
index 5f9fd48..bb3acb1 100644
--- a/NvCloth/docs/doxy/files/_solver_8h-source.html
+++ b/NvCloth/docs/doxy/files/_solver_8h-source.html
@@ -65,59 +65,62 @@
<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 <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>&amp;);
-<a name="l00051"></a>00051 <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>&amp; <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>&amp;);
-<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="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="l00033"></a>00033 <span class="preprocessor">#include "<a class="code" href="_range_8h.html">NvCloth/Range.h</a>"</span>
+<a name="l00034"></a>00034 <span class="preprocessor">#include "PsArray.h"</span>
+<a name="l00035"></a>00035
+<a name="l00036"></a>00036 <span class="keyword">namespace </span>nv
+<a name="l00037"></a>00037 {
+<a name="l00038"></a>00038 <span class="keyword">namespace </span>cloth
+<a name="l00039"></a>00039 {
+<a name="l00040"></a>00040
+<a name="l00041"></a>00041 <span class="keyword">class </span>Cloth;
+<a name="l00042"></a>00042
+<a name="l00043"></a>00043 <span class="comment">// called during inter-collision, user0 and user1 are the user data from each cloth</span>
+<a name="l00044"></a>00044 <span class="keyword">typedef</span> bool (*InterCollisionFilter)(<span class="keywordtype">void</span>* user0, <span class="keywordtype">void</span>* user1);
+<a name="l00045"></a>00045
+<a name="l00047"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html">00047</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="l00048"></a>00048 {
+<a name="l00049"></a>00049 <span class="keyword">protected</span>:
+<a name="l00050"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">00050</a> <a class="code" href="classnv_1_1cloth_1_1_solver.html#8955bbdbea66b33486f0588ab2f80c46">Solver</a>() {}
+<a name="l00051"></a>00051 <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>&amp;);
+<a name="l00052"></a>00052 <a class="code" href="classnv_1_1cloth_1_1_solver.html" title="base class for solvers">Solver</a>&amp; <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>&amp;);
+<a name="l00053"></a>00053
+<a name="l00054"></a>00054 <span class="keyword">public</span>:
+<a name="l00055"></a><a class="code" href="classnv_1_1cloth_1_1_solver.html#4830e23f5fbaa9dfa7c8c0ce32fa85bd">00055</a> <span class="keyword">virtual</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#4830e23f5fbaa9dfa7c8c0ce32fa85bd">~Solver</a>() {}
+<a name="l00056"></a>00056
+<a name="l00058"></a>00058 <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="l00059"></a>00059
+<a name="l00061"></a>00061 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classnv_1_1cloth_1_1_solver.html#ea0f778230b2a0f211bdb5d36d3b54f3" title="Adds an array of cloth objects.">addCloths</a>(<a class="code" href="structnv_1_1cloth_1_1_range.html">Range&lt;Cloth*&gt;</a> cloths) = 0;
+<a name="l00062"></a>00062
+<a name="l00064"></a>00064 <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="l00065"></a>00065
+<a name="l00067"></a>00067 <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="l00068"></a>00068
+<a name="l00070"></a>00070 <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="l00071"></a>00071
+<a name="l00072"></a>00072 <span class="comment">// functions executing the simulation work.</span>
+<a name="l00078"></a>00078 <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="l00079"></a>00079
+<a name="l00085"></a>00085 <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="l00086"></a>00086
+<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#19d777a3882814910f8a024d92072d48" title="Finishes up the simulation.">endSimulation</a>() = 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="l00094"></a>00094 <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="l00095"></a>00095
+<a name="l00096"></a>00096 <span class="comment">// inter-collision parameters</span>
+<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#5043adf6727bf66b966de6393e7d67d9">setInterCollisionDistance</a>(<span class="keywordtype">float</span> distance) = 0;
+<a name="l00098"></a>00098 <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="l00099"></a>00099 <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="l00100"></a>00100 <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="l00101"></a>00101 <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="l00102"></a>00102 <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="l00103"></a>00103 <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="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>
+<a name="l00106"></a>00106 <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="l00107"></a>00107 };
+<a name="l00108"></a>00108
+<a name="l00109"></a>00109 } <span class="comment">// namespace cloth</span>
+<a name="l00110"></a>00110 } <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 a42d87e..2fb9e31 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 &quot;<a class="el" href="_allocator_8h-source.html">NvCloth/Allocator.h</a>&quot;</code><br>
+<code>#include &quot;<a class="el" href="_range_8h-source.html">NvCloth/Range.h</a>&quot;</code><br>
<code>#include &quot;PsArray.h&quot;</code><br>
<p>
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 0e30c3f..87245b7 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
@@ -2626,7 +2626,7 @@ This applies a force to make the cloth behave as if it was moved through space.
<p>
Set triangles for collision.
<p>
-Each triangle in the list is defined by of 3 vertices. The values currently in range [first, last[ will be replaced with the content of convexMasks.
+Each triangle in the list is defined by of 3 vertices. The values currently in range [first, last[ will be replaced with the content of triangles.
</div>
</div><p>
<a class="anchor" name="e7c0b099e90d409a65ee14d6f77e57c5"></a><!-- doxytag: member="nv::cloth::Cloth::setUserData" ref="e7c0b099e90d409a65ee14d6f77e57c5" args="(void *)=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 ae29791..4bd802e 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
@@ -40,6 +40,7 @@
<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#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#ea0f778230b2a0f211bdb5d36d3b54f3">addCloths</a>(Range&lt; Cloth * &gt; cloths)=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>
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 b2262bf..245cda9 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
@@ -53,6 +53,9 @@
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</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">&nbsp;</td><td class="mdescRight">Adds cloth object. <a href="#63e732712c5a43c44e6018cca6c1fb82"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnv_1_1cloth_1_1_solver.html#ea0f778230b2a0f211bdb5d36d3b54f3">addCloths</a> (<a class="el" href="structnv_1_1cloth_1_1_range.html">Range</a>&lt; <a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> * &gt; cloths)=0</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds an array of cloth objects. <a href="#ea0f778230b2a0f211bdb5d36d3b54f3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</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">&nbsp;</td><td class="mdescRight">Begins a simulation frame. <a href="#d2efbe447bf07138c615973c349ab839"></a><br></td></tr>
@@ -184,6 +187,28 @@ Adds cloth object.
</div>
</div><p>
+<a class="anchor" name="ea0f778230b2a0f211bdb5d36d3b54f3"></a><!-- doxytag: member="nv::cloth::Solver::addCloths" ref="ea0f778230b2a0f211bdb5d36d3b54f3" args="(Range&lt; Cloth * &gt; cloths)=0" -->
+<div class="memitem">
+<div class="memproto">
+ <table class="memname">
+ <tr>
+ <td class="memname">virtual void nv::cloth::Solver::addCloths </td>
+ <td>(</td>
+ <td class="paramtype"><a class="el" href="structnv_1_1cloth_1_1_range.html">Range</a>&lt; <a class="el" href="classnv_1_1cloth_1_1_cloth.html">Cloth</a> * &gt;&nbsp;</td>
+ <td class="paramname"> <em>cloths</em> </td>
+ <td>&nbsp;)&nbsp;</td>
+ <td><code> [pure virtual]</code></td>
+ </tr>
+ </table>
+</div>
+<div class="memdoc">
+
+<p>
+Adds an array of cloth objects.
+<p>
+
+</div>
+</div><p>
<a class="anchor" name="d2efbe447bf07138c615973c349ab839"></a><!-- doxytag: member="nv::cloth::Solver::beginSimulation" ref="d2efbe447bf07138c615973c349ab839" args="(float dt)=0" -->
<div class="memitem">
<div class="memproto">
diff --git a/NvCloth/docs/doxy/files/functions.html b/NvCloth/docs/doxy/files/functions.html
index 9bae6da..7c5ccc7 100644
--- a/NvCloth/docs/doxy/files/functions.html
+++ b/NvCloth/docs/doxy/files/functions.html
@@ -80,6 +80,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_dx_context_manager_callback.html#4d8cafe2879665280b8e9e8daa18e95f">nv::cloth::DxContextManagerCallback</a>
<li>addCloth()
: <a class="el" href="classnv_1_1cloth_1_1_solver.html#63e732712c5a43c44e6018cca6c1fb82">nv::cloth::Solver</a>
+<li>addCloths()
+: <a class="el" href="classnv_1_1cloth_1_1_solver.html#ea0f778230b2a0f211bdb5d36d3b54f3">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.html b/NvCloth/docs/doxy/files/functions_func.html
index c30ffb0..764eea6 100644
--- a/NvCloth/docs/doxy/files/functions_func.html
+++ b/NvCloth/docs/doxy/files/functions_func.html
@@ -80,6 +80,8 @@
: <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#63e732712c5a43c44e6018cca6c1fb82">nv::cloth::Solver</a>
+<li>addCloths()
+: <a class="el" href="classnv_1_1cloth_1_1_solver.html#ea0f778230b2a0f211bdb5d36d3b54f3">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/include/NvCloth/Cloth.h b/NvCloth/include/NvCloth/Cloth.h
index ac957f7..6b745f5 100644
--- a/NvCloth/include/NvCloth/Cloth.h
+++ b/NvCloth/include/NvCloth/Cloth.h
@@ -279,7 +279,7 @@ class Cloth : public UserAllocated
/** \brief Set triangles for collision.
Each triangle in the list is defined by of 3 vertices.
- The values currently in range [first, last[ will be replaced with the content of convexMasks.
+ The values currently in range [first, last[ will be replaced with the content of triangles.
*/
virtual void setTriangles(Range<const physx::PxVec3> triangles, uint32_t first, uint32_t last) = 0;
virtual void setTriangles(Range<const physx::PxVec3> triangles, Range<const physx::PxVec3>, uint32_t first) = 0;
diff --git a/NvCloth/include/NvCloth/Solver.h b/NvCloth/include/NvCloth/Solver.h
index d2eb955..a293524 100644
--- a/NvCloth/include/NvCloth/Solver.h
+++ b/NvCloth/include/NvCloth/Solver.h
@@ -30,6 +30,7 @@
#pragma once
#include "NvCloth/Allocator.h"
+#include "NvCloth/Range.h"
#include "PsArray.h"
namespace nv
@@ -56,6 +57,9 @@ class Solver : public UserAllocated
/// Adds cloth object.
virtual void addCloth(Cloth* cloth) = 0;
+ /// Adds an array of cloth objects.
+ virtual void addCloths(Range<Cloth*> cloths) = 0;
+
/// Removes cloth object.
virtual void removeCloth(Cloth* cloth) = 0;
diff --git a/NvCloth/samples/SampleBase/scene/Scene.cpp b/NvCloth/samples/SampleBase/scene/Scene.cpp
index 6296a05..00e23ae 100644
--- a/NvCloth/samples/SampleBase/scene/Scene.cpp
+++ b/NvCloth/samples/SampleBase/scene/Scene.cpp
@@ -451,6 +451,24 @@ void Scene::addClothToSolver(ClothActor* clothActor, nv::cloth::Solver* solver)
mClothSolverMap[clothActor] = solver;
}
+void Scene::addClothsToSolver(nv::cloth::Range<ClothActor*> clothActors, nv::cloth::Solver* solver)
+{
+ // A temporary vector of Cloth*, to construct a Range from and pass to solver
+ std::vector<nv::cloth::Cloth*> cloths;
+
+ for (uint32_t i = 0; i < clothActors.size(); ++i)
+ {
+ auto* clothActor = clothActors[i];
+ assert(mClothSolverMap.find(clothActor) == mClothSolverMap.end());
+ mClothSolverMap[clothActor] = solver;
+
+ cloths.push_back(clothActor->mCloth);
+ }
+
+ auto clothsRange = nv::cloth::Range<nv::cloth::Cloth*>(&cloths.front(), &cloths.back() + 1);
+ solver->addCloths(clothsRange);
+}
+
void Scene::trackRenderable(Renderable* renderable)
{
trackT(mRenderableList, renderable);
diff --git a/NvCloth/samples/SampleBase/scene/Scene.h b/NvCloth/samples/SampleBase/scene/Scene.h
index 1c14fbd..4ef2bed 100644
--- a/NvCloth/samples/SampleBase/scene/Scene.h
+++ b/NvCloth/samples/SampleBase/scene/Scene.h
@@ -75,7 +75,9 @@ protected:
void trackFabric(nv::cloth::Fabric* fabric);
void untrackFabric(nv::cloth::Fabric* fabric);
- void addClothToSolver(ClothActor* clothActor, nv::cloth::Solver* solver); //Helps to detach cloths from solver at AutoDeinit.
+ //Help to detach cloths from solver at AutoDeinit.
+ void addClothToSolver(ClothActor* clothActor, nv::cloth::Solver* solver);
+ void addClothsToSolver(nv::cloth::Range<ClothActor*> clothActors, nv::cloth::Solver* solver);
void trackRenderable(Renderable* renderMesh);
void untrackRenderable(Renderable* renderMesh);
diff --git a/NvCloth/samples/SampleBase/scene/scenes/CCDScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/CCDScene.cpp
index 2d0eaa8..4d3bb84 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/CCDScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/CCDScene.cpp
@@ -9,7 +9,7 @@
*/
#include "CCDScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/CapsuleScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/CapsuleScene.cpp
index e16899c..981e699 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/CapsuleScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/CapsuleScene.cpp
@@ -9,7 +9,7 @@
*/
#include "CapsuleScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/ConvexCollisionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/ConvexCollisionScene.cpp
index 28df734..bbafbff 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/ConvexCollisionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/ConvexCollisionScene.cpp
@@ -9,7 +9,7 @@
*/
#include "ConvexCollisionScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/DistanceConstraintScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/DistanceConstraintScene.cpp
index eaac8e1..8be7184 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/DistanceConstraintScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/DistanceConstraintScene.cpp
@@ -9,7 +9,7 @@
*/
#include "DistanceConstraintScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/FrictionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/FrictionScene.cpp
index 3848c6f..f2f5063 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/FrictionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/FrictionScene.cpp
@@ -9,7 +9,7 @@
*/
#include "FrictionScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/GeodesicScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/GeodesicScene.cpp
index 3216dca..bdf14c8 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/GeodesicScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/GeodesicScene.cpp
@@ -9,7 +9,7 @@
*/
#include "GeodesicScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/InterCollisionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/InterCollisionScene.cpp
index b75facd..0dd1aa7 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/InterCollisionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/InterCollisionScene.cpp
@@ -9,7 +9,7 @@
*/
#include "InterCollisionScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/LocalGlobalScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/LocalGlobalScene.cpp
index 57cd1a2..6583476 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/LocalGlobalScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/LocalGlobalScene.cpp
@@ -9,7 +9,7 @@
*/
#include "LocalGlobalScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/MultiSolverScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/MultiSolverScene.cpp
index d708069..a82325f 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/MultiSolverScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/MultiSolverScene.cpp
@@ -9,7 +9,7 @@
*/
#include "MultiSolverScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
index fcf4060..8a677f1 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/PlaneCollisionScene.cpp
@@ -9,7 +9,7 @@
*/
#include "PlaneCollisionScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/ScaledScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/ScaledScene.cpp
index f2a5b82..a9059b8 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/ScaledScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/ScaledScene.cpp
@@ -9,7 +9,7 @@
*/
#include "ScaledScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/SelfCollisionScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/SelfCollisionScene.cpp
index 6a407ea..89fed39 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/SelfCollisionScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/SelfCollisionScene.cpp
@@ -9,7 +9,7 @@
*/
#include "SelfCollisionScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/SimpleScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/SimpleScene.cpp
index b52e2c6..e774665 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/SimpleScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/SimpleScene.cpp
@@ -9,7 +9,7 @@
*/
#include "SimpleScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
@@ -76,6 +76,7 @@ void SimpleScene::onInitialize()
mClothActor->mCloth->setPhaseConfig(nv::cloth::Range<nv::cloth::PhaseConfig>(&phases.front(), &phases.back()));
mClothActor->mCloth->setDragCoefficient(0.1f);
mClothActor->mCloth->setDragCoefficient(0.1f);
+ //mClothActor->mCloth->setSelfCollisionDistance(0.1f);
mSolver = getSceneController()->getFactory()->createSolver();
trackSolver(mSolver);
diff --git a/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
index d963011..2e6912e 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/SphereScene.cpp
@@ -9,7 +9,7 @@
*/
#include "SphereScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/StiffnessPerConstraintScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/StiffnessPerConstraintScene.cpp
index 4ed9daf..e92c1dc 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/StiffnessPerConstraintScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/StiffnessPerConstraintScene.cpp
@@ -9,7 +9,7 @@
*/
#include "StiffnessPerConstraintScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/TetherScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/TetherScene.cpp
index ecd0850..d437af3 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/TetherScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/TetherScene.cpp
@@ -9,7 +9,7 @@
*/
#include "TetherScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/TriangleScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/TriangleScene.cpp
index 1822bb9..10d185d 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/TriangleScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/TriangleScene.cpp
@@ -9,7 +9,7 @@
*/
#include "TriangleScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/scene/scenes/WindScene.cpp b/NvCloth/samples/SampleBase/scene/scenes/WindScene.cpp
index d84fb87..8866473 100644
--- a/NvCloth/samples/SampleBase/scene/scenes/WindScene.cpp
+++ b/NvCloth/samples/SampleBase/scene/scenes/WindScene.cpp
@@ -9,7 +9,7 @@
*/
#include "WindScene.h"
-#include "Scene/SceneController.h"
+#include "scene/SceneController.h"
#include <NvClothExt/ClothFabricCooker.h>
#include "ClothMeshGenerator.h"
#include <NvCloth/Fabric.h>
diff --git a/NvCloth/samples/SampleBase/ui/CommonUIController.cpp b/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
index 63284a2..492e3e9 100644
--- a/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
+++ b/NvCloth/samples/SampleBase/ui/CommonUIController.cpp
@@ -188,6 +188,8 @@ void CommonUIController::drawUI()
drawCodeProfiler(&s_showProfilerWindow);
}
#endif
+
+ getSceneController().drawStatsUI();
}
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp b/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp
index 49f9ada..495ba15 100644
--- a/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp
+++ b/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.cpp
@@ -72,6 +72,7 @@ GeneratePlaneCloth(x,y,2,2) generates:
pos = physx::PxVec3(((float)x / (float)segmentsX) * width,
((float)(y&2) / (float)segmentsY) * height,
((float)((y+1)&~1) / (float)segmentsY) * height);
+ break;
default:
pos = physx::PxVec3(((float)x / (float)segmentsX) * width,
0.f,
diff --git a/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.h b/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.h
index d6cf0fd..1db4115 100644
--- a/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.h
+++ b/NvCloth/samples/SampleBase/utils/ClothMeshGenerator.h
@@ -25,7 +25,7 @@ struct ClothMeshData
a(_a), b(_b), c(_c){}
uint32_t a, b, c;
- Triangle operator+(uint32_t offset)const { return Triangle(a + offset, b + offset, c + offset); };
+ Triangle operator+(uint32_t offset)const { return Triangle(a + offset, b + offset, c + offset); }
};
struct Quad
{
@@ -34,7 +34,7 @@ struct ClothMeshData
a(_a), b(_b), c(_c), d(_d){}
uint32_t a, b, c, d;
- Quad operator+(uint32_t offset)const { return Quad(a + offset, b + offset, c + offset, d + offset); };
+ Quad operator+(uint32_t offset)const { return Quad(a + offset, b + offset, c + offset, d + offset); }
};
std::vector<physx::PxVec3> mVertices;
std::vector<physx::PxVec2> mUvs;
diff --git a/NvCloth/samples/SampleBase/utils/JobManager.cpp b/NvCloth/samples/SampleBase/utils/JobManager.cpp
index 093db60..2a18d1c 100644
--- a/NvCloth/samples/SampleBase/utils/JobManager.cpp
+++ b/NvCloth/samples/SampleBase/utils/JobManager.cpp
@@ -124,13 +124,16 @@ void MultithreadedSolverHelper::StartSimulation(float dt)
for (int j = 0; j < mSolver->getSimulationChunkCount(); j++)
mSimulationChunkJobs[j].Reset();
}
+
mStartSimulationJob.Reset();
mEndSimulationJob.Reset(mSolver->getSimulationChunkCount());
mStartSimulationJob.RemoveReference();
-
}
void MultithreadedSolverHelper::WaitForSimulation()
{
+ if (mSolver->getSimulationChunkCount() == 0)
+ return;
+
mEndSimulationJob.Wait();
} \ No newline at end of file
diff --git a/NvCloth/samples/SampleBase/utils/MeshGenerator.cpp b/NvCloth/samples/SampleBase/utils/MeshGenerator.cpp
index 857daed..5541cc3 100644
--- a/NvCloth/samples/SampleBase/utils/MeshGenerator.cpp
+++ b/NvCloth/samples/SampleBase/utils/MeshGenerator.cpp
@@ -348,6 +348,20 @@ Mesh generateIcosahedron(float radius, int subdivisions)
return mesh;
}
+namespace
+{
+ physx::PxVec3 IntersectSpheres(float* circleRadius, physx::PxVec3 aCenter, float aRadius, physx::PxVec3 bCenter, float bRadius)
+ {
+ //Intersect spheres in 2d (http://paulbourke.net/geometry/circlesphere/ Intersection of two circles)
+ float d = (aCenter - bCenter).magnitude();
+ float a = (aRadius*aRadius - bRadius*bRadius + d*d) / (2.0f*d);
+ float h = sqrtf(aRadius*aRadius - a*a);
+ physx::PxVec3 P3 = aCenter + a * (bCenter - aCenter) / d;
+ if(circleRadius) *circleRadius = h;
+ return P3;
+ }
+};
+
Mesh generateCone(physx::PxVec4 a, physx::PxVec4 b, int segments, float grow, bool correctCone)
{
Mesh mesh;
@@ -365,41 +379,64 @@ Mesh generateCone(physx::PxVec4 a, physx::PxVec4 b, int segments, float grow, bo
basis[2].normalize();
computeBasis(basis[2], &basis[0], &basis[1]);
- physx::PxVec3 pa = aCenter + aRadius*basis[0];
- physx::PxVec3 pb = bCenter + bRadius*basis[0];
- physx::PxVec3 dir = pb - pa;
-
- physx::PxVec3 n = basis[2].cross(dir);
- physx::PxVec3 n2 = dir.cross(n);
- physx::PxVec3 focusPoint = aCenter + ((pa - aCenter).dot(n2)) / basis[2].dot(n2) * basis[2];
-
if(correctCone)
{
+ //make the cone connect seamlessly to the spheres
+ {
+ //http://jwilson.coe.uga.edu/emt669/Student.Folders/Kertscher.Jeff/Essay.3/Tangents.html
+
+ //sphere a with smaller radius
+ float cRadius = aRadius - bRadius;
+ physx::PxVec3 cCenter = aCenter;
+
+ //sphere in between the a and b
+ physx::PxVec3 dCenter = (aCenter+bCenter)*0.5f;
+ float dRadius = (aCenter - bCenter).magnitude()*0.5f;
+
+ //intersection between c and d to get tangent point
+ float iRadius;
+ physx::PxVec3 iCenter = IntersectSpheres(&iRadius, dCenter, dRadius, cCenter, cRadius);
+ physx::PxVec3 iPoint = iCenter + basis[0] * iRadius; //tangent point on c
+ physx::PxVec3 offset = (iPoint - aCenter).getNormalized(); //offset direction
+
+ physx::PxVec3 aPoint = aCenter + offset*aRadius;
+ aCenter = (aPoint - aCenter).dot(basis[2])*basis[2] + aCenter;
+ aRadius = (aPoint - aCenter).magnitude();
+ physx::PxVec3 bPoint = bCenter + offset*bRadius;
+ bCenter = (bPoint - aCenter).dot(basis[2])*basis[2] + aCenter;
+ bRadius = (bPoint - bCenter).magnitude();
+
+
+ }
+
+ //old code, probably wrong
+ /*
+ physx::PxVec3 pa = aCenter + aRadius*basis[0];
+ physx::PxVec3 pb = bCenter + bRadius*basis[0];
+ physx::PxVec3 dir = pb - pa;
+
+ //construct plane containing pa and pb, with normal perpendicular to basis[0]
+ physx::PxVec3 n = basis[2].cross(dir);
+ physx::PxVec3 n2 = dir.cross(n);
+
+ //line plane intersection
+ physx::PxVec3 focusPoint = aCenter + ((pa - aCenter).dot(n2)) / basis[2].dot(n2) * basis[2];
+
{
float focusDistance = (focusPoint - aCenter).magnitude();
+ //make circle with center in mid point between focusPoint and aCenter
physx::PxVec3 cCenter = (focusPoint + aCenter)*0.5f;
float cRadius = focusDistance*0.5f;
- float d = (aCenter - cCenter).magnitude();
- float a = (aRadius*aRadius - cRadius*cRadius + d*d) / (2.0f*d);
- float h = sqrtf(aRadius*aRadius - a*a);
- physx::PxVec3 P3 = aCenter + a * (cCenter - aCenter) / d;
- aCenter = P3;
- aRadius = h;
+ aCenter = IntersectSpheres(&aRadius, aCenter, aRadius, cCenter, cRadius);
}
{
float focusDistance = (focusPoint - bCenter).magnitude();
physx::PxVec3 cCenter = (focusPoint + bCenter)*0.5f;
float cRadius = focusDistance*0.5f;
- float d = (bCenter - cCenter).magnitude();
- float a = (bRadius*bRadius - cRadius*cRadius + d*d) / (2.0f*d);
- float h = sqrtf(bRadius*bRadius - a*a);
- physx::PxVec3 P3 = bCenter + a * (cCenter - bCenter) / d;
-
- bCenter = P3;
- bRadius = h;
- }
+ bCenter = IntersectSpheres(&bRadius, bCenter, bRadius, cCenter, cRadius);
+ }*/
}
diff --git a/NvCloth/scripts/packman/config.packman.xml b/NvCloth/scripts/packman/config.packman.xml
new file mode 100644
index 0000000..6099556
--- /dev/null
+++ b/NvCloth/scripts/packman/config.packman.xml
@@ -0,0 +1,9 @@
+<config remotes="gtl">
+ <remote name="s3" type="s3" packageLocation="packman">
+ <credentials id="AKIAJHPSPBMWMTZS6TJA" key="vK3d0lHiQjEW9krFfvKA4OLpuHGxi2L4/Q4r4IuT"
+ errorUrl="https://gtl-gitlab.nvidia.com/halldor/packman/wikis/how-to-configure-s3-full-access"/>
+ </remote>
+ <remote name="gtl" type="gtl">
+ <credentials id="svcgtlautomate" key="QHV0ME1AdDNHVEwkY3IxcHQk"/>
+ </remote>
+</config>
diff --git a/NvCloth/scripts/packman/packages/cmake.packman.xml b/NvCloth/scripts/packman/packages/cmake.packman.xml
new file mode 100644
index 0000000..4115184
--- /dev/null
+++ b/NvCloth/scripts/packman/packages/cmake.packman.xml
@@ -0,0 +1,7 @@
+<project toolsVersion="3.1" remotes="s3">
+ <dependency name="cmake">
+ <package name="cmake-x64" version="3.7.0" platforms="windows"/>
+ <package name="cmake-linux-x86_64" version="3.7.2" platforms="linux"/>
+ <package name="cmake-mac-x86_64" version="3.7.2" platforms="mac"/>
+ </dependency>
+</project>
diff --git a/NvCloth/scripts/packman/packman.cmd b/NvCloth/scripts/packman/packman.cmd
new file mode 100644
index 0000000..03e2cf8
--- /dev/null
+++ b/NvCloth/scripts/packman/packman.cmd
@@ -0,0 +1,41 @@
+:: Reset errorlevel status so we are not inheriting this state from the calling process:
+@call :RESET_ERROR
+:: You can remove the call below if you do your own manual configuration of the dev machines
+@call "%~dp0\win-bootstrap\configure.bat"
+@if errorlevel 1 exit /b 1
+:: Everything below is mandatory
+@if not defined PM_PYTHON goto :PYTHON_ENV_ERROR
+@if not defined PM_MODULE goto :MODULE_ENV_ERROR
+
+:: Generate temporary path for variable file
+:TEMP_VAR_PATH_LOOP
+@set "PM_VAR_PATH=%tmp%\tmp.%RANDOM%.pmvars"
+@if exist "%PM_VAR_PATH%" goto :TEMP_VAR_PATH_LOOP
+
+@"%PM_PYTHON%" "%PM_MODULE%" %* --var-path="%PM_VAR_PATH%"
+@if errorlevel 1 goto :eof
+
+:: Marshall environment variables into the current environment if they have been generated and remove temporary file
+@if exist "%PM_VAR_PATH%" (
+ @for /F "usebackq tokens=*" %%A in ("%PM_VAR_PATH%") do @set "%%A"
+ @if errorlevel 1 goto :VAR_ERROR
+ @del /F "%PM_VAR_PATH%"
+)
+@set PM_VAR_PATH=
+@goto :eof
+
+:: Subroutines below
+:PYTHON_ENV_ERROR
+@echo User environment variable PM_PYTHON is not set! Please configure machine for packman or call configure.bat.
+@exit /b 1
+
+:MODULE_ENV_ERROR
+@echo User environment variable PM_MODULE is not set! Please configure machine for packman or call configure.bat.
+@exit /b 1
+
+:VAR_ERROR
+@echo Error while processing and setting environment variables!
+@exit /b 1
+
+:RESET_ERROR
+@exit /b 0 \ No newline at end of file
diff --git a/NvCloth/scripts/packman/packman.sh b/NvCloth/scripts/packman/packman.sh
new file mode 100644
index 0000000..3fbd753
--- /dev/null
+++ b/NvCloth/scripts/packman/packman.sh
@@ -0,0 +1,97 @@
+#!/bin/bash
+
+PM_PACKMAN_VERSION=5.0-rc2
+
+# Specify where packman command exists
+export PM_INSTALL_PATH=$(dirname ${BASH_SOURCE})
+
+# The packages root may already be configured by the user
+if [ -z "$PM_PACKAGES_ROOT" ]; then
+ # Set variable permanently using .profile for this user
+ echo "export PM_PACKAGES_ROOT=\$HOME/packman-repo" >> ~/.profile
+ # Set variable temporarily in this process so that the following execution will work
+ export PM_PACKAGES_ROOT="${HOME}/packman-repo"
+fi
+
+# Ensure the packages root path exists:
+if [ ! -d "$PM_PACKAGES_ROOT" ]; then
+ echo "Creating packman packages repository at $PM_PACKAGES_ROOT"
+ mkdir -p "$PM_PACKAGES_ROOT"
+fi
+
+# The packman module may be externally configured
+if [ -z "$PM_MODULE_EXT" ]; then
+ PM_MODULE_DIR="$PM_PACKAGES_ROOT/packman-common/$PM_PACKMAN_VERSION"
+ export PM_MODULE="$PM_MODULE_DIR/packman.py"
+else
+ export PM_MODULE="$PM_MODULE_EXT"
+fi
+
+fetch_file_from_s3()
+{
+ SOURCE=$1
+ SOURCE_URL=http://packman.s3.amazonaws.com/$SOURCE
+ TARGET=$2
+ echo "Fetching $SOURCE from S3 ..."
+ if command -v wget >/dev/null 2>&1; then
+ wget --quiet -O$TARGET $SOURCE_URL
+ else
+ curl -o $TARGET $SOURCE_URL -s -S
+ fi
+}
+
+# Ensure the packman package exists:
+if [ ! -f "$PM_MODULE" ]; then
+ PM_MODULE_PACKAGE="packman-common@$PM_PACKMAN_VERSION.zip"
+ TARGET="/tmp/$PM_MODULE_PACKAGE"
+ # We always fetch packman from S3:
+ fetch_file_from_s3 $PM_MODULE_PACKAGE $TARGET
+ if [ "$?" -eq "0" ]; then
+ echo "Unpacking ..."
+ mkdir -p "$PM_MODULE_DIR"
+ unzip -q $TARGET -d "$PM_MODULE_DIR"
+ rm $TARGET
+ else
+ echo "Failure while fetching packman module from S3!"
+ exit 1
+ fi
+fi
+
+# For now assume python is installed on the box and we just need to find it
+if command -v python2 >/dev/null 2>&1; then
+ export PM_PYTHON=python2
+else
+ export PM_PYTHON=python
+fi
+
+# Ensure 7za package exists:
+PM_7za_VERSION=16.02
+export PM_7za_PATH="$PM_PACKAGES_ROOT/7za/$PM_7za_VERSION"
+if [ ! -f "$PM_7za_PATH" ]; then
+ $PM_PYTHON "$PM_MODULE" install 7za $PM_7za_VERSION -r packman:s3
+ if [ "$?" -ne 0 ]; then
+ echo "Failure while installing required 7za package"
+ exit 1
+ fi
+fi
+
+# Generate temporary file name for environment variables:
+PM_VAR_PATH=`mktemp -u -t tmp.XXXXX.$$.pmvars`
+
+$PM_PYTHON "$PM_MODULE" $* --var-path="$PM_VAR_PATH"
+exit_code=$?
+# Export the variables if the file was used and remove the file:
+if [ -f "$PM_VAR_PATH" ]; then
+ while read -r line
+ do
+ if [ ${#line} -gt 0 ]; then
+ export "$line"
+ fi
+ done < "$PM_VAR_PATH"
+ rm -f "$PM_VAR_PATH"
+fi
+
+# Return the exit code from python
+if [ "$exit_code" != 0 ]; then
+ exit "$exit_code"
+fi
diff --git a/NvCloth/scripts/packman/packman_config.txt b/NvCloth/scripts/packman/packman_config.txt
new file mode 100644
index 0000000..a0a912b
--- /dev/null
+++ b/NvCloth/scripts/packman/packman_config.txt
@@ -0,0 +1,5 @@
+PM_PACKAGES_SOURCE=gtl
+PM_GTL_USER=svcgtlautomate
+PM_GTL_KEY=QHV0ME1AdDNHVEwkY3IxcHQk
+PM_S3_READ_KEY_ID=AKIAJHPSPBMWMTZS6TJA
+PM_S3_READ_SECRET_KEY=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
diff --git a/NvCloth/scripts/packman/test_packman.cmd b/NvCloth/scripts/packman/test_packman.cmd
new file mode 100644
index 0000000..f3982fd
--- /dev/null
+++ b/NvCloth/scripts/packman/test_packman.cmd
@@ -0,0 +1,6 @@
+:: Use our local packman module for testing
+@set PM_MODULE_EXT=%~dp0\..\common\packman.py
+@call "%~dp0packman.cmd" %*
+:: Clean out so this setting doesn't leak into the current console
+@set PM_MODULE_EXT=
+@if errorlevel 1 exit /b 1
diff --git a/NvCloth/scripts/packman/test_packman.sh b/NvCloth/scripts/packman/test_packman.sh
new file mode 100644
index 0000000..246c7e0
--- /dev/null
+++ b/NvCloth/scripts/packman/test_packman.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+export PM_MODULE_EXT="$(dirname ${BASH_SOURCE})/../common/packman.py"
+
+source "$(dirname ${BASH_SOURCE})/packman.sh" $*
+
+unset PM_MODULE_EXT
+
diff --git a/NvCloth/scripts/packman/test_postscript.bat b/NvCloth/scripts/packman/test_postscript.bat
new file mode 100644
index 0000000..26793b7
--- /dev/null
+++ b/NvCloth/scripts/packman/test_postscript.bat
@@ -0,0 +1,2 @@
+@echo %PM_CMakeModules_PATH%
+@echo %PM_PATHS% \ No newline at end of file
diff --git a/NvCloth/scripts/packman/win-bootstrap/configure.bat b/NvCloth/scripts/packman/win-bootstrap/configure.bat
new file mode 100644
index 0000000..0528b09
--- /dev/null
+++ b/NvCloth/scripts/packman/win-bootstrap/configure.bat
@@ -0,0 +1,112 @@
+@set PM_PACKMAN_VERSION=5.0-rc2
+
+:: Specify where packman command is rooted
+@set PM_INSTALL_PATH=%~dp0..
+
+:: The external root may already be configured and we should do minimal work in that case
+@if defined PM_PACKAGES_ROOT goto ENSURE_DIR
+
+:: If the folder isn't set we assume that the best place for it is on the drive that we are currently
+:: running from
+@set PM_DRIVE=%CD:~0,2%
+
+@set PM_PACKAGES_ROOT=%PM_DRIVE%\packman-repo
+
+:: We use *setx* here so that the variable is persisted in the user environment
+@echo Setting user environment variable PM_PACKAGES_ROOT to %PM_PACKAGES_ROOT%
+@setx PM_PACKAGES_ROOT %PM_PACKAGES_ROOT%
+@if errorlevel 1 goto ERROR
+
+:: The above doesn't work properly from a build step in VisualStudio because a separate process is
+:: spawned for it so it will be lost for subsequent compilation steps - VisualStudio must
+:: be launched from a new process. We catch this odd-ball case here:
+@if defined PM_DISABLE_VS_WARNING goto ENSURE_DIR
+@if not defined VSLANG goto ENSURE_DIR
+@echo The above is a once-per-computer operation. Unfortunately VisualStudio cannot pick up environment change
+@echo unless *VisualStudio is RELAUNCHED*.
+@echo If you are launching VisualStudio from command line or command line utility make sure
+@echo you have a fresh launch environment (relaunch the command line or utility).
+@echo If you are using 'linkPath' and referring to packages via local folder links you can safely ignore this warning.
+@echo You can disable this warning by setting the environment variable PM_DISABLE_VS_WARNING.
+@echo.
+
+:: Check for the directory that we need. Note that mkdir will create any directories
+:: that may be needed in the path
+:ENSURE_DIR
+@if not exist "%PM_PACKAGES_ROOT%" (
+ @echo Creating directory %PM_PACKAGES_ROOT%
+ @mkdir "%PM_PACKAGES_ROOT%"
+ @if errorlevel 1 goto ERROR_MKDIR_PACKAGES_ROOT
+)
+
+:: The Python interpreter may already be externally configured
+@if defined PM_PYTHON_EXT (
+ @set PM_PYTHON=%PM_PYTHON_EXT%
+ @goto PACKMAN
+)
+
+@set PM_PYTHON_DIR=%PM_PACKAGES_ROOT%\python\2.7.6-windows-x86
+@set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
+
+@if exist "%PM_PYTHON%" goto PACKMAN
+
+@for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do @set TEMP_FILE_NAME=%%a
+@set TARGET=%TEMP_FILE_NAME%.exe
+@call "%~dp0fetch_file_from_s3.cmd" %PM_PYTHON_PACKAGE% "%TARGET%"
+@if errorlevel 1 goto ERROR
+
+@echo Unpacking ...
+@"%TARGET%" -o"%PM_PYTHON_DIR%" -y 1> nul
+@if errorlevel 1 goto ERROR
+
+@del "%TARGET%"
+
+:PACKMAN
+:: The packman module may already be externally configured
+@if defined PM_MODULE_EXT (
+ @set PM_MODULE=%PM_MODULE_EXT%
+ @goto ENSURE_7za
+)
+
+@set PM_MODULE_DIR=%PM_PACKAGES_ROOT%\packman-common\%PM_PACKMAN_VERSION%
+@set PM_MODULE=%PM_MODULE_DIR%\packman.py
+
+@if exist "%PM_MODULE%" goto ENSURE_7ZA
+
+@set PM_MODULE_PACKAGE=packman-common@%PM_PACKMAN_VERSION%.zip
+@for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do @set TEMP_FILE_NAME=%%a
+@set TARGET=%TEMP_FILE_NAME%
+@call "%~dp0fetch_file_from_s3.cmd" %PM_MODULE_PACKAGE% "%TARGET%"
+@if errorlevel 1 goto ERROR
+
+@echo Unpacking ...
+@"%PM_PYTHON%" "%~dp0\install_package.py" "%TARGET%" "%PM_MODULE_DIR%"
+@if errorlevel 1 goto ERROR
+
+@del "%TARGET%"
+
+:ENSURE_7ZA
+@set PM_7Za_VERSION=16.02
+@set PM_7Za_PATH=%PM_PACKAGES_ROOT%\7za\%PM_7ZA_VERSION%
+@if exist "%PM_7Za_PATH%" goto END
+
+@"%PM_PYTHON%" "%PM_MODULE%" install 7za %PM_7za_VERSION% -r packman:s3
+@if errorlevel 1 goto ERROR
+
+@goto END
+
+:ERROR_MKDIR_PACKAGES_ROOT
+@echo Failed to automatically create packman packages repo at %PM_PACKAGES_ROOT%.
+@echo Please set a location explicitly that packman has permission to write to, by issuing:
+@echo.
+@echo setx PM_PACKAGES_ROOT {path-you-choose-for-storing-packman-packages-locally}
+@echo.
+@echo Then launch a new command console for the changes to take effect and run packman command again.
+@exit /B 1
+
+:ERROR
+@echo !!! Failure while configuring local machine :( !!!
+@exit /B 1
+
+:END
diff --git a/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.cmd b/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.cmd
new file mode 100644
index 0000000..63766c1
--- /dev/null
+++ b/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.cmd
@@ -0,0 +1,22 @@
+:: You need to specify <package-name> <target-path> as input to this command
+@setlocal
+@set PACKAGE_NAME=%1
+@set TARGET_PATH=%2
+
+@echo Fetching %PACKAGE_NAME% from s3 ...
+
+@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0fetch_file_from_s3.ps1" -sourceName %PACKAGE_NAME% ^
+ -output %TARGET_PATH%
+:: A bug in powershell prevents the errorlevel code from being set when using the -File execution option
+:: We must therefore do our own failure analysis, basically make sure the file exists and is larger than 0 bytes:
+@if not exist %TARGET_PATH% goto ERROR_DOWNLOAD_FAILED
+@if %~z2==0 goto ERROR_DOWNLOAD_FAILED
+
+@endlocal
+@exit /b 0
+
+:ERROR_DOWNLOAD_FAILED
+@echo Failed to download file from %1
+@echo Most likely because endpoint cannot be reached (VPN connection down?)
+@endlocal
+@exit /b 1 \ No newline at end of file
diff --git a/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.ps1 b/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.ps1
new file mode 100644
index 0000000..fc588d9
--- /dev/null
+++ b/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_s3.ps1
@@ -0,0 +1,60 @@
+param(
+[Parameter(Mandatory=$true)][string]$sourceName=$null,
+[string]$output="out.exe"
+)
+$source = "http://packman.s3.amazonaws.com/" + $sourceName
+$filename = $output
+
+$triesLeft = 3
+
+do
+{
+ $triesLeft -= 1
+ $req = [System.Net.httpwebrequest]::Create($source)
+ $req.cookiecontainer = New-Object System.net.CookieContainer
+
+ try
+ {
+ Write-Host "Connecting to S3 ..."
+ $res = $req.GetResponse()
+ if($res.StatusCode -eq "OK") {
+ Write-Host "Downloading ..."
+ [int]$goal = $res.ContentLength
+ $reader = $res.GetResponseStream()
+ $writer = new-object System.IO.FileStream $fileName, "Create"
+ [byte[]]$buffer = new-object byte[] 4096
+ [int]$total = [int]$count = 0
+ do
+ {
+ $count = $reader.Read($buffer, 0, $buffer.Length);
+ $writer.Write($buffer, 0, $count);
+ $total += $count
+ if($goal -gt 0) {
+ Write-Progress "Downloading $url" "Saving $total of $goal" -id 0 -percentComplete (($total/$goal)*100)
+ } else {
+ Write-Progress "Downloading $url" "Saving $total bytes..." -id 0
+ }
+ } while ($count -gt 0)
+
+ $triesLeft = 0
+ }
+ }
+ catch
+ {
+ Write-Host "Error connecting to S3!"
+ Write-Host $_.Exception|format-list -force
+ }
+ finally
+ {
+ if ($reader)
+ {
+ $reader.Close()
+ }
+ if ($writer)
+ {
+ $writer.Flush()
+ $writer.Close()
+ }
+ }
+} while ($triesLeft -gt 0)
+
diff --git a/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_url.ps1 b/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_url.ps1
new file mode 100644
index 0000000..5b566f1
--- /dev/null
+++ b/NvCloth/scripts/packman/win-bootstrap/fetch_file_from_url.ps1
@@ -0,0 +1,37 @@
+param(
+[Parameter(Mandatory=$true)][string]$sourceUrl=$null,
+[Parameter(Mandatory=$true)][string]$output=$null
+)
+$source = $sourceUrl
+$filename = $output
+
+$req = [System.Net.httpwebrequest]::Create($source)
+$req.cookiecontainer = New-Object System.net.CookieContainer
+
+Write-Host "Connecting to $source ..."
+$res = $req.GetResponse()
+
+if($res.StatusCode -eq "OK") {
+ Write-Host "Downloading ..."
+ [int]$goal = $res.ContentLength
+ $reader = $res.GetResponseStream()
+ $writer = new-object System.IO.FileStream $fileName, "Create"
+ [byte[]]$buffer = new-object byte[] 4096
+ [int]$total = [int]$count = 0
+ do
+ {
+ $count = $reader.Read($buffer, 0, $buffer.Length);
+ $writer.Write($buffer, 0, $count);
+ $total += $count
+ if($goal -gt 0) {
+ Write-Progress "Downloading $url" "Saving $total of $goal" -id 0 -percentComplete (($total/$goal)*100)
+ } else {
+ Write-Progress "Downloading $url" "Saving $total bytes..." -id 0
+ }
+ } while ($count -gt 0)
+
+ $reader.Close()
+ $writer.Flush()
+ $writer.Close()
+}
+
diff --git a/NvCloth/scripts/packman/win-bootstrap/generate_temp_file_name.ps1 b/NvCloth/scripts/packman/win-bootstrap/generate_temp_file_name.ps1
new file mode 100644
index 0000000..cefbda4
--- /dev/null
+++ b/NvCloth/scripts/packman/win-bootstrap/generate_temp_file_name.ps1
@@ -0,0 +1,2 @@
+$out = [System.IO.Path]::GetTempFileName()
+Write-Host $out \ No newline at end of file
diff --git a/NvCloth/scripts/packman/win-bootstrap/install_package.py b/NvCloth/scripts/packman/win-bootstrap/install_package.py
new file mode 100644
index 0000000..730962a
--- /dev/null
+++ b/NvCloth/scripts/packman/win-bootstrap/install_package.py
@@ -0,0 +1,39 @@
+import logging
+import zipfile
+import tempfile
+import sys
+import shutil
+
+__author__ = 'hfannar'
+logging.basicConfig(level=logging.WARNING, format="%(message)s")
+logger = logging.getLogger('install_package')
+
+
+class TemporaryDirectory:
+ def __init__(self):
+ self.path = None
+
+ def __enter__(self):
+ self.path = tempfile.mkdtemp()
+ return self.path
+
+ def __exit__(self, type, value, traceback ):
+ # Remove temporary data created
+ shutil.rmtree(self.path)
+
+
+def install_package(package_src_path, package_dst_path):
+ with zipfile.ZipFile(package_src_path, allowZip64=True) as zip_file, TemporaryDirectory() as temp_dir:
+ zip_file.extractall(temp_dir)
+ # Recursively copy (temp_dir will be automatically cleaned up on exit)
+ try:
+ # Recursive copy is needed because both package name and version folder could be missing in
+ # target directory:
+ shutil.copytree(temp_dir, package_dst_path)
+ except OSError, exc:
+ logger.warning("Directory %s already present, packaged installation aborted" % package_dst_path)
+ else:
+ logger.info("Package successfully installed to %s" % package_dst_path)
+
+
+install_package(sys.argv[1], sys.argv[2]) \ No newline at end of file
diff --git a/NvCloth/src/BoundingBox.h b/NvCloth/src/BoundingBox.h
index 74bc0ff..ea84d52 100644
--- a/NvCloth/src/BoundingBox.h
+++ b/NvCloth/src/BoundingBox.h
@@ -37,26 +37,26 @@ namespace nv
namespace cloth
{
-template <typename Simd4f>
+template <typename T4f>
struct BoundingBox
{
- Simd4f mLower;
- Simd4f mUpper;
+ T4f mLower;
+ T4f mUpper;
};
-template <typename Simd4f>
-inline BoundingBox<Simd4f> loadBounds(const float* ptr)
+template <typename T4f>
+inline BoundingBox<T4f> loadBounds(const float* ptr)
{
- BoundingBox<Simd4f> result;
+ BoundingBox<T4f> result;
result.mLower = load(ptr);
result.mUpper = load(ptr + 3);
return result;
}
-template <typename Simd4f>
-inline BoundingBox<Simd4f> emptyBounds()
+template <typename T4f>
+inline BoundingBox<T4f> emptyBounds()
{
- BoundingBox<Simd4f> result;
+ BoundingBox<T4f> result;
result.mLower = gSimd4fFloatMax;
result.mUpper = -result.mLower;
@@ -64,10 +64,10 @@ inline BoundingBox<Simd4f> emptyBounds()
return result;
}
-template <typename Simd4f>
-inline BoundingBox<Simd4f> expandBounds(const BoundingBox<Simd4f>& bounds, const Simd4f* pIt, const Simd4f* pEnd)
+template <typename T4f>
+inline BoundingBox<T4f> expandBounds(const BoundingBox<T4f>& bounds, const T4f* pIt, const T4f* pEnd)
{
- BoundingBox<Simd4f> result = bounds;
+ BoundingBox<T4f> result = bounds;
for (; pIt != pEnd; ++pIt)
{
result.mLower = min(result.mLower, *pIt);
@@ -76,26 +76,26 @@ inline BoundingBox<Simd4f> expandBounds(const BoundingBox<Simd4f>& bounds, const
return result;
}
-template <typename Simd4f>
-inline BoundingBox<Simd4f> expandBounds(const BoundingBox<Simd4f>& a, const BoundingBox<Simd4f>& b)
+template <typename T4f>
+inline BoundingBox<T4f> expandBounds(const BoundingBox<T4f>& a, const BoundingBox<T4f>& b)
{
- BoundingBox<Simd4f> result;
+ BoundingBox<T4f> result;
result.mLower = min(a.mLower, b.mLower);
result.mUpper = max(a.mUpper, b.mUpper);
return result;
}
-template <typename Simd4f>
-inline BoundingBox<Simd4f> intersectBounds(const BoundingBox<Simd4f>& a, const BoundingBox<Simd4f>& b)
+template <typename T4f>
+inline BoundingBox<T4f> intersectBounds(const BoundingBox<T4f>& a, const BoundingBox<T4f>& b)
{
- BoundingBox<Simd4f> result;
+ BoundingBox<T4f> result;
result.mLower = max(a.mLower, b.mLower);
result.mUpper = min(a.mUpper, b.mUpper);
return result;
}
-template <typename Simd4f>
-inline bool isEmptyBounds(const BoundingBox<Simd4f>& a)
+template <typename T4f>
+inline bool isEmptyBounds(const BoundingBox<T4f>& a)
{
return anyGreater(a.mLower, a.mUpper) != 0;
}
diff --git a/NvCloth/src/ClothClone.h b/NvCloth/src/ClothClone.h
index 386fee6..7145da5 100644
--- a/NvCloth/src/ClothClone.h
+++ b/NvCloth/src/ClothClone.h
@@ -29,12 +29,12 @@
#pragma once
-#include "../SwFactory.h"
-#include "../SwFabric.h"
-#include "../SwCloth.h"
+#include "SwFactory.h"
+#include "SwFabric.h"
+#include "SwCloth.h"
-#include "../ClothImpl.h"
-#include "../ClothBase.h"
+#include "ClothImpl.h"
+#include "ClothBase.h"
#include "NvCloth/Allocator.h"
namespace nv
diff --git a/NvCloth/src/ClothImpl.h b/NvCloth/src/ClothImpl.h
index 4d7b28d..24f7732 100644
--- a/NvCloth/src/ClothImpl.h
+++ b/NvCloth/src/ClothImpl.h
@@ -1220,7 +1220,7 @@ inline float ClothImpl<T>::getLiftCoefficient() const
template <typename T>
inline void ClothImpl<T>::setFluidDensity(float fluidDensity)
{
- NV_CLOTH_ASSERT(fluidDensity < 0.f);
+ NV_CLOTH_ASSERT(fluidDensity > 0.f);
if (fluidDensity == mFluidDensity)
return;
diff --git a/NvCloth/src/IterationState.h b/NvCloth/src/IterationState.h
index 224e87e..e18b636 100644
--- a/NvCloth/src/IterationState.h
+++ b/NvCloth/src/IterationState.h
@@ -72,21 +72,21 @@ inline physx::PxQuat exp(const physx::PxVec3& v)
return physx::PxQuat(v.x * scale, v.y * scale, v.z * scale, physx::PxCos(theta));
}
-template <typename Simd4f, uint32_t N>
-inline void assign(Simd4f (&columns)[N], const physx::PxMat44& matrix)
+template <typename T4f, uint32_t N>
+inline void assign(T4f (&columns)[N], const physx::PxMat44& matrix)
{
for (uint32_t i = 0; i < N; ++i)
columns[i] = load(nv::cloth::array(matrix[i]));
}
-template <typename Simd4f>
-inline Simd4f transform(const Simd4f (&columns)[3], const Simd4f& vec)
+template <typename T4f>
+inline T4f transform(const T4f (&columns)[3], const T4f& vec)
{
return splat<0>(vec) * columns[0] + splat<1>(vec) * columns[1] + splat<2>(vec) * columns[2];
}
-template <typename Simd4f>
-inline Simd4f transform(const Simd4f (&columns)[3], const Simd4f& translate, const Simd4f& vec)
+template <typename T4f>
+inline T4f transform(const T4f (&columns)[3], const T4f& translate, const T4f& vec)
{
return translate + splat<0>(vec) * columns[0] + splat<1>(vec) * columns[1] + splat<2>(vec) * columns[2];
}
@@ -99,17 +99,17 @@ struct IterationStateFactory
template <typename MyCloth>
IterationStateFactory(MyCloth& cloth, float frameDt);
- template <typename Simd4f, typename MyCloth>
- IterationState<Simd4f> create(MyCloth const& cloth) const;
+ template <typename T4f, typename MyCloth>
+ IterationState<T4f> create(MyCloth const& cloth) const;
- template <typename Simd4f>
- static Simd4f lengthSqr(Simd4f const& v)
+ template <typename T4f>
+ static T4f lengthSqr(T4f const& v)
{
return dot3(v, v);
}
- template <typename Simd4f>
- static physx::PxVec3 castToPxVec3(const Simd4f& v)
+ template <typename T4f>
+ static physx::PxVec3 castToPxVec3(const T4f& v)
{
return *reinterpret_cast<const physx::PxVec3*>(reinterpret_cast<const char*>(&v));
}
@@ -123,7 +123,7 @@ struct IterationStateFactory
};
/* solver iterations helper functor */
-template <typename Simd4f>
+template <typename T4f>
struct IterationState
{
// call after each iteration
@@ -133,15 +133,15 @@ struct IterationState
inline float getPreviousAlpha() const;
public:
- Simd4f mRotationMatrix[3]; // should rename to 'mRotation'
+ T4f mRotationMatrix[3]; // should rename to 'mRotation'
- Simd4f mCurBias; // in local space
- Simd4f mPrevBias; // in local space
- Simd4f mWind; // delta position per iteration (wind velocity * mIterDt)
+ T4f mCurBias; // in local space
+ T4f mPrevBias; // in local space
+ T4f mWind; // delta position per iteration (wind velocity * mIterDt)
- Simd4f mPrevMatrix[3];
- Simd4f mCurMatrix[3];
- Simd4f mDampScaleUpdate;
+ T4f mPrevMatrix[3];
+ T4f mCurMatrix[3];
+ T4f mDampScaleUpdate;
// iteration counter
uint32_t mRemainingIterations;
@@ -157,14 +157,14 @@ struct IterationState
} // namespace cloth
-template <typename Simd4f>
-inline float cloth::IterationState<Simd4f>::getCurrentAlpha() const
+template <typename T4f>
+inline float cloth::IterationState<T4f>::getCurrentAlpha() const
{
return getPreviousAlpha() + mInvNumIterations;
}
-template <typename Simd4f>
-inline float cloth::IterationState<Simd4f>::getPreviousAlpha() const
+template <typename T4f>
+inline float cloth::IterationState<T4f>::getPreviousAlpha() const
{
return 1.0f - mRemainingIterations * mInvNumIterations;
}
@@ -232,36 +232,36 @@ If you change anything in this function, make sure that ClothCustomFloating and
ClothInertia haven't regressed for any choice of solver frequency.
*/
-template <typename Simd4f, typename MyCloth>
-cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const& cloth) const
+template <typename T4f, typename MyCloth>
+cloth::IterationState<T4f> cloth::IterationStateFactory::create(MyCloth const& cloth) const
{
- IterationState<Simd4f> result;
+ IterationState<T4f> result;
result.mRemainingIterations = static_cast<uint32_t>(mNumIterations);
result.mInvNumIterations = mInvNumIterations;
result.mIterDt = mIterDt;
- Simd4f curLinearVelocity = load(array(cloth.mLinearVelocity));
- Simd4f prevLinearVelocity = load(array(mPrevLinearVelocity));
+ T4f curLinearVelocity = load(array(cloth.mLinearVelocity));
+ T4f prevLinearVelocity = load(array(mPrevLinearVelocity));
- Simd4f iterDt = simd4f(mIterDt);
- Simd4f dampExponent = simd4f(cloth.mStiffnessFrequency) * iterDt;
+ T4f iterDt = simd4f(mIterDt);
+ T4f dampExponent = simd4f(cloth.mStiffnessFrequency) * iterDt;
- Simd4f translation = iterDt * curLinearVelocity;
+ T4f translation = iterDt * curLinearVelocity;
// gravity delta per iteration
- Simd4f gravity = load(array(cloth.mGravity)) * static_cast<Simd4f>(simd4f(sqr(mIterDtAverage)));
+ T4f gravity = load(array(cloth.mGravity)) * static_cast<T4f>(simd4f(sqr(mIterDtAverage)));
// scale of local particle velocity per iteration
- Simd4f dampScale = exp2(load(array(cloth.mLogDamping)) * dampExponent);
+ T4f dampScale = exp2(load(array(cloth.mLogDamping)) * dampExponent);
// adjust for the change in time step during the first iteration
- Simd4f firstDampScale = dampScale * simd4f(mIterDtRatio);
+ T4f firstDampScale = dampScale * simd4f(mIterDtRatio);
// portion of negative frame velocity to transfer to particle
- Simd4f linearDrag = (gSimd4fOne - exp2(load(array(cloth.mLinearLogDrag)) * dampExponent)) * translation;
+ T4f linearDrag = (gSimd4fOne - exp2(load(array(cloth.mLinearLogDrag)) * dampExponent)) * translation;
// portion of frame acceleration to transfer to particle
- Simd4f linearInertia = load(array(cloth.mLinearInertia)) * iterDt * (prevLinearVelocity - curLinearVelocity);
+ T4f linearInertia = load(array(cloth.mLinearInertia)) * iterDt * (prevLinearVelocity - curLinearVelocity);
// for inertia, we want to violate newton physics to
// match velocity and position as given by the user, which means:
@@ -271,13 +271,13 @@ cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const
// specifically, the portion is alpha=(n+1)/2n and 1-alpha.
float linearAlpha = (mNumIterations + 1) * 0.5f * mInvNumIterations;
- Simd4f curLinearInertia = linearInertia * simd4f(linearAlpha);
+ T4f curLinearInertia = linearInertia * simd4f(linearAlpha);
// rotate to local space (use mRotationMatrix temporarily to hold matrix)
physx::PxMat44 invRotation = physx::PxMat44(mCurrentRotation.getConjugate());
assign(result.mRotationMatrix, invRotation);
- Simd4f maskXYZ = simd4f(simd4i(~0, ~0, ~0, 0));
+ T4f maskXYZ = simd4f(simd4i(~0, ~0, ~0, 0));
// Previously, we split the bias between previous and current position to
// get correct disretized position and velocity. However, this made a
@@ -286,23 +286,23 @@ cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const
// timesteps. Instead, we now apply the entire bias to current position
// and accept a less noticeable error for a free falling cloth.
- Simd4f bias = gravity - linearDrag;
+ T4f bias = gravity - linearDrag;
result.mCurBias = transform(result.mRotationMatrix, curLinearInertia + bias) & maskXYZ;
result.mPrevBias = transform(result.mRotationMatrix, linearInertia - curLinearInertia) & maskXYZ;
- Simd4f wind = load(array(cloth.mWind)) * iterDt; // multiply with delta time here already so we don't have to do it inside the solver
+ T4f wind = load(array(cloth.mWind)) * iterDt; // multiply with delta time here already so we don't have to do it inside the solver
result.mWind = transform(result.mRotationMatrix, translation - wind) & maskXYZ;
result.mIsTurning = mPrevAngularVelocity.magnitudeSquared() + cloth.mAngularVelocity.magnitudeSquared() > 0.0f;
if (result.mIsTurning)
{
- Simd4f curAngularVelocity = load(array(invRotation.rotate(cloth.mAngularVelocity)));
- Simd4f prevAngularVelocity = load(array(invRotation.rotate(mPrevAngularVelocity)));
+ T4f curAngularVelocity = load(array(invRotation.rotate(cloth.mAngularVelocity)));
+ T4f prevAngularVelocity = load(array(invRotation.rotate(mPrevAngularVelocity)));
// rotation for one iteration in local space
- Simd4f curInvAngle = -iterDt * curAngularVelocity;
- Simd4f prevInvAngle = -iterDt * prevAngularVelocity;
+ T4f curInvAngle = -iterDt * curAngularVelocity;
+ T4f prevInvAngle = -iterDt * prevAngularVelocity;
physx::PxQuat curInvRotation = exp(castToPxVec3(curInvAngle));
physx::PxQuat prevInvRotation = exp(castToPxVec3(prevInvAngle));
@@ -312,17 +312,17 @@ cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const
assign(result.mRotationMatrix, curMatrix);
- Simd4f angularDrag = gSimd4fOne - exp2(load(array(cloth.mAngularLogDrag)) * dampExponent);
- Simd4f centrifugalInertia = load(array(cloth.mCentrifugalInertia));
- Simd4f angularInertia = load(array(cloth.mAngularInertia));
- Simd4f angularAcceleration = curAngularVelocity - prevAngularVelocity;
+ T4f angularDrag = gSimd4fOne - exp2(load(array(cloth.mAngularLogDrag)) * dampExponent);
+ T4f centrifugalInertia = load(array(cloth.mCentrifugalInertia));
+ T4f angularInertia = load(array(cloth.mAngularInertia));
+ T4f angularAcceleration = curAngularVelocity - prevAngularVelocity;
- Simd4f epsilon = simd4f(sqrtf(FLT_MIN)); // requirement: sqr(epsilon) > 0
- Simd4f velocityLengthSqr = lengthSqr(curAngularVelocity) + epsilon;
- Simd4f dragLengthSqr = lengthSqr(Simd4f(curAngularVelocity * angularDrag)) + epsilon;
- Simd4f centrifugalLengthSqr = lengthSqr(Simd4f(curAngularVelocity * centrifugalInertia)) + epsilon;
- Simd4f accelerationLengthSqr = lengthSqr(angularAcceleration) + epsilon;
- Simd4f inertiaLengthSqr = lengthSqr(Simd4f(angularAcceleration * angularInertia)) + epsilon;
+ T4f epsilon = simd4f(sqrtf(FLT_MIN)); // requirement: sqr(epsilon) > 0
+ T4f velocityLengthSqr = lengthSqr(curAngularVelocity) + epsilon;
+ T4f dragLengthSqr = lengthSqr(T4f(curAngularVelocity * angularDrag)) + epsilon;
+ T4f centrifugalLengthSqr = lengthSqr(T4f(curAngularVelocity * centrifugalInertia)) + epsilon;
+ T4f accelerationLengthSqr = lengthSqr(angularAcceleration) + epsilon;
+ T4f inertiaLengthSqr = lengthSqr(T4f(angularAcceleration * angularInertia)) + epsilon;
float dragScale = array(rsqrt(velocityLengthSqr * dragLengthSqr) * dragLengthSqr)[0];
float inertiaScale =
@@ -337,11 +337,11 @@ cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const
inertiaScale;
// slightly better in ClothCustomFloating than curInvAngle alone
- Simd4f centrifugalVelocity = (prevInvAngle + curInvAngle) * simd4f(0.5f);
- const Simd4f data = lengthSqr(centrifugalVelocity);
+ T4f centrifugalVelocity = (prevInvAngle + curInvAngle) * simd4f(0.5f);
+ const T4f data = lengthSqr(centrifugalVelocity);
float centrifugalSqrLength = array(data)[0] * centrifugalScale;
- Simd4f coriolisVelocity = centrifugalVelocity * simd4f(centrifugalScale);
+ T4f coriolisVelocity = centrifugalVelocity * simd4f(centrifugalScale);
physx::PxMat33 coriolisMatrix = physx::shdfnd::star(castToPxVec3(coriolisVelocity));
const float* dampScalePtr = array(firstDampScale);
@@ -369,7 +369,7 @@ cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const
}
else
{
- Simd4f minusOne = -static_cast<Simd4f>(gSimd4fOne);
+ T4f minusOne = -static_cast<T4f>(gSimd4fOne);
result.mRotationMatrix[0] = minusOne;
result.mPrevMatrix[0] = select(maskXYZ, firstDampScale, minusOne);
}
@@ -380,8 +380,8 @@ cloth::IterationState<Simd4f> cloth::IterationStateFactory::create(MyCloth const
return result;
}
-template <typename Simd4f>
-void cloth::IterationState<Simd4f>::update()
+template <typename T4f>
+void cloth::IterationState<T4f>::update()
{
if (mIsTurning)
{
diff --git a/NvCloth/src/NvSimd/NvSimdTypes.h b/NvCloth/src/NvSimd/NvSimdTypes.h
index 0625332..dd94b40 100644
--- a/NvCloth/src/NvSimd/NvSimdTypes.h
+++ b/NvCloth/src/NvSimd/NvSimdTypes.h
@@ -104,7 +104,7 @@ void foo(const float* ptr)
#define NV_SIMD_INLINE_ASSEMBLER 1
#endif
-/*! \def NV_SIMD_USE_NAMESPACE
+/*! \def NV_CLOTH_NO_SIMD_NAMESPACE
* \brief Set to 1 to define the SIMD library types and functions inside the nvidia::simd namespace.
* By default, the types and functions defined in this header live in the global namespace.
* This is because MSVC (prior to version 12, Visual Studio 2013) does an inferior job at optimizing
@@ -116,11 +116,11 @@ void foo(const float* ptr)
* __m128i are wrapped into structs. Arguments need to be passed by reference in this mode.
* \see NV_SIMD_VECTORCALL, Simd4fArg */
-#if defined NV_SIMD_USE_NAMESPACE&& NV_SIMD_USE_NAMESPACE
+#ifndef NV_CLOTH_NO_SIMD_NAMESPACE
#define NV_SIMD_NAMESPACE_BEGIN \
namespace nv \
{ \
- namespace simd \
+ namespace cloth \
{
#define NV_SIMD_NAMESPACE_END \
} \
diff --git a/NvCloth/src/PointInterpolator.h b/NvCloth/src/PointInterpolator.h
index b9db131..75e1dcf 100644
--- a/NvCloth/src/PointInterpolator.h
+++ b/NvCloth/src/PointInterpolator.h
@@ -37,7 +37,7 @@ namespace cloth
{
// acts as a poor mans random access iterator
-template <typename Simd4f, typename BaseIterator>
+template <typename T4f, typename BaseIterator>
class LerpIterator
{
@@ -50,12 +50,12 @@ class LerpIterator
}
// return the interpolated point at a given index
- inline Simd4f operator[](size_t index) const
+ inline T4f operator[](size_t index) const
{
return mStart[index] + (mTarget[index] - mStart[index]) * mAlpha;
}
- inline Simd4f operator*() const
+ inline T4f operator*() const
{
return (*this)[0];
}
@@ -70,13 +70,13 @@ class LerpIterator
private:
// interpolation parameter
- const Simd4f mAlpha;
+ const T4f mAlpha;
BaseIterator mStart;
BaseIterator mTarget;
};
-template <typename Simd4f, size_t Stride>
+template <typename T4f, size_t Stride>
class UnalignedIterator
{
@@ -87,12 +87,12 @@ class UnalignedIterator
{
}
- inline Simd4f operator[](size_t index) const
+ inline T4f operator[](size_t index) const
{
return load(mPointer + index * Stride);
}
- inline Simd4f operator*() const
+ inline T4f operator*() const
{
return (*this)[0];
}
@@ -109,15 +109,15 @@ class UnalignedIterator
};
// acts as an iterator but returns a constant
-template <typename Simd4f>
+template <typename T4f>
class ConstantIterator
{
public:
- ConstantIterator(const Simd4f& value) : mValue(value)
+ ConstantIterator(const T4f& value) : mValue(value)
{
}
- inline Simd4f operator*() const
+ inline T4f operator*() const
{
return mValue;
}
@@ -129,20 +129,20 @@ class ConstantIterator
private:
ConstantIterator& operator = (const ConstantIterator&);
- const Simd4f mValue;
+ const T4f mValue;
};
// wraps an iterator with constant scale and bias
-template <typename Simd4f, typename BaseIterator>
+template <typename T4f, typename BaseIterator>
class ScaleBiasIterator
{
public:
- ScaleBiasIterator(BaseIterator base, const Simd4f& scale, const Simd4f& bias)
+ ScaleBiasIterator(BaseIterator base, const T4f& scale, const T4f& bias)
: mScale(scale), mBias(bias), mBaseIterator(base)
{
}
- inline Simd4f operator*() const
+ inline T4f operator*() const
{
return (*mBaseIterator) * mScale + mBias;
}
@@ -156,8 +156,8 @@ class ScaleBiasIterator
private:
ScaleBiasIterator& operator = (const ScaleBiasIterator&);
- const Simd4f mScale;
- const Simd4f mBias;
+ const T4f mScale;
+ const T4f mBias;
BaseIterator mBaseIterator;
};
diff --git a/NvCloth/src/SwCollision.cpp b/NvCloth/src/SwCollision.cpp
index 89df8a5..0aa196d 100644
--- a/NvCloth/src/SwCollision.cpp
+++ b/NvCloth/src/SwCollision.cpp
@@ -40,6 +40,7 @@
using namespace nv;
using namespace physx;
+using namespace cloth;
// the particle trajectory needs to penetrate more than 0.2 * radius to trigger continuous collision
template <typename T4f>
@@ -160,31 +161,41 @@ void generateCones(cloth::ConeData* dst, const cloth::SphereData* sourceSpheres,
cloth::ConeData* cIt = dst;
for (const cloth::IndexPair* iIt = capsuleIndices, *iEnd = iIt + numCones; iIt != iEnd; ++iIt, ++cIt)
{
+ // w element contains sphere radii
PxVec4 first = reinterpret_cast<const PxVec4&>(sourceSpheres[iIt->first]);
PxVec4 second = reinterpret_cast<const PxVec4&>(sourceSpheres[iIt->second]);
PxVec4 center = (second + first) * 0.5f;
- PxVec4 axis = (second - first) * 0.5f;
+ PxVec4 axis = (second - first) * 0.5f; //half axis
+ //axiw.w = half of radii difference
- float sqrAxisLength = axis.x * axis.x + axis.y * axis.y + axis.z * axis.z;
- float sqrConeLength = sqrAxisLength - cloth::sqr(axis.w);
+ // |Axis|^2
+ float sqrAxisHalfLength = axis.x * axis.x + axis.y * axis.y + axis.z * axis.z;
- float invAxisLength = 1 / sqrtf(sqrAxisLength);
- float invConeLength = 1 / sqrtf(sqrConeLength);
+ // http://jwilson.coe.uga.edu/emt669/Student.Folders/Kertscher.Jeff/Essay.3/Tangents.html
+ // |Axis|^2 = |Cone|^2 + (sphere2Radius-sphere1Radius)^2
+ float sqrConeHalfLength = sqrAxisHalfLength - cloth::sqr(axis.w);
- if (sqrConeLength <= 0.0f)
- invAxisLength = invConeLength = 0.0f;
+ float invAxisHalfLength = 1 / sqrtf(sqrAxisHalfLength);
+ float invConeHalfLength = 1 / sqrtf(sqrConeHalfLength);
- float axisLength = sqrAxisLength * invAxisLength;
- float slope = axis.w * invConeLength;
+ if (sqrConeHalfLength <= 0.0f)
+ invAxisHalfLength = invConeHalfLength = 0.0f;
+
+ float axisHalfLength = sqrAxisHalfLength * invAxisHalfLength;
+ float slope = axis.w * invConeHalfLength;
cIt->center = PxVec3(center.x, center.y, center.z );
- cIt->radius = (axis.w + first.w) * invConeLength * axisLength;
- cIt->axis = PxVec3(axis.x, axis.y, axis.z) * invAxisLength;
+ cIt->radius = (axis.w + first.w) * invConeHalfLength * axisHalfLength; //cone radius in the center
+ cIt->axis = PxVec3(axis.x, axis.y, axis.z) * invAxisHalfLength;
cIt->slope = slope;
- cIt->sqrCosine = 1.0f - cloth::sqr(axis.w * invAxisLength);
- cIt->halfLength = axisLength;
+ // cos()^2 = 1.0 - (radius difference / axis length)^2
+ // cos()^2 = 1.0 - (opposite/hypotenuse)^2
+ // cos()^2 = 1.0 - sin(angle between c2c1 and c2t1)^2
+ // cos()^2 = 1.0 - sin(angle between axis and c2t1)^2
+ cIt->sqrCosine = 1.0f - cloth::sqr(axis.w * invAxisHalfLength);
+ cIt->halfLength = axisHalfLength;
uint32_t firstMask = 0x1u << iIt->first;
cIt->firstMask = firstMask;
@@ -407,12 +418,14 @@ void cloth::SwCollision<T4f>::buildSphereAcceleration(const SphereData* sIt)
{
static const int maxIndex = sGridSize - 1;
+ uint32_t mask = 0x1; //single bit mask for current sphere
const SphereData* sEnd = sIt + mClothData.mNumSpheres;
- for (uint32_t mask = 0x1; sIt != sEnd; ++sIt, mask <<= 1)
+ for (; sIt != sEnd; ++sIt, mask <<= 1)
{
T4f sphere = loadAligned(array(sIt->center));
T4f radius = splat<3>(sphere);
+ //calculate the first and last cell index, for each axis, that contains the sphere
T4i first = intFloor(max((sphere - radius) * mGridScale + mGridBias, gSimd4fZero));
T4i last = intFloor(min((sphere + radius) * mGridScale + mGridBias, sGridLength));
@@ -422,11 +435,14 @@ void cloth::SwCollision<T4f>::buildSphereAcceleration(const SphereData* sIt)
uint32_t* firstIt = reinterpret_cast<uint32_t*>(mSphereGrid);
uint32_t* lastIt = firstIt + 3 * sGridSize;
+ //loop through the 3 axes
for (uint32_t i = 0; i < 3; ++i, firstIt += sGridSize, lastIt += sGridSize)
{
+ //mark the sphere and everything to the right
for (int j = firstIdx[i]; j <= maxIndex; ++j)
firstIt[j] |= mask;
+ //mark the sphere and everything to the left
for (int j = lastIdx[i]; j >= 0; --j)
lastIt[j] |= mask;
}
@@ -469,17 +485,23 @@ void cloth::SwCollision<T4f>::mergeAcceleration(uint32_t* firstIt)
template <typename T4f>
bool cloth::SwCollision<T4f>::buildAcceleration()
{
- // determine sphere bbox
+ // determine single bounding box around all spheres
BoundingBox<T4f> sphereBounds =
expandBounds(emptyBounds<T4f>(), mCurData.mSpheres, mCurData.mSpheres + mClothData.mNumSpheres);
+
+ // determine single bounding box around all particles
BoundingBox<T4f> particleBounds = loadBounds<T4f>(mClothData.mCurBounds);
+
if (mClothData.mEnableContinuousCollision)
{
+ // extend bounds to include movement from previous frame
sphereBounds = expandBounds(sphereBounds, mPrevData.mSpheres, mPrevData.mSpheres + mClothData.mNumSpheres);
particleBounds = expandBounds(particleBounds, loadBounds<T4f>(mClothData.mPrevBounds));
}
BoundingBox<T4f> bounds = intersectBounds(sphereBounds, particleBounds);
+
+ // no collision checks needed if the intersection between particle bounds and sphere bounds is empty
T4f edgeLength = (bounds.mUpper - bounds.mLower) & ~static_cast<T4f>(sMaskW);
if (!allGreaterEqual(edgeLength, gSimd4fZero))
return false;
@@ -490,6 +512,7 @@ bool cloth::SwCollision<T4f>::buildAcceleration()
const T4f expandedEdgeLength = max(expandedUpper - expandedLower, gSimd4fEpsilon);
// make grid minimal thickness and strict upper bound of spheres
+ // grid maps bounds to 0-7 space (sGridLength =~= 8)
mGridScale = sGridLength * recip<1>(expandedEdgeLength);
mGridBias = -expandedLower * mGridScale;
array(mGridBias)[3] = 1.0f; // needed for collideVirtualParticles()
@@ -655,8 +678,8 @@ struct cloth::SwCollision<T4f>::ImpulseAccumulator
mNumCollisions = mNumCollisions + (gSimd4fOne & mask);
}
- T4f mDeltaX, mDeltaY, mDeltaZ;
- T4f mVelX, mVelY, mVelZ;
+ T4f mDeltaX, mDeltaY, mDeltaZ; //depenetration delta
+ T4f mVelX, mVelY, mVelZ; //frame offset of the collision shape (velocity * dt)
T4f mNumCollisions;
};
@@ -684,12 +707,15 @@ FORCE_INLINE void cloth::SwCollision<T4f>::collideSpheres(const T4i& sphereMask,
T4f sqrDistance = gSimd4fEpsilon + deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ;
T4f negativeScale = gSimd4fOne - rsqrt(sqrDistance) * splat<3>(sphere);
+ // negativeScale = 1 - radius/|position-sphere|
T4f contactMask;
if (!anyGreater(gSimd4fZero, negativeScale, contactMask))
continue;
accum.subtract(deltaX, deltaY, deltaZ, negativeScale, contactMask);
+ // -= delta * negativeScale
+ // = delta - delta * radius/|position-sphere|
if (frictionEnabled)
{
@@ -730,10 +756,13 @@ cloth::SwCollision<T4f>::collideCones(const T4f* __restrict positions, ImpulseAc
T4f center = loadAligned(centerPtr, offset);
+ // offset from center of cone to particle
+ // delta = pos - center
T4f deltaX = positions[0] - splat<0>(center);
T4f deltaY = positions[1] - splat<1>(center);
T4f deltaZ = positions[2] - splat<2>(center);
+ //axis of the cone
T4f axis = loadAligned(axisPtr, offset);
T4f axisX = splat<0>(axis);
@@ -741,12 +770,16 @@ cloth::SwCollision<T4f>::collideCones(const T4f* __restrict positions, ImpulseAc
T4f axisZ = splat<2>(axis);
T4f slope = splat<3>(axis);
+ // project delta onto axis
T4f dot = deltaX * axisX + deltaY * axisY + deltaZ * axisZ;
+ // interpolate radius
T4f radius = dot * slope + splat<3>(center);
// set radius to zero if cone is culled
radius = max(radius, gSimd4fZero) & ~culled;
+ // distance to axis
+ // sqrDistance = |delta|^2 - |dot|^2
T4f sqrDistance = deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ - dot * dot;
T4i auxiliary = loadAligned(auxiliaryPtr, offset);
@@ -765,6 +798,8 @@ cloth::SwCollision<T4f>::collideCones(const T4f* __restrict positions, ImpulseAc
sqrDistance = max(sqrDistance, gSimd4fEpsilon);
T4f invDistance = rsqrt(sqrDistance);
+
+ //offset base to take slope in to account
T4f base = dot + slope * sqrDistance * invDistance;
// force left/rightMask to false if not inside cone
@@ -780,6 +815,7 @@ cloth::SwCollision<T4f>::collideCones(const T4f* __restrict positions, ImpulseAc
shapeMask.mSpheres = shapeMask.mSpheres & ~(firstMask & ~leftMask);
shapeMask.mSpheres = shapeMask.mSpheres & ~(secondMask & ~rightMask);
+ //contact normal direction
deltaX = deltaX - base * axisX;
deltaY = deltaY - base * axisY;
deltaZ = deltaZ - base * axisZ;
@@ -1173,7 +1209,9 @@ PX_INLINE void calculateFrictionImpulse(const T4f& deltaX, const T4f& deltaY, co
T4f ny = deltaY * rcpDelta;
T4f nz = deltaZ * rcpDelta;
- // calculate relative velocity scaled by number of collisions
+ // calculate relative velocity
+ // velXYZ is scaled by one over the number of collisions since all collisions accumulate into
+ // that variable during collision detection
T4f rvx = curPos[0] - prevPos[0] - velX * scale;
T4f rvy = curPos[1] - prevPos[1] - velY * scale;
T4f rvz = curPos[2] - prevPos[2] - velZ * scale;
@@ -1186,7 +1224,7 @@ PX_INLINE void calculateFrictionImpulse(const T4f& deltaX, const T4f& deltaY, co
T4f rvty = rvy - rvn * ny;
T4f rvtz = rvz - rvn * nz;
- // calculate magnitude of vt
+ // calculate magnitude of relative tangential velocity
T4f rcpVt = rsqrt(rvtx * rvtx + rvty * rvty + rvtz * rvtz + gSimd4fEpsilon);
// magnitude of friction impulse (cannot be greater than -vt)
@@ -1206,7 +1244,7 @@ void cloth::SwCollision<T4f>::collideParticles()
const T4f massScale = simd4f(mClothData.mCollisionMassScale);
const bool frictionEnabled = mClothData.mFrictionScale > 0.0f;
- const T4f frictionScale = simd4f(mClothData.mFrictionScale);
+ const T4f frictionScale = simd4f(mClothData.mFrictionScale); //[arameter set by user
T4f curPos[4];
T4f prevPos[4];
@@ -1214,16 +1252,20 @@ void cloth::SwCollision<T4f>::collideParticles()
float* __restrict prevIt = mClothData.mPrevParticles;
float* __restrict pIt = mClothData.mCurParticles;
float* __restrict pEnd = pIt + mClothData.mNumParticles * 4;
+ //loop over particles 4 at a time
for (; pIt < pEnd; pIt += 16, prevIt += 16)
{
curPos[0] = loadAligned(pIt, 0);
curPos[1] = loadAligned(pIt, 16);
curPos[2] = loadAligned(pIt, 32);
curPos[3] = loadAligned(pIt, 48);
- transpose(curPos[0], curPos[1], curPos[2], curPos[3]);
+ transpose(curPos[0], curPos[1], curPos[2], curPos[3]); //group values by axis in simd structure
ImpulseAccumulator accum;
+
+ //first collide cones
T4i sphereMask = collideCones(curPos, accum);
+ //pass on hit mask to ignore sphere parts that are inside the cones
collideSpheres(sphereMask, curPos, accum);
T4f mask;
@@ -1267,6 +1309,7 @@ void cloth::SwCollision<T4f>::collideParticles()
curPos[3] = select(mask, curPos[3] * scale, curPos[3]);
}
+ //apply average de-penetration delta
curPos[0] = curPos[0] + accum.mDeltaX * invNumCollisions;
curPos[1] = curPos[1] + accum.mDeltaY * invNumCollisions;
curPos[2] = curPos[2] + accum.mDeltaZ * invNumCollisions;
diff --git a/NvCloth/src/SwInterCollision.cpp b/NvCloth/src/SwInterCollision.cpp
index b9b494f..50be414 100644
--- a/NvCloth/src/SwInterCollision.cpp
+++ b/NvCloth/src/SwInterCollision.cpp
@@ -39,6 +39,7 @@
using namespace nv;
using namespace physx;
+using namespace cloth;
namespace
{
diff --git a/NvCloth/src/SwSelfCollision.cpp b/NvCloth/src/SwSelfCollision.cpp
index 095943d..ec5a166 100644
--- a/NvCloth/src/SwSelfCollision.cpp
+++ b/NvCloth/src/SwSelfCollision.cpp
@@ -37,23 +37,24 @@
#endif
using namespace nv;
+using namespace cloth;
namespace
{
-const Simd4fTupleFactory sMaskXYZ = simd4f(simd4i(~0, ~0, ~0, 0));
-
// returns sorted indices, output needs to be at least 2*(last - first) + 1024
void radixSort(const uint32_t* first, const uint32_t* last, uint16_t* out)
{
+ // this sort uses a radix (bin) size of 256, requiring 4 bins to sort the 32 bit keys
uint16_t n = uint16_t(last - first);
uint16_t* buffer = out + 2 * n;
uint16_t* __restrict histograms[] = { buffer, buffer + 256, buffer + 512, buffer + 768 };
+ //zero the buffer memory used for the 4 buckets
memset(buffer, 0, 1024 * sizeof(uint16_t));
- // build 3 histograms in one pass
+ // build 4 histograms in one pass
for (const uint32_t* __restrict it = first; it != last; ++it)
{
uint32_t key = *it;
@@ -64,7 +65,7 @@ void radixSort(const uint32_t* first, const uint32_t* last, uint16_t* out)
}
// convert histograms to offset tables in-place
- uint16_t sums[4] = {};
+ uint16_t sums[4] = {0, 0, 0, 0};
for (uint32_t i = 0; i < 256; ++i)
{
uint16_t temp0 = uint16_t(histograms[0][i] + sums[0]);
@@ -133,6 +134,7 @@ bool isSelfCollisionEnabled(const cloth::SwCloth& cloth)
return std::min(cloth.mSelfCollisionDistance, -cloth.mSelfCollisionLogStiffness) > 0.0f;
}
+// align x to a 2 byte boundary
inline uint32_t align2(uint32_t x)
{
return (x + 1) & ~1;
@@ -146,7 +148,7 @@ cloth::SwSelfCollision<T4f>::SwSelfCollision(cloth::SwClothData& clothData, clot
{
mCollisionDistance = simd4f(mClothData.mSelfCollisionDistance);
mCollisionSquareDistance = mCollisionDistance * mCollisionDistance;
- mStiffness = sMaskXYZ & static_cast<T4f>(simd4f(mClothData.mSelfCollisionStiffness));
+ mStiffness = gSimd4fMaskXYZ & static_cast<T4f>(simd4f(mClothData.mSelfCollisionStiffness));
}
template <typename T4f>
@@ -170,11 +172,12 @@ void cloth::SwSelfCollision<T4f>::operator()()
uint32_t hashAxis0 = (sweepAxis + 1) % 3;
uint32_t hashAxis1 = (sweepAxis + 2) % 3;
- // reserve 0, 127, and 65535 for sentinel
+ // reserve 0, 255, and 65535 for sentinel
T4f cellSize = max(mCollisionDistance, simd4f(1.0f / 253) * edgeLength);
array(cellSize)[sweepAxis] = array(edgeLength)[sweepAxis] / 65533;
T4f one = gSimd4fOne;
+ // +1 for sentinel 0 offset
T4f gridSize = simd4f(254.0f);
array(gridSize)[sweepAxis] = 65534.0f;
@@ -194,6 +197,7 @@ void cloth::SwSelfCollision<T4f>::operator()()
// create keys
for (uint32_t i = 0; i < numIndices; ++i)
{
+ // use all particles when no self collision indices are set
uint32_t index = indices ? indices[i] : i;
// grid coordinate
@@ -207,28 +211,32 @@ void cloth::SwSelfCollision<T4f>::operator()()
keys[i] = uint32_t(ptr[sweepAxis] | (ptr[hashAxis0] << 16) | (ptr[hashAxis1] << 24));
}
- // compute sorted keys indices
+ // compute sorted key indices
radixSort(keys, keys + numIndices, sortedIndices);
// snoop histogram: offset of first index with 8 msb > 1 (0 is sentinel)
- uint16_t firstColumnSize = sortedIndices[2 * numIndices + 769];
+ // sortedIndices[2 * numIndices + 768 + 1] is actually histograms[3]+1 from radixSort
+ uint16_t firstColumnSize = sortedIndices[2 * numIndices + 768 + 1];
- // sort keys
+ // sort keys using the sortedIndices
for (uint32_t i = 0; i < numIndices; ++i)
sortedKeys[i] = keys[sortedIndices[i]];
sortedKeys[numIndices] = uint32_t(-1); // sentinel
+ // do user provided index array indirection here if we have one
+ // so we don't need to keep branching for this condition later
if (indices)
{
// sort indices (into no-longer-needed keys array)
- const uint16_t* __restrict permutation = sortedIndices;
+ // the keys array is no longer used so we can reuse it to store indices[sortedIndices[i]]
+ const uint16_t* __restrict oldSortedIndices = sortedIndices;
sortedIndices = reinterpret_cast<uint16_t*>(keys);
for (uint32_t i = 0; i < numIndices; ++i)
- sortedIndices[i] = uint16_t(indices[permutation[i]]);
+ sortedIndices[i] = uint16_t(indices[oldSortedIndices[i]]);
}
// calculate the number of buckets we need to search forward
- const Simd4i data = intFloor(gridScale * mCollisionDistance);
+ const Simd4i data = intFloor(gridScale * mCollisionDistance); //equal to or larger than floor(mCollisionDistance)
uint32_t collisionDistance = 2 + static_cast<uint32_t>(array(data)[sweepAxis]);
// collide particles
@@ -310,7 +318,7 @@ void cloth::SwSelfCollision<T4f>::collideParticles(T4f& pos0, T4f& pos1, const T
T4f ratio = mCollisionDistance * rsqrt(distSqr);
T4f scale = mStiffness * recip(gSimd4fEpsilon + w0 + w1);
- T4f delta = (scale * (diff - diff * ratio)) & sMaskXYZ;
+ T4f delta = (scale * (diff - diff * ratio)) & gSimd4fMaskXYZ;
pos0 = pos0 + delta * w0;
pos1 = pos1 - delta * w1;
@@ -325,42 +333,71 @@ template <bool useRestParticles>
void cloth::SwSelfCollision<T4f>::collideParticles(const uint32_t* keys, uint16_t firstColumnSize,
const uint16_t* indices, uint32_t collisionDistance)
{
+ //keys is an array of bucket keys for the particles
+ //indices is an array of particle indices
+ //collisionDistance is the number of buckets along the sweep axis we need to search after the current one
+
T4f* __restrict particles = reinterpret_cast<T4f*>(mClothData.mCurParticles);
T4f* __restrict restParticles =
useRestParticles ? reinterpret_cast<T4f*>(mClothData.mRestPositions) : particles;
- const uint32_t bucketMask = uint16_t(-1);
+ //16 lsb's are for the bucket
+ const uint32_t bucketMask = 0x0000ffff;
+ // offsets for cells (not along the sweep axis)
+ // [1] [3]-[1] [3] [1]+[3]
const uint32_t keyOffsets[] = { 0, 0x00010000, 0x00ff0000, 0x01000000, 0x01010000 };
const uint32_t* __restrict kFirst[5];
const uint32_t* __restrict kLast[5];
+ /*
+ We use 5 first/last pairs to search the following cells
+ =====================
+ | | | | | |
+ =====================
+ | | | 0 | 1 | |
+ =====================
+ | | 2 | 3 | 4 | |
+ =====================
+ | | | | | |
+ =====================
+ With 0 as the origin.
+ This way collisions won't be double reported.
+ */
+
{
// optimization: scan forward iterator starting points once instead of 9 times
const uint32_t* __restrict kIt = keys;
uint32_t key = *kIt;
+ //clamp first/lastKey to bucket
uint32_t firstKey = key - std::min(collisionDistance, key & bucketMask);
uint32_t lastKey = std::min(key + collisionDistance, key | bucketMask);
+ //sweep 0
kFirst[0] = kIt;
+ //find next key in keys that is past lastKey
while (*kIt < lastKey)
++kIt;
kLast[0] = kIt;
+ //sweep 1...4
for (uint32_t k = 1; k < 5; ++k)
{
+ // scan forward start point
for (uint32_t n = firstKey + keyOffsets[k]; *kIt < n;)
++kIt;
kFirst[k] = kIt;
+ // scan forward end point
for (uint32_t n = lastKey + keyOffsets[k]; *kIt < n;)
++kIt;
kLast[k] = kIt;
- // jump forward once to second column
- kIt = keys + firstColumnSize;
+ // jump forward once to second column to go from cell offset 1 to 2 quickly
+ if(firstColumnSize)
+ kIt = keys + firstColumnSize;
firstColumnSize = 0;
}
}
@@ -371,7 +408,8 @@ void cloth::SwSelfCollision<T4f>::collideParticles(const uint32_t* keys, uint16_
const uint16_t* __restrict jIt;
const uint16_t* __restrict jEnd;
- for (; iIt != iEnd; ++iIt, ++kFirst[0])
+ //loop through all indices
+ for (; iIt < iEnd; ++iIt, ++kFirst[0])
{
NV_CLOTH_ASSERT(*iIt < mClothData.mNumParticles);
@@ -390,8 +428,8 @@ void cloth::SwSelfCollision<T4f>::collideParticles(const uint32_t* keys, uint16_
++kLast[0];
// process potential colliders of same cell
- jEnd = indices + (kLast[0] - keys);
- for (jIt = iIt + 1; jIt != jEnd; ++jIt)
+ jEnd = indices + (kLast[0] - keys); //calculate index from key pointer
+ for (jIt = iIt + 1; jIt < jEnd; ++jIt)
collideParticles<useRestParticles>(particle, particles[*jIt], restParticle, restParticles[*jIt]);
// process neighbor cells
@@ -407,7 +445,7 @@ void cloth::SwSelfCollision<T4f>::collideParticles(const uint32_t* keys, uint16_
// process potential colliders
jEnd = indices + (kLast[k] - keys);
- for (jIt = indices + (kFirst[k] - keys); jIt != jEnd; ++jIt)
+ for (jIt = indices + (kFirst[k] - keys); jIt < jEnd; ++jIt)
collideParticles<useRestParticles>(particle, particles[*jIt], restParticle, restParticles[*jIt]);
}
diff --git a/NvCloth/src/SwSolver.cpp b/NvCloth/src/SwSolver.cpp
index c7437e1..f0f9152 100644
--- a/NvCloth/src/SwSolver.cpp
+++ b/NvCloth/src/SwSolver.cpp
@@ -50,7 +50,7 @@ bool neonSolverKernel(SwCloth const&, SwClothData&, SwKernelAllocator&, Iteratio
}
using namespace nv;
-
+using namespace cloth;
#if NV_SIMD_SIMD
typedef Simd4f Simd4fType;
#else
@@ -93,12 +93,17 @@ void sortTasks(shdfnd::Array<T, cloth::NonTrackingAllocator>& tasks)
void cloth::SwSolver::addCloth(Cloth* cloth)
{
- SwCloth& swCloth = *static_cast<SwCloth*>(cloth);
-
- mSimulatedCloths.pushBack(SimulatedCloth(swCloth, this));
+ addClothAppend(cloth);
sortTasks(mSimulatedCloths);
+}
- mCloths.pushBack(&swCloth);
+void cloth::SwSolver::addCloths(Range<Cloth*> cloths)
+{
+ for (uint32_t i = 0; i < cloths.size(); ++i)
+ {
+ addClothAppend(*(cloths.begin() + i));
+ }
+ sortTasks(mSimulatedCloths);
}
void cloth::SwSolver::removeCloth(Cloth* cloth)
@@ -221,6 +226,16 @@ void cloth::SwSolver::interCollision()
collider();
}
+void cloth::SwSolver::addClothAppend(Cloth* cloth)
+{
+ SwCloth& swCloth = *static_cast<SwCloth*>(cloth);
+ NV_CLOTH_ASSERT(mCloths.find(&swCloth) == mCloths.end());
+
+ mSimulatedCloths.pushBack(SimulatedCloth(swCloth, this));
+
+ mCloths.pushBack(&swCloth);
+}
+
void cloth::SwSolver::beginFrame() const
{
mSimulateProfileEventData = NV_CLOTH_PROFILE_START_CROSSTHREAD("cloth::SwSolver::simulate", 0);
@@ -287,9 +302,14 @@ void cloth::SwSolver::SimulatedCloth::Simulate()
// construct kernel functor and execute
#if NV_ANDROID
- // if (!neonSolverKernel(cloth, data, allocator, factory))
-#endif
+ if (!neonSolverKernel(*mCloth, data, allocator, factory))
+ {
+ //NV_CLOTH_LOG_WARNING("No NEON CPU support detected. Falling back to scalar types.");
+ SwSolverKernel<Scalar4f>(*mCloth, data, allocator, factory)();
+ }
+#else
SwSolverKernel<Simd4fType>(*mCloth, data, allocator, factory)();
+#endif
data.reconcile(*mCloth); // update cloth
}
diff --git a/NvCloth/src/SwSolver.h b/NvCloth/src/SwSolver.h
index c7b177b..ad58a7c 100644
--- a/NvCloth/src/SwSolver.h
+++ b/NvCloth/src/SwSolver.h
@@ -64,6 +64,7 @@ class SwSolver : public Solver
virtual ~SwSolver();
virtual void addCloth(Cloth*) override;
+ virtual void addCloths(Range<Cloth*> cloths) override;
virtual void removeCloth(Cloth*) override;
virtual int getNumCloths() const override;
virtual Cloth * const * getClothList() const override;
@@ -112,6 +113,10 @@ class SwSolver : public Solver
}
private:
+ // add cloth helper functions
+ void addClothAppend(Cloth* cloth);
+
+ // simulate helper functions
void beginFrame() const;
void endFrame() const;
diff --git a/NvCloth/src/SwSolverKernel.cpp b/NvCloth/src/SwSolverKernel.cpp
index eec7956..2181b1e 100644
--- a/NvCloth/src/SwSolverKernel.cpp
+++ b/NvCloth/src/SwSolverKernel.cpp
@@ -103,6 +103,7 @@ const uint32_t sAvxSupport = getAvxSupport(); // 0: no AVX, 1: AVX, 2: AVX+FMA
#endif
using namespace nv;
+using namespace cloth;
namespace
{
@@ -209,11 +210,14 @@ void constrainMotion(T4f* __restrict curIt, const T4f* __restrict curEnd, const
T4f isPositive;
if (anyGreater(slack, gSimd4fZero, isPositive))
{
- // set invMass to zero if radius is zero
+ // set invMass to zero if radius is zero (xyz will be unchanged)
+ // curPos.w = radius > 0 ? curPos.w : 0
+ // the first three components are compared against -FLT_MAX which is always true
curPos0 = curPos0 & (splat<0>(radius) > sMinusFloatMaxXYZ);
curPos1 = curPos1 & (splat<1>(radius) > sMinusFloatMaxXYZ);
curPos2 = curPos2 & (splat<2>(radius) > sMinusFloatMaxXYZ);
curPos3 = curPos3 & ((radius) > sMinusFloatMaxXYZ);
+ // we don't have to splat the last one as the 4th element is already in the right place
slack = slack * stiffness & isPositive;
@@ -367,7 +371,7 @@ void solveConstraints(float* __restrict posIt, const float* __restrict rIt, cons
}
}
-#if PX_WINDOWS_FAMILY
+#if PX_WINDOWS_FAMILY && NV_SIMD_SSE2
#include "sse2/SwSolveConstraints.h"
#endif
diff --git a/NvCloth/src/cuda/CuCloth.cpp b/NvCloth/src/cuda/CuCloth.cpp
index 3e6175b..4131b04 100644
--- a/NvCloth/src/cuda/CuCloth.cpp
+++ b/NvCloth/src/cuda/CuCloth.cpp
@@ -423,7 +423,7 @@ void CuCloth::clearParticleAccelerations()
{
CuContextLock contextLock(mFactory);
CuDeviceVector<PxVec4>(mFactory.mContext).swap(mParticleAccelerations);
- CuHostVector<PxVec4, CU_MEMHOSTALLOC_DEVICEMAP>::Type().swap(mParticleAccelerationsHostCopy);
+ CuHostVector<PxVec4, CU_MEMHOSTALLOC_DEVICEMAP>::Type(mFactory.mContext).swap(mParticleAccelerationsHostCopy);
wakeUp();
}
diff --git a/NvCloth/src/cuda/CuClothData.h b/NvCloth/src/cuda/CuClothData.h
index dd836fd..5f2d7c6 100644
--- a/NvCloth/src/cuda/CuClothData.h
+++ b/NvCloth/src/cuda/CuClothData.h
@@ -32,7 +32,7 @@
#include <foundation/Px.h>
#ifndef __CUDACC__
-#include "simd.h"
+#include "Simd.h"
#endif
namespace nv
diff --git a/NvCloth/src/cuda/CuFabric.cpp b/NvCloth/src/cuda/CuFabric.cpp
index 9bc20db..957f912 100644
--- a/NvCloth/src/cuda/CuFabric.cpp
+++ b/NvCloth/src/cuda/CuFabric.cpp
@@ -31,6 +31,7 @@
#include "CuContextLock.h"
#include "CuFactory.h"
#include <PsUtilities.h>
+#include <limits.h>
using namespace physx;
diff --git a/NvCloth/src/cuda/CuPinnedAllocator.h b/NvCloth/src/cuda/CuPinnedAllocator.h
index 8b1787b..9939324 100644
--- a/NvCloth/src/cuda/CuPinnedAllocator.h
+++ b/NvCloth/src/cuda/CuPinnedAllocator.h
@@ -29,6 +29,8 @@
#pragma once
+#include <utility>
+
#include "CuCheckSuccess.h"
#include "NvCloth/Allocator.h"
@@ -102,7 +104,7 @@ public:
void destroy(T* ptr)
{
- core::unused(ptr);
+ PX_UNUSED(ptr);
ptr->~T();
}
@@ -122,13 +124,13 @@ bool operator!=(const CuHostAllocator<T1, Flag1>&, const CuHostAllocator<T2, Fla
return false;
}
-//Use CuHostVectorImpl instead of physx::shdfnd::Array<T, typename CuHostAllocator<T, Flags>>
+//Use CuHostVectorImpl instead of physx::shdfnd::Array<T, CuHostAllocator<T, Flags>>
//This entire class is just to make sure that the mDevicePtr from the CuHostAllocator is properly swapped together with mData
template <typename T, unsigned Flags = 0>
-class CuHostVectorImpl : public physx::shdfnd::Array<T, typename CuHostAllocator<T, Flags>>
+class CuHostVectorImpl : public physx::shdfnd::Array<T, CuHostAllocator<T, Flags>>
{
- typedef physx::shdfnd::Array<T, typename CuHostAllocator<T, Flags>> Super;
- typedef typename CuHostAllocator<T, Flags> Alloc;
+ typedef physx::shdfnd::Array<T, CuHostAllocator<T, Flags>> Super;
+ typedef CuHostAllocator<T, Flags> Alloc;
public:
explicit CuHostVectorImpl(const physx::PxEMPTY v):Super(v){}
PX_INLINE explicit CuHostVectorImpl(const Alloc& alloc = Alloc()):Super(alloc){}
@@ -142,10 +144,10 @@ public:
PX_INLINE explicit CuHostVectorImpl(const T* first, const T* last, const Alloc& alloc = Alloc()):Super(first,last,alloc){}
- void swap(physx::shdfnd::Array<T, typename CuHostAllocator<T, Flags>>& other)
+ void swap(CuHostVectorImpl<T, Flags>& other)
{
- PX_ASSERT(mContext == other.mContext);
- physx::shdfnd::swap(mDevicePtr, other.mDevicePtr);
+ NV_CLOTH_ASSERT(this->mContext == other.mContext);
+ physx::shdfnd::swap(this->mDevicePtr, other.mDevicePtr);
Super::swap(other);
}
};
diff --git a/NvCloth/src/cuda/CuSolver.cpp b/NvCloth/src/cuda/CuSolver.cpp
index f0e328f..7ef1d32 100644
--- a/NvCloth/src/cuda/CuSolver.cpp
+++ b/NvCloth/src/cuda/CuSolver.cpp
@@ -302,6 +302,28 @@ cloth::CuSolver::~CuSolver()
mFactory.mSolverCount--;
}
+void cloth::CuSolver::addClothAppend(Cloth* cloth)
+{
+ CuCloth& cuCloth = *static_cast<CuCloth*>(cloth);
+
+ NV_CLOTH_ASSERT(mCloths.find(&cuCloth) == mCloths.end());
+
+ mCloths.pushBack(&cuCloth);
+ // trigger update of mClothData array
+ cuCloth.notifyChanged();
+}
+
+void cloth::CuSolver::addClothUpdateData()
+{
+ CuContextLock contextLock(mFactory);
+
+ // resize containers and update kernel data
+ mClothDataHostCopy.resize(mCloths.size());
+ mClothData.resize(mCloths.size());
+ mFrameData.resize(mCloths.size());
+ updateKernelData();
+}
+
void cloth::CuSolver::updateKernelData()
{
mKernelDataHost.mClothIndex = mClothIndex.get();
@@ -326,24 +348,17 @@ struct ClothSimCostGreater
void cloth::CuSolver::addCloth(Cloth* cloth)
{
- CuCloth& cuCloth = *static_cast<CuCloth*>(cloth);
-
- NV_CLOTH_ASSERT(mCloths.find(&cuCloth) == mCloths.end());
-
- mCloths.pushBack(&cuCloth);
- // trigger update of mClothData array
- cuCloth.notifyChanged();
-
- // sort cloth instances by size
- shdfnd::sort(mCloths.begin(), mCloths.size(), ClothSimCostGreater(), NonTrackingAllocator());
-
- CuContextLock contextLock(mFactory);
+ addClothAppend(cloth);
+ addClothUpdateData();
+}
- // resize containers and update kernel data
- mClothDataHostCopy.resize(mCloths.size());
- mClothData.resize(mCloths.size());
- mFrameData.resize(mCloths.size());
- updateKernelData();
+void cloth::CuSolver::addCloths(Range<Cloth*> cloths)
+{
+ for (uint32_t i = 0; i < cloths.size(); ++i)
+ {
+ addClothAppend(*(cloths.begin() + i));
+ }
+ addClothUpdateData();
}
void cloth::CuSolver::removeCloth(Cloth* cloth)
@@ -401,7 +416,8 @@ void cloth::CuSolver::endSimulation()
int cloth::CuSolver::getSimulationChunkCount() const
{
- return 1;
+ // 0 chunks when no cloth present in the solver, 1 otherwise
+ return getNumCloths() != 0;
}
void cloth::CuSolver::beginFrame()
diff --git a/NvCloth/src/cuda/CuSolver.h b/NvCloth/src/cuda/CuSolver.h
index 0406e00..b4c6d6b 100644
--- a/NvCloth/src/cuda/CuSolver.h
+++ b/NvCloth/src/cuda/CuSolver.h
@@ -58,6 +58,7 @@ public:
~CuSolver();
virtual void addCloth(Cloth*) override;
+ virtual void addCloths(Range<Cloth*> cloths) override;
virtual void removeCloth(Cloth*) override;
virtual int getNumCloths() const override;
virtual Cloth * const * getClothList() const override;
@@ -103,6 +104,10 @@ public:
}
private:
+ // add cloth helper functions
+ void addClothAppend(Cloth* cloth);
+ void addClothUpdateData();
+
void updateKernelData(); // context needs to be acquired
// simulate helper functions
diff --git a/NvCloth/src/dx/DxBatchedVector.h b/NvCloth/src/dx/DxBatchedVector.h
index 2c5e313..76b9b22 100644
--- a/NvCloth/src/dx/DxBatchedVector.h
+++ b/NvCloth/src/dx/DxBatchedVector.h
@@ -297,7 +297,7 @@ class DxBatchedVector
void swap(DxBatchedVector<T>& other)
{
- PX_ASSERT(&mStorage == &other.mStorage);
+ NV_CLOTH_ASSERT(&mStorage == &other.mStorage);
physx::shdfnd::swap(mOffset, other.mOffset);
physx::shdfnd::swap(mSize, other.mSize);
physx::shdfnd::swap(mCapacity, other.mCapacity);
diff --git a/NvCloth/src/dx/DxClothData.h b/NvCloth/src/dx/DxClothData.h
index f91d37d..4da9be2 100644
--- a/NvCloth/src/dx/DxClothData.h
+++ b/NvCloth/src/dx/DxClothData.h
@@ -31,7 +31,7 @@
#pragma once
#include <foundation/Px.h>
-#include "simd.h"
+#include "Simd.h"
namespace nv
{
diff --git a/NvCloth/src/dx/DxFactory.cpp b/NvCloth/src/dx/DxFactory.cpp
index fbf0c51..91f5125 100644
--- a/NvCloth/src/dx/DxFactory.cpp
+++ b/NvCloth/src/dx/DxFactory.cpp
@@ -251,15 +251,15 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
void cloth::DxFactory::extractCollisionData(const Cloth& cloth, Range<PxVec4> spheres, Range<uint32_t> capsules,
Range<PxVec4> planes, Range<uint32_t> convexes, Range<PxVec3> triangles) const
{
- PX_ASSERT(&cloth.getFactory() == this);
+ NV_CLOTH_ASSERT(&cloth.getFactory() == this);
const DxCloth& dxCloth = static_cast<const DxCloth&>(cloth);
- PX_ASSERT(spheres.empty() || spheres.size() == dxCloth.mStartCollisionSpheres.size());
- PX_ASSERT(capsules.empty() || capsules.size() == dxCloth.mCapsuleIndices.size() * 2);
- PX_ASSERT(planes.empty() || planes.size() == dxCloth.mStartCollisionPlanes.size());
- PX_ASSERT(convexes.empty() || convexes.size() == dxCloth.mConvexMasks.size());
- PX_ASSERT(triangles.empty() || triangles.size() == dxCloth.mStartCollisionTriangles.size());
+ NV_CLOTH_ASSERT(spheres.empty() || spheres.size() == dxCloth.mStartCollisionSpheres.size());
+ NV_CLOTH_ASSERT(capsules.empty() || capsules.size() == dxCloth.mCapsuleIndices.size() * 2);
+ NV_CLOTH_ASSERT(planes.empty() || planes.size() == dxCloth.mStartCollisionPlanes.size());
+ NV_CLOTH_ASSERT(convexes.empty() || convexes.size() == dxCloth.mConvexMasks.size());
+ NV_CLOTH_ASSERT(triangles.empty() || triangles.size() == dxCloth.mStartCollisionTriangles.size());
// collision spheres are in pinned memory, so memcpy directly
if (!dxCloth.mStartCollisionSpheres.empty() && !spheres.empty())
@@ -296,13 +296,13 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
void cloth::DxFactory::extractMotionConstraints(const Cloth& cloth, Range<PxVec4> destConstraints) const
{
- PX_ASSERT(&cloth.getFactory() == this);
+ NV_CLOTH_ASSERT(&cloth.getFactory() == this);
const DxCloth& dxCloth = static_cast<const DxCloth&>(cloth);
if (dxCloth.mMotionConstraints.mHostCopy.size())
{
- PX_ASSERT(destConstraints.size() == dxCloth.mMotionConstraints.mHostCopy.size());
+ NV_CLOTH_ASSERT(destConstraints.size() == dxCloth.mMotionConstraints.mHostCopy.size());
memcpy(destConstraints.begin(), dxCloth.mMotionConstraints.mHostCopy.begin(),
sizeof(PxVec4) * dxCloth.mMotionConstraints.mHostCopy.size());
@@ -315,20 +315,20 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
? dxCloth.mMotionConstraints.mTarget
: dxCloth.mMotionConstraints.mStart;
- PX_ASSERT(destConstraints.size() == srcConstraints.size());
+ NV_CLOTH_ASSERT(destConstraints.size() == srcConstraints.size());
copyToHost(destConstraints.begin(), srcConstraints.buffer(), 0, destConstraints.size() * sizeof(PxVec4));
}
}
void cloth::DxFactory::extractSeparationConstraints(const Cloth& cloth, Range<PxVec4> destConstraints) const
{
- PX_ASSERT(&cloth.getFactory() == this);
+ NV_CLOTH_ASSERT(&cloth.getFactory() == this);
const DxCloth& dxCloth = static_cast<const DxCloth&>(cloth);
if (dxCloth.mSeparationConstraints.mHostCopy.size())
{
- PX_ASSERT(destConstraints.size() == dxCloth.mSeparationConstraints.mHostCopy.size());
+ NV_CLOTH_ASSERT(destConstraints.size() == dxCloth.mSeparationConstraints.mHostCopy.size());
memcpy(destConstraints.begin(), dxCloth.mSeparationConstraints.mHostCopy.begin(),
sizeof(PxVec4) * dxCloth.mSeparationConstraints.mHostCopy.size());
@@ -341,7 +341,7 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
? dxCloth.mSeparationConstraints.mTarget
: dxCloth.mSeparationConstraints.mStart;
- PX_ASSERT(destConstraints.size() == srcConstraints.size());
+ NV_CLOTH_ASSERT(destConstraints.size() == srcConstraints.size());
copyToHost(destConstraints.begin(), srcConstraints.buffer(), 0, destConstraints.size() * sizeof(PxVec4));
}
@@ -350,12 +350,12 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
void cloth::DxFactory::extractParticleAccelerations(const Cloth& cloth, Range<PxVec4> destAccelerations) const
{
/*
- PX_ASSERT(&cloth.getFactory() == this);
+ NV_CLOTH_ASSERT(&cloth.getFactory() == this);
const DxCloth& dxCloth = static_cast<const DxClothImpl&>(cloth).mCloth;
if (dxCloth.mParticleAccelerationsHostCopy.size())
{
- PX_ASSERT(dxCloth.mParticleAccelerationsHostCopy.size());
+ NV_CLOTH_ASSERT(dxCloth.mParticleAccelerationsHostCopy.size());
memcpy(destAccelerations.begin(), dxCloth.mParticleAccelerationsHostCopy.begin(),
sizeof(PxVec4) * dxCloth.mParticleAccelerationsHostCopy.size());
@@ -366,20 +366,20 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
DxBatchedVector<PxVec4> const& srcAccelerations = dxCloth.mParticleAccelerations;
- PX_ASSERT(destAccelerations.size() == srcAccelerations.size());
+ NV_CLOTH_ASSERT(destAccelerations.size() == srcAccelerations.size());
copyToHost(destAccelerations.begin(), srcAccelerations.buffer(), 0, destAccelerations.size() * sizeof(PxVec4));
}
*/
PX_UNUSED(&cloth);
PX_UNUSED(&destAccelerations);
- PX_ASSERT(0);
+ NV_CLOTH_ASSERT(0);
}
void cloth::DxFactory::extractVirtualParticles(const Cloth& cloth, Range<uint32_t[4]> destIndices,
Range<PxVec3> destWeights) const
{
- PX_ASSERT(&cloth.getFactory() == this);
+ NV_CLOTH_ASSERT(&cloth.getFactory() == this);
DxContextLock contextLock(*this);
@@ -400,7 +400,7 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
for (; srcIt != srcEnd; ++srcIt, ++destIt)
*destIt = reinterpret_cast<const PxVec3&>(*srcIt);
- PX_ASSERT(destIt <= destWeights.end());
+ NV_CLOTH_ASSERT(destIt <= destWeights.end());
}
if (destIndices.size() > 0)
@@ -418,14 +418,14 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
for (; srcIt != srcEnd; ++srcIt, ++destIt)
*destIt = Vec4u(*srcIt);
- PX_ASSERT(&array(*destIt) <= destIndices.end());
+ NV_CLOTH_ASSERT(&array(*destIt) <= destIndices.end());
}
}
void cloth::DxFactory::extractSelfCollisionIndices(const Cloth& cloth, Range<uint32_t> destIndices) const
{
const DxCloth& dxCloth = static_cast<const DxCloth&>(cloth);
- PX_ASSERT(destIndices.size() == dxCloth.mSelfCollisionIndices.size());
+ NV_CLOTH_ASSERT(destIndices.size() == dxCloth.mSelfCollisionIndices.size());
intrinsics::memCopy(destIndices.begin(), dxCloth.mSelfCollisionIndicesHost.begin(),
destIndices.size() * sizeof(uint32_t));
}
@@ -433,7 +433,7 @@ void cloth::DxFactory::extractFabricData(const Fabric& fabric, Range<uint32_t> p
void cloth::DxFactory::extractRestPositions(const Cloth& cloth, Range<PxVec4> destRestPositions) const
{
const DxCloth& dxCloth = static_cast<const DxCloth&>(cloth);
- PX_ASSERT(destRestPositions.size() == dxCloth.mRestPositions.size());
+ NV_CLOTH_ASSERT(destRestPositions.size() == dxCloth.mRestPositions.size());
intrinsics::memCopy(destRestPositions.begin(), DxCloth::MappedVec4fVectorType(const_cast<DxCloth&>(dxCloth).mRestPositions).begin(),
destRestPositions.size() * sizeof(PxVec4));
}
diff --git a/NvCloth/src/dx/DxSolver.cpp b/NvCloth/src/dx/DxSolver.cpp
index ab030d5..66a8d8f 100644
--- a/NvCloth/src/dx/DxSolver.cpp
+++ b/NvCloth/src/dx/DxSolver.cpp
@@ -113,26 +113,9 @@ struct ClothSimCostGreater
void cloth::DxSolver::addCloth(Cloth* cloth)
{
- DxCloth& dxCloth = static_cast<DxCloth&>(*cloth);
-
- NV_CLOTH_ASSERT(mCloths.find(&dxCloth) == mCloths.end());
-
- mCloths.pushBack(&dxCloth);
- // trigger update of mClothData array
- dxCloth.notifyChanged();
-
- // sort cloth instances by size
- shdfnd::sort(mCloths.begin(), mCloths.size(), ClothSimCostGreater(), NonTrackingAllocator());
-
- DxContextLock contextLock(mFactory);
-
- // resize containers and update kernel data
- mClothDataHostCopy.resize(mCloths.size());
- mClothData.resize(mCloths.size());
- mFrameDataHostCopy.resize(mCloths.size());
-
- // lazy compilation of compute shader
- mComputeError |= mFactory.mSolverKernelComputeShader == nullptr;
+ addClothAppend(cloth);
+ addClothUpdateData();
+
#if 0
if (!mSortComputeShader && !mComputeError)
{
@@ -197,7 +180,7 @@ void cloth::DxSolver::addCloth(Cloth* cloth)
{
uint32_t key = sortElems[i] & ~0xffff;
uint32_t keyRef = _SortElemsRef[i] & ~0xffff;
- PX_ASSERT(key == keyRef);
+ NV_CLOTH_ASSERT(key == keyRef);
}
_SortElemsHostCopy.unmap();
}
@@ -208,6 +191,15 @@ void cloth::DxSolver::addCloth(Cloth* cloth)
#endif
}
+void cloth::DxSolver::addCloths(Range<Cloth*> cloths)
+{
+ for (uint32_t i = 0; i < cloths.size(); ++i)
+ {
+ addClothAppend(*(cloths.begin() + i));
+ }
+ addClothUpdateData();
+}
+
void cloth::DxSolver::removeCloth(Cloth* cloth)
{
DxCloth& dxCloth = static_cast<DxCloth&>(*cloth);
@@ -232,10 +224,9 @@ int cloth::DxSolver::getNumCloths() const
}
cloth::Cloth * const * cloth::DxSolver::getClothList() const
{
- if(getNumCloths())
+ if (getNumCloths() != 0)
return reinterpret_cast<Cloth* const*>(&mCloths[0]);
- else
- return nullptr;
+ return nullptr;
}
bool cloth::DxSolver::beginSimulation(float dt)
@@ -260,7 +251,34 @@ void cloth::DxSolver::endSimulation()
}
int cloth::DxSolver::getSimulationChunkCount() const
{
- return 1;
+ // 0 chunks when no cloth present in the solver, 1 otherwise
+ return getNumCloths() != 0;
+}
+
+void cloth::DxSolver::addClothAppend(Cloth* cloth)
+{
+ DxCloth& dxCloth = static_cast<DxCloth&>(*cloth);
+ NV_CLOTH_ASSERT(mCloths.find(&dxCloth) == mCloths.end());
+
+ mCloths.pushBack(&dxCloth);
+ // trigger update of mClothData array
+ dxCloth.notifyChanged();
+}
+
+void cloth::DxSolver::addClothUpdateData()
+{
+ // sort cloth instances by size
+ shdfnd::sort(mCloths.begin(), mCloths.size(), ClothSimCostGreater(), NonTrackingAllocator());
+
+ DxContextLock contextLock(mFactory);
+
+ // resize containers and update kernel data
+ mClothDataHostCopy.resize(mCloths.size());
+ mClothData.resize(mCloths.size());
+ mFrameDataHostCopy.resize(mCloths.size());
+
+ // lazy compilation of compute shader
+ mComputeError |= mFactory.mSolverKernelComputeShader == nullptr;
}
void cloth::DxSolver::beginFrame()
diff --git a/NvCloth/src/dx/DxSolver.h b/NvCloth/src/dx/DxSolver.h
index 09f523a..07d77dc 100644
--- a/NvCloth/src/dx/DxSolver.h
+++ b/NvCloth/src/dx/DxSolver.h
@@ -56,6 +56,7 @@ class DxSolver : private DxContextLock, public Solver
~DxSolver();
virtual void addCloth(Cloth*) override;
+ virtual void addCloths(Range<Cloth*> cloths) override;
virtual void removeCloth(Cloth*) override;
virtual int getNumCloths() const override;
virtual Cloth * const * getClothList() const override;
@@ -101,6 +102,10 @@ class DxSolver : private DxContextLock, public Solver
}
private:
+ // add cloth helper functions
+ void addClothAppend(Cloth* cloth);
+ void addClothUpdateData();
+
// simulate helper functions
void beginFrame();
void executeKernel();
diff --git a/NvCloth/src/neon/NeonSolverKernel.cpp b/NvCloth/src/neon/NeonSolverKernel.cpp
index 4d6de68..3e16b6f 100644
--- a/NvCloth/src/neon/NeonSolverKernel.cpp
+++ b/NvCloth/src/neon/NeonSolverKernel.cpp
@@ -35,15 +35,19 @@
#include <cpu-features.h>
-namespace physx
+namespace
+{
+ const bool sNeonSupport = ANDROID_CPU_ARM_FEATURE_NEON & android_getCpuFeatures();
+}
+
+namespace nv
{
namespace cloth
{
bool neonSolverKernel(SwCloth const& cloth, SwClothData& data, SwKernelAllocator& allocator,
- IterationStateFactory& factory, PxProfileZone* profileZone)
+ IterationStateFactory& factory)
{
- return ANDROID_CPU_ARM_FEATURE_NEON & android_getCpuFeatures() &&
- (SwSolverKernel<Simd4f>(cloth, data, allocator, factory, profileZone)(), true);
+ return sNeonSupport && (SwSolverKernel<Simd4f>(cloth, data, allocator, factory)(), true);
}
}
}
diff --git a/NvCloth/src/scalar/SwCollisionHelpers.h b/NvCloth/src/scalar/SwCollisionHelpers.h
index af21812..3ab756f 100644
--- a/NvCloth/src/scalar/SwCollisionHelpers.h
+++ b/NvCloth/src/scalar/SwCollisionHelpers.h
@@ -29,6 +29,8 @@
#pragma once
+#include "PsMathUtils.h"
+
namespace nv
{
namespace cloth
@@ -46,6 +48,7 @@ uint32_t findBitSet(uint32_t mask)
inline Scalar4i intFloor(const Scalar4f& v)
{
+ using physx::shdfnd::floor;
return Scalar4i(int(floor(v.f4[0])), int(floor(v.f4[1])), int(floor(v.f4[2])), int(floor(v.f4[3])));
}
diff --git a/NvCloth/src/sse2/SwCollisionHelpers.h b/NvCloth/src/sse2/SwCollisionHelpers.h
index c80ba1d..b759868 100644
--- a/NvCloth/src/sse2/SwCollisionHelpers.h
+++ b/NvCloth/src/sse2/SwCollisionHelpers.h
@@ -63,12 +63,15 @@ Simd4i intFloor(const Simd4f& v)
{
Simd4i i = _mm_cvttps_epi32(v);
return _mm_sub_epi32(i, _mm_srli_epi32(simd4i(v), 31));
+ //Simd4i i = truncate(v);
+ //return i - (simd4i(v) >> 31);
}
Simd4i horizontalOr(const Simd4i& mask)
{
Simd4i tmp = mask | _mm_shuffle_epi32(mask, 0xb1); // w z y x -> z w x y
return tmp | _mm_shuffle_epi32(tmp, 0x4e); // w z y x -> y x w z
+// return splat<0>(mask) | splat<1>(mask) | splat<2>(mask) | splat<3>(mask);
}
Gather<Simd4i>::Gather(const Simd4i& index)
diff --git a/PxShared/include/foundation/PxFoundation.h b/PxShared/include/foundation/PxFoundation.h
index 8642c16..aae84a9 100644
--- a/PxShared/include/foundation/PxFoundation.h
+++ b/PxShared/include/foundation/PxFoundation.h
@@ -126,7 +126,18 @@ PxCreateFoundation(physx::PxU32 version, physx::PxAllocatorCallback& allocator,
@see PxCreateFoundation()
*/
+#if PX_CLANG
+#if PX_LINUX
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wreturn-type-c-linkage"
+#endif // PX_LINUX
+#endif // PX_CLANG
PX_C_EXPORT PX_FOUNDATION_API physx::PxFoundation& PX_CALL_CONV PxGetFoundation();
+#if PX_CLANG
+#if PX_LINUX
+ #pragma clang diagnostic pop
+#endif // PX_LINUX
+#endif // PX_CLANG
namespace physx
{
diff --git a/PxShared/include/foundation/PxMemory.h b/PxShared/include/foundation/PxMemory.h
index b0191e3..6a8a6ed 100644
--- a/PxShared/include/foundation/PxMemory.h
+++ b/PxShared/include/foundation/PxMemory.h
@@ -81,7 +81,7 @@ PX_FORCE_INLINE void* PxMemSet(void* dest, PxI32 c, PxU32 count)
\return Pointer to destination memory block
*/
-PX_FORCE_INLINE void* PxMemCopy(void* PX_RESTRICT dest, const void* PX_RESTRICT src, PxU32 count)
+PX_FORCE_INLINE void* PxMemCopy(void* dest, const void* src, PxU32 count)
{
return physx::intrinsics::memCopy(dest, src, count);
}
diff --git a/PxShared/include/foundation/PxPreprocessor.h b/PxShared/include/foundation/PxPreprocessor.h
index 9b6e0f4..ddbf258 100644
--- a/PxShared/include/foundation/PxPreprocessor.h
+++ b/PxShared/include/foundation/PxPreprocessor.h
@@ -47,7 +47,9 @@ All definitions have a value of 1 or 0, use '#if' instead of '#ifdef'.
Compiler defines, see http://sourceforge.net/p/predef/wiki/Compilers/
*/
#if defined(_MSC_VER)
-#if _MSC_VER >= 1900
+#if _MSC_VER >= 1910
+#define PX_VC 15
+#elif _MSC_VER >= 1900
#define PX_VC 14
#elif _MSC_VER >= 1800
#define PX_VC 12
@@ -488,7 +490,8 @@ struct PxPackValidation
long long a;
};
#endif
-#if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN
+// clang (as of version 3.9) cannot align doubles on 8 byte boundary when compiling for Intel 32 bit target
+#if !PX_APPLE_FAMILY && !PX_EMSCRIPTEN && !(PX_CLANG && PX_X86)
PX_COMPILE_TIME_ASSERT(PX_OFFSET_OF(PxPackValidation, a) == 8);
#endif
diff --git a/PxShared/include/foundation/PxSimpleTypes.h b/PxShared/include/foundation/PxSimpleTypes.h
index 6ecba13..655fbb3 100644
--- a/PxShared/include/foundation/PxSimpleTypes.h
+++ b/PxShared/include/foundation/PxSimpleTypes.h
@@ -56,7 +56,7 @@
#if PX_VC // we could use inttypes.h starting with VC12
#define PX_PRIu64 "I64u"
#else
-#if !PX_PS4 && !PX_APPLE_FAMILY
+#if !PX_PS4 && !PX_APPLE_FAMILY && !PX_SWITCH
#define __STDC_FORMAT_MACROS
#endif
#include <inttypes.h>
diff --git a/PxShared/include/foundation/unix/PxUnixIntrinsics.h b/PxShared/include/foundation/unix/PxUnixIntrinsics.h
index 351c83c..5f492bc 100644
--- a/PxShared/include/foundation/unix/PxUnixIntrinsics.h
+++ b/PxShared/include/foundation/unix/PxUnixIntrinsics.h
@@ -37,11 +37,12 @@
#error "This file should only be included by Unix builds!!"
#endif
-#if PX_LINUX && !defined(__CUDACC__)
- // Linux and CUDA compilation does not work with std::isfnite, as it is not marked as CUDA callable
- #ifndef isfinite
- #define isfinite std::isfinite
- #endif
+#if (PX_LINUX || PX_ANDROID) && !defined(__CUDACC__) && !PX_EMSCRIPTEN
+ // Linux/android and CUDA compilation does not work with std::isfnite, as it is not marked as CUDA callable
+ #include <cmath>
+ #ifndef isfinite
+ using std::isfinite;
+ #endif
#endif
#include <math.h>
@@ -125,7 +126,10 @@ PX_CUDA_CALLABLE PX_FORCE_INLINE float selectMax(float a, float b)
//! \brief platform-specific finiteness check (not INF or NAN)
PX_CUDA_CALLABLE PX_FORCE_INLINE bool isFinite(float a)
{
- return !!isfinite(a);
+ //std::isfinite not recommended as of Feb 2017, since it doesn't work with g++/clang's floating point optimization.
+ union localU { PxU32 i; float f; } floatUnion;
+ floatUnion.f = a;
+ return !((floatUnion.i & 0x7fffffff) >= 0x7f800000);
}
//! \brief platform-specific finiteness check (not INF or NAN)
@@ -153,7 +157,7 @@ PX_FORCE_INLINE void* memSet(void* dest, int32_t c, uint32_t count)
/*!
Copies \c count bytes from \c src to \c dst. User memMove if regions overlap.
*/
-PX_FORCE_INLINE void* memCopy(void* PX_RESTRICT dest, const void* PX_RESTRICT src, uint32_t count)
+PX_FORCE_INLINE void* memCopy(void* dest, const void* src, uint32_t count)
{
return memcpy(dest, src, count);
}
diff --git a/PxShared/include/foundation/windows/PxWindowsIntrinsics.h b/PxShared/include/foundation/windows/PxWindowsIntrinsics.h
index 766558e..3cc63b5 100644
--- a/PxShared/include/foundation/windows/PxWindowsIntrinsics.h
+++ b/PxShared/include/foundation/windows/PxWindowsIntrinsics.h
@@ -158,7 +158,7 @@ PX_FORCE_INLINE void* memSet(void* dest, int32_t c, uint32_t count)
/*!
Copies \c count bytes from \c src to \c dst. User memMove if regions overlap.
*/
-PX_FORCE_INLINE void* memCopy(void* PX_RESTRICT dest, const void* PX_RESTRICT src, uint32_t count)
+PX_FORCE_INLINE void* memCopy(void* dest, const void* src, uint32_t count)
{
return memcpy(dest, src, count);
}
diff --git a/PxShared/src/compiler/cmake/Android/CMakeLists.txt b/PxShared/src/compiler/cmake/Android/CMakeLists.txt
index 9aa00f9..08757c1 100644
--- a/PxShared/src/compiler/cmake/Android/CMakeLists.txt
+++ b/PxShared/src/compiler/cmake/Android/CMakeLists.txt
@@ -31,7 +31,7 @@ SET(CMAKE_CXX_FLAGS_CHECKED "-O3")
SET(CMAKE_CXX_FLAGS_PROFILE "-O3")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
-SET(PXSHARED_ANDROID_COMPILE_DEFS _LIB;__STDC_LIMIT_MACROS;)
+SET(PXSHARED_ANDROID_COMPILE_DEFS ANDROID;_LIB;__STDC_LIMIT_MACROS;)
SET(PXSHARED_ANDROID_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1)
SET(PXSHARED_ANDROID_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1)
SET(PXSHARED_ANDROID_PROFILE_COMPILE_DEFS NDEBUG;PX_PROFILE=1)
diff --git a/PxShared/src/compiler/cmake/Android/PsFastXml.cmake b/PxShared/src/compiler/cmake/Android/PsFastXml.cmake
index 81d356e..f5dce60 100644
--- a/PxShared/src/compiler/cmake/Android/PsFastXml.cmake
+++ b/PxShared/src/compiler/cmake/Android/PsFastXml.cmake
@@ -10,28 +10,12 @@ SET(LL_SOURCE_DIR ${PXSHARED_SOURCE_DIR}/fastxml)
SET(PSFASTXML_COMPILE_DEFS
# Common to all configurations
${PXSHARED_ANDROID_COMPILE_DEFS};PX_FOUNDATION_DLL=0;PxShared_STATIC_LIB;
-)
-
-if(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- LIST(APPEND PSFASTXML_COMPILE_DEFS
- ${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "checked")
- LIST(APPEND PSFASTXML_COMPILE_DEFS
- ${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "profile")
- LIST(APPEND PSFASTXML_COMPILE_DEFS
- ${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL release)
- LIST(APPEND PSFASTXML_COMPILE_DEFS
- ${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS}
- )
-else(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- MESSAGE(FATAL_ERROR "Unknown configuration ${CMAKE_BUILD_TYPE}")
-endif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
+ $<$<CONFIG:debug>:${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS};>
+ $<$<CONFIG:checked>:${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS};>
+ $<$<CONFIG:profile>:${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS};>
+ $<$<CONFIG:release>:${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS};>
+)
# include PsFastXml common
INCLUDE(../common/PsFastXml.cmake)
diff --git a/PxShared/src/compiler/cmake/Android/PxFoundation.cmake b/PxShared/src/compiler/cmake/Android/PxFoundation.cmake
index c23a327..d069e41 100644
--- a/PxShared/src/compiler/cmake/Android/PxFoundation.cmake
+++ b/PxShared/src/compiler/cmake/Android/PxFoundation.cmake
@@ -30,28 +30,12 @@ SET(PXFOUNDATION_PLATFORM_INCLUDES
SET(PXFOUNDATION_COMPILE_DEFS
# Common to all configurations
${PXSHARED_ANDROID_COMPILE_DEFS};PxShared_STATIC_LIB;
-)
-
-if(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- LIST(APPEND PXFOUNDATION_COMPILE_DEFS
- ${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "checked")
- LIST(APPEND PXFOUNDATION_COMPILE_DEFS
- ${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "profile")
- LIST(APPEND PXFOUNDATION_COMPILE_DEFS
- ${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL release)
- LIST(APPEND PXFOUNDATION_COMPILE_DEFS
- ${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS}
- )
-else(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- MESSAGE(FATAL_ERROR "Unknown configuration ${CMAKE_BUILD_TYPE}")
-endif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
+ $<$<CONFIG:debug>:${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS};>
+ $<$<CONFIG:checked>:${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS};>
+ $<$<CONFIG:profile>:${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS};>
+ $<$<CONFIG:release>:${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS};>
+)
# include PxFoundation common
INCLUDE(../common/PxFoundation.cmake)
diff --git a/PxShared/src/compiler/cmake/Android/PxPvdSDK.cmake b/PxShared/src/compiler/cmake/Android/PxPvdSDK.cmake
index f517efc..ea39cdb 100644
--- a/PxShared/src/compiler/cmake/Android/PxPvdSDK.cmake
+++ b/PxShared/src/compiler/cmake/Android/PxPvdSDK.cmake
@@ -12,27 +12,12 @@ SET(PXPVDSDK_LIBTYPE STATIC)
SET(PXPVDSDK_COMPILE_DEFS
# Common to all configurations
${PXSHARED_ANDROID_COMPILE_DEFS};PxShared_STATIC_LIB;
-)
-if(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- LIST(APPEND PXPVDSDK_COMPILE_DEFS
- ${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "checked")
- LIST(APPEND PXPVDSDK_COMPILE_DEFS
- ${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "profile")
- LIST(APPEND PXPVDSDK_COMPILE_DEFS
- ${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL release)
- LIST(APPEND PXPVDSDK_COMPILE_DEFS
- ${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS}
- )
-else(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- MESSAGE(FATAL_ERROR "Unknown configuration ${CMAKE_BUILD_TYPE}")
-endif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
+ $<$<CONFIG:debug>:${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS};>
+ $<$<CONFIG:checked>:${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS};>
+ $<$<CONFIG:profile>:${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS};>
+ $<$<CONFIG:release>:${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS};>
+)
# include PxPvdSDK common
INCLUDE(../common/PxPvdSDK.cmake)
diff --git a/PxShared/src/compiler/cmake/Android/PxTask.cmake b/PxShared/src/compiler/cmake/Android/PxTask.cmake
index e02aefd..eabe075 100644
--- a/PxShared/src/compiler/cmake/Android/PxTask.cmake
+++ b/PxShared/src/compiler/cmake/Android/PxTask.cmake
@@ -8,27 +8,12 @@ SET(LL_SOURCE_DIR ${PXSHARED_SOURCE_DIR}/task)
SET(PXTASK_COMPILE_DEFS
${PXSHARED_ANDROID_COMPILE_DEFS};PxShared_STATIC_LIB;
-)
-if(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- LIST(APPEND PXTASK_COMPILE_DEFS
- ${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "checked")
- LIST(APPEND PXTASK_COMPILE_DEFS
- ${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "profile")
- LIST(APPEND PXTASK_COMPILE_DEFS
- ${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS}
- )
-elseif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL release)
- LIST(APPEND PXTASK_COMPILE_DEFS
- ${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS}
- )
-else(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
- MESSAGE(FATAL_ERROR "Unknown configuration ${CMAKE_BUILD_TYPE}")
-endif(${CMAKE_BUILD_TYPE_LOWERCASE} STREQUAL "debug")
+ $<$<CONFIG:debug>:${PXSHARED_ANDROID_DEBUG_COMPILE_DEFS};>
+ $<$<CONFIG:checked>:${PXSHARED_ANDROID_CHECKED_COMPILE_DEFS};>
+ $<$<CONFIG:profile>:${PXSHARED_ANDROID_PROFILE_COMPILE_DEFS};>
+ $<$<CONFIG:release>:${PXSHARED_ANDROID_RELEASE_COMPILE_DEFS};>
+)
SET(PXTASK_LIBTYPE OBJECT)
diff --git a/PxShared/src/compiler/cmake/IOS/CMakeLists.txt b/PxShared/src/compiler/cmake/IOS/CMakeLists.txt
index 4e2f814..7b05731 100644
--- a/PxShared/src/compiler/cmake/IOS/CMakeLists.txt
+++ b/PxShared/src/compiler/cmake/IOS/CMakeLists.txt
@@ -13,7 +13,7 @@ IF (NOT ${TARGET_BUILD_PLATFORM} IN_LIST PLATFORM_LIST)
MESSAGE(FATAL_ERROR "Invalid platform:" ${TARGET_BUILD_PLATFORM})
ENDIF()
-SET(CMAKE_CXX_FLAGS "-std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-invalid-offsetof -gdwarf-2")
SET(CMAKE_SHARED_LINKER_FLAGS "")
@@ -22,43 +22,6 @@ SET(CMAKE_CXX_FLAGS_CHECKED "-O3 -g")
SET(CMAKE_CXX_FLAGS_PROFILE "-O3 -g")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3 -g")
-SET(CMAKE_OSX_DEPLOYMENT_TARGET "")
-
-SET(CMAKE_OSX_ARCHITECTURES "armv7 armv7s arm64")
-
-SET(IOS_PLATFORM_LOCATION "iPhoneOS.platform")
-
-# Setup iOS developer location unless specified manually with CMAKE_IOS_DEVELOPER_ROOT
-EXEC_PROGRAM(/usr/bin/xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR)
-SET(XCODE_ROOT "${CMAKE_XCODE_DEVELOPER_DIR}/Platforms/${IOS_PLATFORM_LOCATION}/Developer")
-IF(NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
- IF(EXISTS ${XCODE_ROOT})
- SET(CMAKE_IOS_DEVELOPER_ROOT ${XCODE_ROOT})
- ENDIF(EXISTS ${XCODE_ROOT})
-ENDIF(NOT DEFINED CMAKE_IOS_DEVELOPER_ROOT)
-SET(CMAKE_IOS_DEVELOPER_ROOT ${CMAKE_IOS_DEVELOPER_ROOT} CACHE PATH "Location of iOS Platform")
-
-# Find and use the most recent iOS sdk unless specified manually with CMAKE_IOS_SDK_ROOT
-IF(NOT DEFINED CMAKE_IOS_SDK_ROOT)
- FILE(GLOB _CMAKE_IOS_SDKS "${CMAKE_IOS_DEVELOPER_ROOT}/SDKs/*")
- IF(_CMAKE_IOS_SDKS)
- LIST(SORT _CMAKE_IOS_SDKS)
- LIST(REVERSE _CMAKE_IOS_SDKS)
- LIST(GET _CMAKE_IOS_SDKS 0 CMAKE_IOS_SDK_ROOT)
- ELSE(_CMAKE_IOS_SDKS)
- MESSAGE(FATAL_ERROR "No iOS SDK's found in default search path ${CMAKE_IOS_DEVELOPER_ROOT}. Manually set CMAKE_IOS_SDK_ROOT or install the iOS SDK.")
- ENDIF(_CMAKE_IOS_SDKS)
- MESSAGE(STATUS "Toolchain using default iOS SDK: ${CMAKE_IOS_SDK_ROOT}")
-ENDIF(NOT DEFINED CMAKE_IOS_SDK_ROOT)
-SET(CMAKE_IOS_SDK_ROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Location of the selected iOS SDK")
-
-# Set the sysroot default to the most recent SDK
-SET(CMAKE_OSX_SYSROOT ${CMAKE_IOS_SDK_ROOT} CACHE PATH "Sysroot used for iOS support")
-
-SET(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "iphoneos")
-SET(CMAKE_XCODE_ATTRIBUTE_SDKROOT ${CMAKE_IOS_SDK_ROOT})
-SET(CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET "7.0")
-
SET(PXSHARED_IOS_COMPILE_DEFS _LIB;DISABLE_CUDA_PHYSX;DISABLE_COMPUTE_PHYSX)
SET(PXSHARED_IOS_DEBUG_COMPILE_DEFS _DEBUG;PX_DEBUG=1;PX_CHECKED=1)
SET(PXSHARED_IOS_CHECKED_COMPILE_DEFS NDEBUG;PX_CHECKED=1)
diff --git a/PxShared/src/compiler/cmake/Linux/CMakeLists.txt b/PxShared/src/compiler/cmake/Linux/CMakeLists.txt
index ea25a8b..543a7b1 100644
--- a/PxShared/src/compiler/cmake/Linux/CMakeLists.txt
+++ b/PxShared/src/compiler/cmake/Linux/CMakeLists.txt
@@ -17,16 +17,18 @@ ENDIF()
IF (${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-unknown-linux-gnu" OR ${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-linux-gnu")
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-func-template -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-undefined-reinterpret-cast -Wno-disabled-macro-expansion")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-func-template -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-undefined-reinterpret-cast -Wno-disabled-macro-expansion -Wno-return-type-c-linkage")
ELSEIF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC
SET(LIBPATH_SUFFIX "x64")
- SET(CMAKE_CXX_FLAGS "-Werror -m64 -fPIC -msse2 -mfpmath=sse -ffast-math -fno-exceptions -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-strict-aliasing -fdiagnostics-show-option -Wno-invalid-offsetof -Wno-uninitialized -Wno-missing-field-initializers")
+ SET(CMAKE_CXX_FLAGS "-Werror -m64 -fPIC -msse2 -mfpmath=sse -fno-exceptions -fno-rtti -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fno-strict-aliasing -fdiagnostics-show-option -Wno-invalid-offsetof -Wno-uninitialized -Wno-missing-field-initializers")
ENDIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
ELSEIF(${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "arm-unknown-linux-gnueabihf")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -mfpu=neon -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-old-style-cast -Wno-return-type-c-linkage -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-disabled-macro-expansion")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -mfpu=neon -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-old-style-cast -Wno-return-type-c-linkage -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-disabled-macro-expansion -Wno-return-type-c-linkage")
ELSEIF(${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "aarch64-unknown-linux-gnueabi")
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffast-math -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-old-style-cast -Wno-return-type-c-linkage -Wno-format-nonliteral -Wno-unused-local-typedef -Wno-implicit-fallthrough -Wno-disabled-macro-expansion")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-old-style-cast -Wno-return-type-c-linkage -Wno-format-nonliteral -Wno-unused-local-typedef -Wno-implicit-fallthrough -Wno-disabled-macro-expansion -Wno-return-type-c-linkage")
+ELSEIF(${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "i686-unknown-linux-gnu")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Xclang -malign-double -fpack-struct=16 -fno-rtti -fno-exceptions -ffunction-sections -fdata-sections -Werror -ferror-limit=0 -Wall -Wextra -fstrict-aliasing -Wstrict-aliasing=2 -Weverything -Wno-documentation-deprecated-sync -Wno-documentation-unknown-command -Wno-float-equal -Wno-padded -Wno-weak-vtables -Wno-cast-align -Wno-conversion -Wno-missing-noreturn -Wno-missing-variable-declarations -Wno-shift-sign-overflow -Wno-covered-switch-default -Wno-exit-time-destructors -Wno-global-constructors -Wno-missing-prototypes -Wno-unreachable-code -Wno-unused-macros -Wno-unused-member-function -Wno-used-but-marked-unused -Wno-weak-template-vtables -Wno-deprecated -Wno-non-virtual-dtor -Wno-invalid-noreturn -Wno-return-type-c-linkage -Wno-reserved-id-macro -Wno-c++98-compat-pedantic -Wno-unused-local-typedef -Wno-old-style-cast -Wno-newline-eof -Wno-unused-private-field -Wno-undefined-reinterpret-cast -Wno-undefined-func-template -Wno-double-promotion -Wno-return-type-c-linkage")
ELSE(${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-unknown-linux-gnu" OR ${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-linux-gnu")
MESSAGE(FATAL_ERROR "Unknown CMAKE_LIBRARY_ARCHITECTURE ${CMAKE_LIBRARY_ARCHITECTURE}")
ENDIF(${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-unknown-linux-gnu" OR ${CMAKE_LIBRARY_ARCHITECTURE} STREQUAL "x86_64-linux-gnu")
diff --git a/PxShared/src/foundation/include/PsArray.h b/PxShared/src/foundation/include/PsArray.h
index 8433fbe..2121c30 100644
--- a/PxShared/src/foundation/include/PsArray.h
+++ b/PxShared/src/foundation/include/PsArray.h
@@ -35,17 +35,6 @@
#include "PsAllocator.h"
#include "PsBasicTemplates.h"
-#if PX_LIBCPP
-#include <type_traits>
-#else
-#include <tr1/type_traits>
-#endif
-
-#if PX_VC == 9 || PX_VC == 10
-#pragma warning(push)
-#pragma warning(disable : 4347) // behavior change: 'function template' is called instead of 'function'
-#endif
-
namespace physx
{
namespace shdfnd
@@ -158,15 +147,6 @@ class Array : protected Alloc
return operator=<Alloc>(t);
}
- PX_FORCE_INLINE static bool isArrayOfPOD()
- {
-#if PX_LIBCPP
- return std::is_trivially_copyable<T>::value;
-#else
- return std::tr1::is_pod<T>::value;
-#endif
- }
-
/*!
Array indexing operator.
\param i
@@ -338,14 +318,7 @@ class Array : protected Alloc
PX_ASSERT(mSize);
T t = mData[mSize - 1];
- if(!isArrayOfPOD())
- {
- mData[--mSize].~T();
- }
- else
- {
- --mSize;
- }
+ mData[--mSize].~T();
return t;
}
@@ -379,10 +352,7 @@ class Array : protected Alloc
PX_ASSERT(i < mSize);
mData[i] = mData[--mSize];
- if(!isArrayOfPOD())
- {
- mData[mSize].~T();
- }
+ mData[mSize].~T();
}
PX_INLINE void replaceWithLast(Iterator i)
@@ -424,24 +394,14 @@ class Array : protected Alloc
{
PX_ASSERT(i < mSize);
- if(isArrayOfPOD())
- {
- if(i + 1 != mSize)
- {
- physx::intrinsics::memMove(mData + i, mData + i + 1, (mSize - i - 1) * sizeof(T));
- }
- }
- else
- {
- T* it = mData + i;
+ T* it = mData + i;
+ it->~T();
+ while (++i < mSize)
+ {
+ new (it) T(mData[i]);
+ ++it;
it->~T();
- while (++i < mSize)
- {
- new (it) T(mData[i]);
- ++it;
- it->~T();
- }
- }
+ }
--mSize;
}
@@ -460,31 +420,19 @@ class Array : protected Alloc
PX_ASSERT(begin < mSize);
PX_ASSERT((begin + count) <= mSize);
- if(!isArrayOfPOD())
- {
- for(uint32_t i = 0; i < count; i++)
- {
- mData[begin + i].~T(); // call the destructor on the ones being removed first.
- }
- }
+ for(uint32_t i = 0; i < count; i++)
+ mData[begin + i].~T(); // call the destructor on the ones being removed first.
T* dest = &mData[begin]; // location we are copying the tail end objects to
T* src = &mData[begin + count]; // start of tail objects
uint32_t move_count = mSize - (begin + count); // compute remainder that needs to be copied down
- if(isArrayOfPOD())
- {
- physx::intrinsics::memMove(dest, src, move_count * sizeof(T));
- }
- else
+ for(uint32_t i = 0; i < move_count; i++)
{
- for(uint32_t i = 0; i < move_count; i++)
- {
- new (dest) T(*src); // copy the old one to the new location
- src->~T(); // call the destructor on the old location
- dest++;
- src++;
- }
+ new (dest) T(*src); // copy the old one to the new location
+ src->~T(); // call the destructor on the old location
+ dest++;
+ src++;
}
mSize -= count;
}
@@ -624,29 +572,10 @@ definition for serialized classes is complete in checked builds.
Alloc::deallocate(mem);
}
- static PX_INLINE bool isZeroInit(const T& object)
- {
- if (!isArrayOfPOD())
- return false;
- char ZeroBuffOnStack[sizeof(object)] = {};
- // bgaldrikian - casting to void* to avoid compiler error:
- // error : first operand of this 'memcmp' call is a pointer to dynamic class [...]; vtable pointer will be compared [-Werror,-Wdynamic-class-memaccess]
- // even though POD check prevents memcmp from being used on a dynamic class
- return memcmp(reinterpret_cast<const void*>(&object), ZeroBuffOnStack, sizeof(object)) == 0;
- }
-
static PX_INLINE void create(T* first, T* last, const T& a)
{
- if(isZeroInit(a))
- {
- if(last > first)
- physx::intrinsics::memZero(first, uint32_t((last - first) * sizeof(T)));
- }
- else
- {
- for(; first < last; ++first)
- ::new (first) T(a);
- }
+ for(; first < last; ++first)
+ ::new (first) T(a);
}
static PX_INLINE void copy(T* first, T* last, const T* src)
@@ -654,24 +583,14 @@ definition for serialized classes is complete in checked builds.
if(last <= first)
return;
- if(isArrayOfPOD())
- {
- physx::intrinsics::memCopy(first, src, uint32_t((last - first) * sizeof(T)));
- }
- else
- {
- for(; first < last; ++first, ++src)
- ::new (first) T(*src);
- }
+ for(; first < last; ++first, ++src)
+ ::new (first) T(*src);
}
static PX_INLINE void destroy(T* first, T* last)
{
- if(!isArrayOfPOD())
- {
- for(; first < last; ++first)
- first->~T();
- }
+ for(; first < last; ++first)
+ first->~T();
}
/*!
@@ -799,8 +718,4 @@ PX_INLINE void swap(Array<T, Alloc>& x, Array<T, Alloc>& y)
} // namespace shdfnd
} // namespace physx
-#if PX_VC == 9 || PX_VC == 10
-#pragma warning(pop)
-#endif
-
#endif // #ifndef PSFOUNDATION_PSARRAY_H
diff --git a/PxShared/src/foundation/include/PsMathUtils.h b/PxShared/src/foundation/include/PsMathUtils.h
index 794419b..789cf3f 100644
--- a/PxShared/src/foundation/include/PsMathUtils.h
+++ b/PxShared/src/foundation/include/PsMathUtils.h
@@ -493,9 +493,6 @@ PX_FORCE_INLINE void normalToTangents(const PxVec3& normal, PxVec3& tangent0, Px
tangent1 = normal.cross(tangent0);
}
-// todo: what is this function doing?
-PX_FOUNDATION_API PxQuat computeQuatFromNormal(const PxVec3& n);
-
/**
\brief computes a oriented bounding box around the scaled basis.
\param basis Input = skewed basis, Output = (normalized) orthogonal basis.
diff --git a/PxShared/src/foundation/include/PsMutex.h b/PxShared/src/foundation/include/PsMutex.h
index 7c93796..23033d0 100644
--- a/PxShared/src/foundation/include/PsMutex.h
+++ b/PxShared/src/foundation/include/PsMutex.h
@@ -82,7 +82,7 @@ class PX_FOUNDATION_API MutexImpl
/**
Size of this class.
*/
- static const uint32_t& getSize();
+ static uint32_t getSize();
};
template <typename Alloc = ReflectionAllocator<MutexImpl> >
diff --git a/PxShared/src/foundation/include/PsSList.h b/PxShared/src/foundation/include/PsSList.h
index f811c37..961010b 100644
--- a/PxShared/src/foundation/include/PsSList.h
+++ b/PxShared/src/foundation/include/PsSList.h
@@ -91,7 +91,7 @@ struct PX_FOUNDATION_API SListImpl
void push(SListEntry* entry);
SListEntry* pop();
SListEntry* flush();
- static const uint32_t& getSize();
+ static uint32_t getSize();
};
template <typename Alloc = ReflectionAllocator<SListImpl> >
diff --git a/PxShared/src/foundation/include/PsSync.h b/PxShared/src/foundation/include/PsSync.h
index 8b99731..1fd72f5 100644
--- a/PxShared/src/foundation/include/PsSync.h
+++ b/PxShared/src/foundation/include/PsSync.h
@@ -70,9 +70,9 @@ class PX_FOUNDATION_API SyncImpl
void reset();
/**
- Size of this class.
- */
- static const uint32_t& getSize();
+ Size of this class.
+ */
+ static uint32_t getSize();
};
/*!
diff --git a/PxShared/src/foundation/include/PsThread.h b/PxShared/src/foundation/include/PsThread.h
index 4e7c104..ec9f999 100644
--- a/PxShared/src/foundation/include/PsThread.h
+++ b/PxShared/src/foundation/include/PsThread.h
@@ -206,9 +206,9 @@ class PX_FOUNDATION_API ThreadImpl
static uint32_t getNbPhysicalCores();
/**
- Size of this class.
- */
- static const uint32_t& getSize();
+ Size of this class.
+ */
+ static uint32_t getSize();
};
/**
diff --git a/PxShared/src/foundation/include/PsUtilities.h b/PxShared/src/foundation/include/PsUtilities.h
index 32fe4ec..cd0f200 100644
--- a/PxShared/src/foundation/include/PsUtilities.h
+++ b/PxShared/src/foundation/include/PsUtilities.h
@@ -122,7 +122,7 @@ PX_CUDA_CALLABLE PX_FORCE_INLINE void order(T& x, T& y, E1& xe1, E1& ye1)
}
}
-#if PX_GCC_FAMILY && !PX_EMSCRIPTEN
+#if PX_GCC_FAMILY && !PX_EMSCRIPTEN && !PX_LINUX
__attribute__((noreturn))
#endif
PX_INLINE void debugBreak()
@@ -132,7 +132,11 @@ __attribute__((noreturn))
#elif PX_ANDROID
raise(SIGTRAP); // works better than __builtin_trap. Proper call stack and can be continued.
#elif PX_LINUX
- asm("int $3");
+ #if (PX_X64 || PX_X64)
+ asm("int $3");
+ #else
+ raise(SIGTRAP);
+ #endif
#elif PX_GCC_FAMILY
__builtin_trap();
#else
diff --git a/PxShared/src/foundation/include/PsVecMathAoSScalar.h b/PxShared/src/foundation/include/PsVecMathAoSScalar.h
index beb6cdc..b7fe8e4 100644
--- a/PxShared/src/foundation/include/PsVecMathAoSScalar.h
+++ b/PxShared/src/foundation/include/PsVecMathAoSScalar.h
@@ -34,9 +34,6 @@
#error Scalar version should not be included when using vector intrinsics.
#endif
-// Remove this define when all platforms use simd solver.
-#define PX_SUPPORT_SIMD
-
struct VecI16V;
struct VecU16V;
struct VecI32V;
diff --git a/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h b/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h
index e54f2c8..74002d5 100644
--- a/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h
+++ b/PxShared/src/foundation/include/unix/PsUnixInlineAoS.h
@@ -34,9 +34,6 @@
#error Vector intrinsics should not be included when using scalar implementation.
#endif
-// Remove this define when all platforms use simd solver.
-#define PX_SUPPORT_SIMD
-
#if PX_INTEL_FAMILY
#include "sse2/PsUnixSse2InlineAoS.h"
#elif PX_NEON
diff --git a/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h b/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h
index 4c6c892..e15b3b5 100644
--- a/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h
+++ b/PxShared/src/foundation/include/unix/PsUnixIntrinsics.h
@@ -34,7 +34,7 @@
#include "foundation/PxAssert.h"
#include <math.h>
-#if PX_ANDROID
+#if PX_ANDROID || (PX_LINUX && !(PX_X64 || PX_X64)) // x86[_64] Linux uses inline assembly for debug break
#include <signal.h> // for Ns::debugBreak() { raise(SIGTRAP); }
#endif
diff --git a/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h b/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h
index a97f821..4df3ff6 100644
--- a/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h
+++ b/PxShared/src/foundation/include/unix/neon/PsUnixNeonInlineAoS.h
@@ -53,9 +53,6 @@
#define VECMATH_AOS_EPSILON (1e-3f)
-// Remove this define when all platforms use simd solver.
-#define PX_SUPPORT_SIMD
-
//////////////////////////////////////////////////////////////////////
//Test that Vec3V and FloatV are legal
//////////////////////////////////
diff --git a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h
index 0355538..cdb20fa 100644
--- a/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h
+++ b/PxShared/src/foundation/include/unix/sse2/PsUnixSse2InlineAoS.h
@@ -34,9 +34,6 @@
#error Vector intrinsics should not be included when using scalar implementation.
#endif
-// Remove this define when all platforms use simd solver.
-#define PX_SUPPORT_SIMD
-
#ifdef __SSE4_2__
#include "smmintrin.h"
#endif
diff --git a/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h b/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h
index 14a311f..5fd1b8d 100644
--- a/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h
+++ b/PxShared/src/foundation/include/windows/PsWindowsInlineAoS.h
@@ -34,9 +34,6 @@
#error Vector intrinsics should not be included when using scalar implementation.
#endif
-// Remove this define when all platforms use simd solver.
-#define PX_SUPPORT_SIMD
-
#include "../PsVecMathSSE.h"
//////////////////////////////////////////////////////////////////////
diff --git a/PxShared/src/foundation/src/PsString.cpp b/PxShared/src/foundation/src/PsString.cpp
index adb29d6..8204051 100644
--- a/PxShared/src/foundation/src/PsString.cpp
+++ b/PxShared/src/foundation/src/PsString.cpp
@@ -37,7 +37,7 @@
#pragma warning(disable : 4996) // unsafe string functions
#endif
-#if PX_PS4 || PX_APPLE_FAMILY
+#if PX_PS4 || PX_APPLE_FAMILY || (PX_LINUX && PX_X86 && PX_CLANG)
#pragma clang diagnostic push
// error : format string is not a string literal
#pragma clang diagnostic ignored "-Wformat-nonliteral"
@@ -176,7 +176,7 @@ void printFormatted(const char* format, ...)
}
}
-#if PX_PS4 || PX_APPLE_FAMILY
+#if PX_PS4 || PX_APPLE_FAMILY || (PX_LINUX && PX_X86 && PX_CLANG)
#pragma clang diagnostic pop
#endif
diff --git a/PxShared/src/foundation/src/unix/PsUnixMutex.cpp b/PxShared/src/foundation/src/unix/PsUnixMutex.cpp
index 092ec1e..23b6549 100644
--- a/PxShared/src/foundation/src/unix/PsUnixMutex.cpp
+++ b/PxShared/src/foundation/src/unix/PsUnixMutex.cpp
@@ -113,10 +113,9 @@ void MutexImpl::unlock()
PX_UNUSED(err);
}
-const uint32_t gSize = sizeof(MutexUnixImpl);
-const uint32_t& MutexImpl::getSize()
+uint32_t MutexImpl::getSize()
{
- return gSize;
+ return sizeof(MutexUnixImpl);
}
class ReadWriteLockImpl
diff --git a/PxShared/src/foundation/src/unix/PsUnixSList.cpp b/PxShared/src/foundation/src/unix/PsUnixSList.cpp
index 5dd8ac3..c2da1bb 100644
--- a/PxShared/src/foundation/src/unix/PsUnixSList.cpp
+++ b/PxShared/src/foundation/src/unix/PsUnixSList.cpp
@@ -147,11 +147,9 @@ SListEntry* SListImpl::flush()
return result;
}
-static const uint32_t gSize = sizeof(SListDetail);
-
-const uint32_t& SListImpl::getSize()
+uint32_t SListImpl::getSize()
{
- return gSize;
+ return sizeof(SListDetail);
}
} // namespace shdfnd
diff --git a/PxShared/src/foundation/src/unix/PsUnixSync.cpp b/PxShared/src/foundation/src/unix/PsUnixSync.cpp
index aedbbe0..a488743 100644
--- a/PxShared/src/foundation/src/unix/PsUnixSync.cpp
+++ b/PxShared/src/foundation/src/unix/PsUnixSync.cpp
@@ -61,10 +61,9 @@ _SyncImpl* getSync(SyncImpl* impl)
}
}
-static const uint32_t gSize = sizeof(_SyncImpl);
-const uint32_t& SyncImpl::getSize()
+uint32_t SyncImpl::getSize()
{
- return gSize;
+ return sizeof(_SyncImpl);
}
struct PxUnixScopeLock
diff --git a/PxShared/src/foundation/src/unix/PsUnixThread.cpp b/PxShared/src/foundation/src/unix/PsUnixThread.cpp
index cb369e0..749ae1d 100644
--- a/PxShared/src/foundation/src/unix/PsUnixThread.cpp
+++ b/PxShared/src/foundation/src/unix/PsUnixThread.cpp
@@ -135,10 +135,9 @@ void* PxThreadStart(void* arg)
}
}
-static const uint32_t gSize = sizeof(_ThreadImpl);
-const uint32_t& ThreadImpl::getSize()
+uint32_t ThreadImpl::getSize()
{
- return gSize;
+ return sizeof(_ThreadImpl);
}
ThreadImpl::Id ThreadImpl::getId()
@@ -314,10 +313,16 @@ uint32_t ThreadImpl::setAffinityMask(uint32_t mask)
return uint32_t(prevMask);
}
+#if PX_PS4
+int32_t setNamePS4(pthread_t, const char*);
+#endif
+
void ThreadImpl::setName(const char* name)
{
-#if(defined(ANDROID) && (__ANDROID_API__ > 8))
+#if (defined(ANDROID) && (__ANDROID_API__ > 8))
pthread_setname_np(getThread(this)->thread, name);
+#elif PX_PS4
+ setNamePS4(getThread(this)->thread, name);
#else
// not implemented because most unix APIs expect setName()
// to be called from the thread's context. Example see next comment:
diff --git a/PxShared/src/foundation/src/windows/PsWindowsMutex.cpp b/PxShared/src/foundation/src/windows/PsWindowsMutex.cpp
index 6174b96..e62de47 100644
--- a/PxShared/src/foundation/src/windows/PsWindowsMutex.cpp
+++ b/PxShared/src/foundation/src/windows/PsWindowsMutex.cpp
@@ -99,11 +99,9 @@ void MutexImpl::unlock()
LeaveCriticalSection(&getMutex(this)->mLock);
}
-static const uint32_t gSize = sizeof(MutexWinImpl);
-
-const uint32_t& MutexImpl::getSize()
+uint32_t MutexImpl::getSize()
{
- return gSize;
+ return sizeof(MutexWinImpl);
}
class ReadWriteLockImpl
diff --git a/PxShared/src/foundation/src/windows/PsWindowsSList.cpp b/PxShared/src/foundation/src/windows/PsWindowsSList.cpp
index 146785e..5e57b8f 100644
--- a/PxShared/src/foundation/src/windows/PsWindowsSList.cpp
+++ b/PxShared/src/foundation/src/windows/PsWindowsSList.cpp
@@ -68,11 +68,9 @@ SListEntry* SListImpl::flush()
return reinterpret_cast<SListEntry*>(InterlockedFlushSList(getDetail(this)));
}
-static const uint32_t gSize = sizeof(SLIST_HEADER);
-
-const uint32_t& SListImpl::getSize()
+uint32_t SListImpl::getSize()
{
- return gSize;
+ return sizeof(SLIST_HEADER);
}
} // namespace shdfnd
diff --git a/PxShared/src/foundation/src/windows/PsWindowsSocket.cpp b/PxShared/src/foundation/src/windows/PsWindowsSocket.cpp
index bd253b9..8654a7e 100644
--- a/PxShared/src/foundation/src/windows/PsWindowsSocket.cpp
+++ b/PxShared/src/foundation/src/windows/PsWindowsSocket.cpp
@@ -95,8 +95,8 @@ class SocketImpl
SocketImpl::SocketImpl(bool isBlocking)
: mSocket(INVALID_SOCKET)
, mListenSocket(INVALID_SOCKET)
-, mPort(0)
, mHost(NULL)
+, mPort(0)
, mIsConnected(false)
, mIsBlocking(isBlocking)
, mListenMode(false)
diff --git a/PxShared/src/foundation/src/windows/PsWindowsSync.cpp b/PxShared/src/foundation/src/windows/PsWindowsSync.cpp
index 5ce8122..81ae0e5 100644
--- a/PxShared/src/foundation/src/windows/PsWindowsSync.cpp
+++ b/PxShared/src/foundation/src/windows/PsWindowsSync.cpp
@@ -44,10 +44,9 @@ HANDLE& getSync(SyncImpl* impl)
}
}
-static const uint32_t gSize = sizeof(HANDLE);
-const uint32_t& SyncImpl::getSize()
+uint32_t SyncImpl::getSize()
{
- return gSize;
+ return sizeof(HANDLE);
}
SyncImpl::SyncImpl()
diff --git a/PxShared/src/foundation/src/windows/PsWindowsThread.cpp b/PxShared/src/foundation/src/windows/PsWindowsThread.cpp
index 18ad5ee..9c5728a 100644
--- a/PxShared/src/foundation/src/windows/PsWindowsThread.cpp
+++ b/PxShared/src/foundation/src/windows/PsWindowsThread.cpp
@@ -104,10 +104,9 @@ DWORD WINAPI PxThreadStart(LPVOID arg)
uint32_t gPhysicalCoreCount = 0;
}
-static const uint32_t gSize = sizeof(_ThreadImpl);
-const uint32_t& ThreadImpl::getSize()
+uint32_t ThreadImpl::getSize()
{
- return gSize;
+ return sizeof(_ThreadImpl);
}
ThreadImpl::Id ThreadImpl::getId()
diff --git a/PxShared/src/pvd/src/PxProfileEvents.h b/PxShared/src/pvd/src/PxProfileEvents.h
index 25f09d7..c8a9989 100644
--- a/PxShared/src/pvd/src/PxProfileEvents.h
+++ b/PxShared/src/pvd/src/PxProfileEvents.h
@@ -103,7 +103,7 @@ namespace physx { namespace profile {
};
};
-#if (PX_PS4) || (PX_APPLE_FAMILY)
+#if (PX_PS4) || (PX_APPLE_FAMILY) || (PX_LINUX && PX_X86 && PX_CLANG)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wimplicit-fallthrough"
#endif
@@ -162,7 +162,7 @@ namespace physx { namespace profile {
return EventStreamCompressionFlags::U32;
}
-#if (PX_PS4) || (PX_APPLE_FAMILY)
+#if (PX_PS4) || (PX_APPLE_FAMILY) || (PX_LINUX && PX_X86 && PX_CLANG)
#pragma clang diagnostic pop
#endif
diff --git a/PxShared/src/task/src/TaskManager.cpp b/PxShared/src/task/src/TaskManager.cpp
index c6210bd..1551216 100644
--- a/PxShared/src/task/src/TaskManager.cpp
+++ b/PxShared/src/task/src/TaskManager.cpp
@@ -694,7 +694,7 @@ bool PxTaskMgr::dispatchTask( PxTaskID taskID, bool gpuGroupStart )
break;
}
- tt.mType = PxTaskType::TT_COMPLETED;
+ mTaskTable[taskID].mType = PxTaskType::TT_COMPLETED;
return gpuGroupStart;
}
diff --git a/README.md b/README.md
index 3503501..786b1e4 100644
--- a/README.md
+++ b/README.md
@@ -15,37 +15,5 @@ Documentation
-------------
See ./NvCloth/ReleaseNotes.txt for changes and platform support.
-See ./NvCloth/docs/documentation/NvCloth.html for the users guide.
+See ./NvCloth/docs/documentation/index.html for the release notes, API users guide and compiling instructions.
See ./NvCloth/docs/doxy/index.html for the api documentation.
-
-Compiling
----------
-For windows:
-Download and install the following dependencies:
-* CMake 3.7 https://cmake.org/download/
-* Visual studio 12 or later (2013 or later)
-* Windows 8.1 sdk https://developer.microsoft.com/en-us/windows/downloads/windows-8-1-sdk
-* CUDA sdk https://developer.nvidia.com/cuda-downloads (version 8 or later)
-
-edit ./NvCloth/scripts/locate_cmake.bat to point to the cmake executable
-edit ./NvCloth/scripts/locate_cuda.bat to point to the CUDA installation folder (that contains the bin, include and lib folder)
-edit ./NvCloth/scripts/locate_win8sdk.bat to point to the windows SDK (C:\Program Files (x86)\Windows Kits\8.1 by default)
-
-Run ./CmakeGenerateAll.bat to generate the visual studio solution files in ./compiler/vcXXwinXX-cmake/
-Run ./samples/CmakeGenerateProjects.bat to generate the visual studio solution files in ./samples/compiler/vcXXwinXX-cmake/
-
-For osx:
-Download and install cmake 3.4 and add the cmake binary to your path.
-Install xcode.
-Run ./NvCloth/GenerateProjectsOsx.sh to generate xcode projects in .//NvCloth/compiler/osxXX-cmake/
-
-For linux:
-Download and install cmake 3.4.
-Installing cmake on Ubuntu 16.04.1 LTS can be done using the following commands:
-```
-sudo apt-get install software-properties-common
-sudo add-apt-repository ppa:george-edison55/cmake-3.x
-sudo apt-get update
-sudo apt-get install cmake
-```
-Run ./NvCloth/GenerateProjectsLinux.sh to generate make files in .//NvCloth/compiler/linux64-XXXXX-cmake/