Skip to content

Commit

Permalink
Update PhysX to 5.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ayoub-belarbi authored and preist-nvidia committed Dec 1, 2022
1 parent 8c2791a commit 0bbcff3
Show file tree
Hide file tree
Showing 78 changed files with 1,159 additions and 609 deletions.
40 changes: 40 additions & 0 deletions physx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
# v5.1.1

## General

### Changed:

* Be aware that due to reorganization of some virtual functions in the public interface the binary data layout has changed from v5.1.0. Linking code that includes the headers of v5.1.1 against binaries that have been built with an older version will likely cause problems.

### Added:

* Support for spatial and fixed tendon serialization.

### Fixed:

* Binary serialization of articulations had a bug, which got fixed.
* Includes [PR #8: Download bootstrap packages using TLS](https://github.com/NVIDIA-Omniverse/PhysX/pull/8/)

## Rigid Body

### Fixed

* A crash when colliding an SDF mesh against a sphere

## Particle Systems

### Fixed

* Particle systems now support is<> type conversion.

### Removed

* The PxParticlePhase class has been removed. It was unused.

## Vehicles2

### Changed:

* SnippetVehicle2Multithreading is now using custom profiling code to provide timings in release builds too.


# v5.1.0

## Supported Platforms
Expand Down
2 changes: 1 addition & 1 deletion physx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Please see [Release Notes](./CHANGELOG.md) for updates pertaining to the latest

## User Guide and API Documentation

The user guide and API documentation are available on [GitHub Pages](https://nvidia-omniverse.github.io/PhysX/physx). Please create an [Issue](https://github.com/NVIDIA-Omniverse/PhysX/issues/) if you find a documentation issue.
The user guide and API documentation are available on [GitHub Pages](https://nvidia-omniverse.github.io/PhysX/physx/index.html). Please create an [Issue](https://github.com/NVIDIA-Omniverse/PhysX/issues/) if you find a documentation issue.

## Quick Start Instructions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
@echo Fetching %PACKAGE_NAME% ...

@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0download_file_from_url.ps1" ^
-source "http://bootstrap.packman.nvidia.com/%PACKAGE_NAME%" -output %TARGET_PATH%
-source "https://bootstrap.packman.nvidia.com/%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
Expand Down
2 changes: 1 addition & 1 deletion physx/buildtools/packman/packman
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ fi
fetch_file_from_s3()
{
SOURCE=$1
SOURCE_URL=http://bootstrap.packman.nvidia.com/$SOURCE
SOURCE_URL=https://bootstrap.packman.nvidia.com/$SOURCE
TARGET=$2
echo "Fetching $SOURCE from bootstrap.packman.nvidia.com ..."
if command -v wget >/dev/null 2>&1; then
Expand Down
2 changes: 1 addition & 1 deletion physx/dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</dependency>

<dependency name="PhysXGpu">
<package name="PhysXGpu" version="104.0-5.1.118.32022295-public" platforms="vc15win64 vc16win64 linux linux-aarch64"/>
<package name="PhysXGpu" version="104.1-5.1.1151.32112585-public" platforms="vc15win64 vc16win64 linux linux-aarch64"/>
</dependency>

<dependency name="opengllinux" tags="requiredForDistro">
Expand Down
8 changes: 6 additions & 2 deletions physx/documentation/platformreadme/linux/README_LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@

* CMake, minimum version 3.14
* Python, minimum version 3.5
* Clang, min version 3.8
* Gcc for aarch64, min version 5.3
* curl

Compilers:
* For linux x86-64 builds we support Ubuntu LTS releases with their respective default compiler versions:
* Ubuntu 20.04 LTS with gcc 9 or clang 10
* Ubuntu 22.04 LTS with gcc 11 or clang 14
* For linux aarch64 builds we support gcc version 9


## Generating Makefiles:

Expand Down
30 changes: 27 additions & 3 deletions physx/include/PxArticulationTendon.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace physx
/**
\brief Defines a spatial tendon attachment point on a link.
*/
class PxArticulationAttachment
class PxArticulationAttachment : public PxBase
{

public:
Expand Down Expand Up @@ -180,14 +180,26 @@ namespace physx
*/
virtual void release() = 0;

void* userData; //!< user can assign this to whatever, usually to create a 1:1 relationship with a user object.
void* userData; //!< user can assign this to whatever, usually to create a 1:1 relationship with a user object.

/**
\brief Returns the string name of the dynamic type.
\return The string name.
*/
virtual const char* getConcreteTypeName() const { return "PxArticulationAttachment"; }

protected:

PX_INLINE PxArticulationAttachment(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
PX_INLINE PxArticulationAttachment(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
};


/**
\brief Defines a fixed-tendon joint on an articulation joint degree of freedom.
*/
class PxArticulationTendonJoint
class PxArticulationTendonJoint : public PxBase
{

public:
Expand Down Expand Up @@ -253,6 +265,18 @@ namespace physx
virtual void release() = 0;

void* userData; //!< user can assign this to whatever, usually to create a 1:1 relationship with a user object.

/**
\brief Returns the string name of the dynamic type.
\return The string name.
*/
virtual const char* getConcreteTypeName() const { return "PxArticulationTendonJoint"; }

protected:

PX_INLINE PxArticulationTendonJoint(PxType concreteType, PxBaseFlags baseFlags) : PxBase(concreteType, baseFlags) {}
PX_INLINE PxArticulationTendonJoint(PxBaseFlags baseFlags) : PxBase(baseFlags) {}
};


Expand Down
75 changes: 75 additions & 0 deletions physx/include/PxFEMClothFlags.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * 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.
// * Neither the name of NVIDIA CORPORATION 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 ''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 OWNER 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.
//
// Copyright (c) 2008-2022 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.

#ifndef PX_PHYSICS_FEM_CLOTH_FLAGS_H
#define PX_PHYSICS_FEM_CLOTH_FLAGS_H

#include "foundation/PxFlags.h"
#include "foundation/PxSimpleTypes.h"


#if !PX_DOXYGEN
namespace physx
{
#endif

/**
\brief Identifies input and output buffers for PxFEMCloth.
@see PxFEMClothData::readData(), PxFEMClothData::writeData(), PxBuffer.
*/
struct PxFEMClothData
{
enum Enum
{
eNONE = 0,
ePOSITION_INVMASS = 1 << 0,
eVELOCITY = 1 << 1,
eREST_POSITION = 1 << 2,
eALL = ePOSITION_INVMASS | eVELOCITY | eREST_POSITION
};
};

typedef PxFlags<PxFEMClothData::Enum, PxU32> PxFEMClothDataFlags;

struct PxFEMClothFlag
{
enum Enum
{
eDISABLE_SELF_COLLISION = 1 << 0,
eUSE_ISOTROPIC_CLOTH = 1 << 1, // 0: use anistropic model
eUSE_REST_POSITION_FOR_BENDING = 1 << 2 // 0: use zero bending angle
};
};

typedef PxFlags<PxFEMClothFlag::Enum, PxU32> PxFEMClothFlags;

#if !PX_DOXYGEN
} // namespace physx
#endif

#endif
14 changes: 7 additions & 7 deletions physx/include/PxPBDMaterial.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ namespace physx
/**
\brief Sets material vorticity confinement coefficient
\param[in] vorticityConfinement Material vorticity confinement coefficient.
\param[in] vorticityConfinement Material vorticity confinement coefficient. <b>Range:</b> [0, PX_MAX_F32)
@see #getVorticityConfinement()
*/
Expand All @@ -87,7 +87,7 @@ namespace physx
/**
\brief Sets material surface tension coefficient
\param[in] surfaceTension Material surface tension coefficient.
\param[in] surfaceTension Material surface tension coefficient. <b>Range:</b> [0, PX_MAX_F32)
@see #getSurfaceTension()
*/
Expand All @@ -104,7 +104,7 @@ namespace physx
/**
\brief Sets material cohesion coefficient
\param[in] cohesion Material cohesion coefficient.
\param[in] cohesion Material cohesion coefficient. <b>Range:</b> [0, PX_MAX_F32)
@see #getCohesion()
*/
Expand All @@ -121,7 +121,7 @@ namespace physx
/**
\brief Sets material lift coefficient
\param[in] lift Material lift coefficient.
\param[in] lift Material lift coefficient. <b>Range:</b> [0, PX_MAX_F32)
@see #getLift()
*/
Expand All @@ -138,7 +138,7 @@ namespace physx
/**
\brief Sets material drag coefficient
\param[in] drag Material drag coefficient.
\param[in] drag Material drag coefficient. <b>Range:</b> [0, PX_MAX_F32)
@see #getDrag()
*/
Expand Down Expand Up @@ -171,7 +171,7 @@ namespace physx
\brief Sets material particle friction scale. This allows the application to scale up/down the frictional effect between particles independent of the friction
coefficient, which also defines frictional behavior between the particle and rigid bodies/soft bodies/cloth etc.
\param[in] scale particle friction scale
\param[in] scale particle friction scale. <b>Range:</b> [0, PX_MAX_F32)
@see #getParticleFrictionScale()
*/
Expand All @@ -188,7 +188,7 @@ namespace physx
/**
\brief Sets material particle adhesion scale value. This is the adhesive value between particles defined as a scaled multiple of the adhesion parameter.
\param[in] adhesion particle adhesion scale value
\param[in] adhesion particle adhesion scale value. <b>Range:</b> [0, PX_MAX_F32)
@see #getParticleAdhesionScale()
*/
Expand Down
29 changes: 16 additions & 13 deletions physx/include/PxPBDParticleSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include "foundation/PxVec3.h"

#include "PxParticleSystem.h"
#include "PxParticlePhase.h"

#if !PX_DOXYGEN
namespace physx
Expand All @@ -58,21 +57,21 @@ class PxPBDParticleSystem : public PxParticleSystem
{
public:

virtual ~PxPBDParticleSystem() {}
virtual ~PxPBDParticleSystem() {}

/**
\brief Set wind direction and intensity
\param[in] wind The wind direction and intensity
*/
virtual void setWind(const PxVec3& wind) = 0;
virtual void setWind(const PxVec3& wind) = 0;

/**
\brief Retrieves the wind direction and intensity.
\return The wind direction and intensity
*/
virtual PxVec3 getWind() const = 0;
virtual PxVec3 getWind() const = 0;

/**
\brief Set the fluid boundary density scale
Expand All @@ -81,15 +80,15 @@ class PxPBDParticleSystem : public PxParticleSystem
\param[in] fluidBoundaryDensityScale <b>Range:</b> (0.0, 1.0)
*/
virtual void setFluidBoundaryDensityScale(PxReal fluidBoundaryDensityScale) = 0;
virtual void setFluidBoundaryDensityScale(PxReal fluidBoundaryDensityScale) = 0;

/**
\brief Return the fluid boundary density scale
\return the fluid boundary density scale
See #setFluidBoundaryDensityScale()
*/
virtual PxReal getFluidBoundaryDensityScale() const = 0;
virtual PxReal getFluidBoundaryDensityScale() const = 0;

/**
\brief Set the fluid rest offset
Expand All @@ -98,39 +97,43 @@ class PxPBDParticleSystem : public PxParticleSystem
\param[in] fluidRestOffset <b>Range:</b> (0, particleContactOffset)
*/
virtual void setFluidRestOffset(PxReal fluidRestOffset) = 0;
virtual void setFluidRestOffset(PxReal fluidRestOffset) = 0;

/**
\brief Return the fluid rest offset
\return the fluid rest offset
See #setFluidRestOffset()
*/
virtual PxReal getFluidRestOffset() const = 0;
virtual PxReal getFluidRestOffset() const = 0;

/**
\brief Set the particle system grid size x dimension
\param[in] gridSizeX x dimension in the particle grid
*/
virtual void setGridSizeX(PxU32 gridSizeX) = 0;
virtual void setGridSizeX(PxU32 gridSizeX) = 0;

/**
\brief Set the particle system grid size y dimension
\param[in] gridSizeY y dimension in the particle grid
*/
virtual void setGridSizeY(PxU32 gridSizeY) = 0;
virtual void setGridSizeY(PxU32 gridSizeY) = 0;

/**
\brief Set the particle system grid size z dimension
\param[in] gridSizeZ z dimension in the particle grid
*/
virtual void setGridSizeZ(PxU32 gridSizeZ) = 0;
virtual void setGridSizeZ(PxU32 gridSizeZ) = 0;

PX_INLINE PxPBDParticleSystem(PxType concreteType, PxBaseFlags baseFlags) : PxParticleSystem(concreteType, baseFlags) {}
PX_INLINE PxPBDParticleSystem(PxBaseFlags baseFlags) : PxParticleSystem(baseFlags) {}
virtual const char* getConcreteTypeName() const PX_OVERRIDE { return "PxPBDParticleSystem"; }

protected:
PX_INLINE PxPBDParticleSystem(PxType concreteType, PxBaseFlags baseFlags) : PxParticleSystem(concreteType, baseFlags) {}
PX_INLINE PxPBDParticleSystem(PxBaseFlags baseFlags) : PxParticleSystem(baseFlags) {}
virtual bool isKindOf(const char* name) const PX_OVERRIDE { return !::strcmp("PxPBDParticleSystem", name) || PxParticleSystem::isKindOf(name); }
};

#if PX_VC
Expand Down
Loading

0 comments on commit 0bbcff3

Please sign in to comment.