aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Include
diff options
context:
space:
mode:
authorSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
committerSheikh Dawood Abdul Ajees <[email protected]>2017-09-15 15:41:57 -0500
commitd1c812f1162e5fdb13c215792725b2591d7428f5 (patch)
tree407056c45c7e9320c48fca6a3697d81a061c4ea0 /PhysX_3.4/Include
parentPhysX 3.4, APEX 1.4 patch release @22121272 (diff)
downloadphysx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.tar.xz
physx-3.4-d1c812f1162e5fdb13c215792725b2591d7428f5.zip
PhysX 3.4.1, APEX 1.4.1 Release @22845541v3.4.1
Diffstat (limited to 'PhysX_3.4/Include')
-rw-r--r--PhysX_3.4/Include/PxActor.h3
-rw-r--r--PhysX_3.4/Include/PxContactModifyCallback.h69
-rw-r--r--PhysX_3.4/Include/PxPhysics.h24
-rw-r--r--PhysX_3.4/Include/PxPhysicsVersion.h2
-rw-r--r--PhysX_3.4/Include/PxRigidBody.h9
-rw-r--r--PhysX_3.4/Include/PxRigidDynamic.h1
-rw-r--r--PhysX_3.4/Include/PxScene.h26
-rw-r--r--PhysX_3.4/Include/PxSceneDesc.h38
-rw-r--r--PhysX_3.4/Include/PxSimulationStatistics.h7
-rw-r--r--PhysX_3.4/Include/PxVisualizationParameter.h6
-rw-r--r--PhysX_3.4/Include/cloth/PxCloth.h13
-rw-r--r--PhysX_3.4/Include/cloth/PxClothCollisionData.h9
-rw-r--r--PhysX_3.4/Include/cloth/PxClothFabric.h13
-rw-r--r--PhysX_3.4/Include/cloth/PxClothParticleData.h3
-rw-r--r--PhysX_3.4/Include/cloth/PxClothTypes.h13
-rw-r--r--PhysX_3.4/Include/common/PxPhysXCommonConfig.h25
-rw-r--r--PhysX_3.4/Include/common/windows/PxWindowsDelayLoadHook.h5
-rw-r--r--PhysX_3.4/Include/extensions/PxBinaryConverter.h10
-rw-r--r--PhysX_3.4/Include/extensions/PxClothFabricCooker.h5
-rw-r--r--PhysX_3.4/Include/extensions/PxClothMeshDesc.h4
-rw-r--r--PhysX_3.4/Include/extensions/PxClothMeshQuadifier.h5
-rw-r--r--PhysX_3.4/Include/extensions/PxClothTetherCooker.h10
-rw-r--r--PhysX_3.4/Include/extensions/PxDefaultAllocator.h4
-rw-r--r--PhysX_3.4/Include/geometry/PxConvexMeshGeometry.h12
-rw-r--r--PhysX_3.4/Include/solver/PxSolverDefs.h13
25 files changed, 261 insertions, 68 deletions
diff --git a/PhysX_3.4/Include/PxActor.h b/PhysX_3.4/Include/PxActor.h
index afe1df57..70766499 100644
--- a/PhysX_3.4/Include/PxActor.h
+++ b/PhysX_3.4/Include/PxActor.h
@@ -160,9 +160,10 @@ struct PxActorType
#if PX_USE_CLOTH_API
/**
\brief A cloth
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxCloth
*/
- eCLOTH,
+ eCLOTH PX_DEPRECATED,
#endif
//brief internal use only!
diff --git a/PhysX_3.4/Include/PxContactModifyCallback.h b/PhysX_3.4/Include/PxContactModifyCallback.h
index 324257de..bae6c0fe 100644
--- a/PhysX_3.4/Include/PxContactModifyCallback.h
+++ b/PhysX_3.4/Include/PxContactModifyCallback.h
@@ -142,7 +142,15 @@ public:
@see PxModifiableContact.internalFaceIndex1
*/
- PX_FORCE_INLINE PxU32 getInternalFaceIndex1(PxU32 i) { PX_UNUSED(i); return PXC_CONTACT_NO_FACE_INDEX; }
+ PX_FORCE_INLINE PxU32 getInternalFaceIndex1(PxU32 i)
+ {
+ PxContactPatch* patch = getPatch();
+ if (patch->internalFlags & PxContactPatch::eHAS_FACE_INDICES)
+ {
+ return reinterpret_cast<PxU32*>(mContacts + mCount)[mCount + i];
+ }
+ return PXC_CONTACT_NO_FACE_INDEX;
+ }
/**
\brief Get the maximum impulse for a specific contact point in the set.
@@ -166,6 +174,65 @@ public:
}
/**
+ \brief Get the restitution coefficient for a specific contact point in the set.
+
+ @see PxModifiableContact.restitution
+ */
+ PX_FORCE_INLINE PxReal getRestitution(PxU32 i) const { return mContacts[i].restitution; }
+
+ /**
+ \brief Alter the restitution coefficient for a specific contact point in the set.
+
+ \note Valid ranges [0,1]
+
+ @see PxModifiableContact.restitution
+ */
+ PX_FORCE_INLINE void setRestitution(PxU32 i, PxReal r)
+ {
+ PxContactPatch* patch = getPatch();
+ patch->internalFlags |= PxContactPatch::eREGENERATE_PATCHES;
+ mContacts[i].restitution = r;
+ }
+
+ /**
+ \brief Get the static friction coefficient for a specific contact point in the set.
+
+ @see PxModifiableContact.staticFriction
+ */
+ PX_FORCE_INLINE PxReal getStaticFriction(PxU32 i) const { return mContacts[i].staticFriction; }
+
+ /**
+ \brief Alter the static friction coefficient for a specific contact point in the set.
+
+ @see PxModifiableContact.staticFriction
+ */
+ PX_FORCE_INLINE void setStaticFriction(PxU32 i, PxReal f)
+ {
+ PxContactPatch* patch = getPatch();
+ patch->internalFlags |= PxContactPatch::eREGENERATE_PATCHES;
+ mContacts[i].staticFriction = f;
+ }
+
+ /**
+ \brief Get the static friction coefficient for a specific contact point in the set.
+
+ @see PxModifiableContact.dynamicFriction
+ */
+ PX_FORCE_INLINE PxReal getDynamicFriction(PxU32 i) const { return mContacts[i].dynamicFriction; }
+
+ /**
+ \brief Alter the static dynamic coefficient for a specific contact point in the set.
+
+ @see PxModifiableContact.dynamic
+ */
+ PX_FORCE_INLINE void setDynamicFriction(PxU32 i, PxReal f)
+ {
+ PxContactPatch* patch = getPatch();
+ patch->internalFlags |= PxContactPatch::eREGENERATE_PATCHES;
+ mContacts[i].dynamicFriction = f;
+ }
+
+ /**
\brief Ignore the contact point.
If a contact point is ignored then no force will get applied at this point. This can be used to disable collision in certain areas of a shape, for example.
diff --git a/PhysX_3.4/Include/PxPhysics.h b/PhysX_3.4/Include/PxPhysics.h
index 7f7582b0..c2c8bc95 100644
--- a/PhysX_3.4/Include/PxPhysics.h
+++ b/PhysX_3.4/Include/PxPhysics.h
@@ -260,10 +260,12 @@ public:
\param[in] stream The stream to load the cloth fabric from.
\return The new cloth fabric.
+
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxClothFabric PxClothFabric.release() PxInputStream PxCloth PxRegisterCloth
*/
- virtual PxClothFabric* createClothFabric(PxInputStream& stream) = 0;
+ PX_DEPRECATED virtual PxClothFabric* createClothFabric(PxInputStream& stream) = 0;
/**
\brief Creates a cloth fabric object from particle connectivity and restlength information.
@@ -275,18 +277,22 @@ public:
\param[in] desc Fabric descriptor, see #PxClothFabricDesc.
\return The new cloth fabric.
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+
@see PxClothFabric PxClothFabric.release() PxCloth
*/
- virtual PxClothFabric* createClothFabric(const PxClothFabricDesc& desc) = 0;
+ PX_DEPRECATED virtual PxClothFabric* createClothFabric(const PxClothFabricDesc& desc) = 0;
/**
\brief Return the number of cloth fabrics that currently exist.
\return Number of cloth fabrics.
+
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see getClothFabrics()
*/
- virtual PxU32 getNbClothFabrics() const = 0;
+ PX_DEPRECATED virtual PxU32 getNbClothFabrics() const = 0;
/**
\brief Writes the array of cloth fabrics to a user buffer.
@@ -299,9 +305,11 @@ public:
\param[in] bufferSize The number of cloth fabric pointers which can be stored in the buffer.
\return The number of cloth fabric pointers written to userBuffer, this should be less or equal to bufferSize.
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+
@see getNbClothFabrics() PxClothFabric
*/
- virtual PxU32 getClothFabrics(PxClothFabric** userBuffer, PxU32 bufferSize) const = 0;
+ PX_DEPRECATED virtual PxU32 getClothFabrics(PxClothFabric** userBuffer, PxU32 bufferSize) const = 0;
#endif
//@}
@@ -416,9 +424,11 @@ public:
\param flags Cloth flags.
\return The new cloth.
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+
@see PxCloth PxClothFabric PxClothFlags PxRegisterCloth
*/
- virtual PxCloth* createCloth(const PxTransform& globalPose, PxClothFabric& fabric, const PxClothParticle* particles, PxClothFlags flags) = 0;
+ PX_DEPRECATED virtual PxCloth* createCloth(const PxTransform& globalPose, PxClothFabric& fabric, const PxClothParticle* particles, PxClothFlags flags) = 0;
#endif
/**
@@ -739,8 +749,10 @@ On resource constrained platforms, it is possible to call PxCreateBasePhysics()
to save on code memory if your application does not use cloth. In this case the linker should strip out
the relevant implementation code from the library. If you need to use cloth but not some other optional
component, you shoud call PxCreateBasePhysics() followed by this call.
+
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterCloth(physx::PxPhysics& physics);
+PX_DEPRECATED PX_C_EXPORT PX_PHYSX_CORE_API void PX_CALL_CONV PxRegisterCloth(physx::PxPhysics& physics);
/**
\brief Enables the usage of the particles feature. This function is called automatically inside PxCreatePhysics(). (deprecated)
diff --git a/PhysX_3.4/Include/PxPhysicsVersion.h b/PhysX_3.4/Include/PxPhysicsVersion.h
index fe8b4c49..a7dcd25b 100644
--- a/PhysX_3.4/Include/PxPhysicsVersion.h
+++ b/PhysX_3.4/Include/PxPhysicsVersion.h
@@ -56,7 +56,7 @@ sometimes they are stored in a byte.
#define PX_PHYSICS_VERSION_MAJOR 3
#define PX_PHYSICS_VERSION_MINOR 4
-#define PX_PHYSICS_VERSION_BUGFIX 0
+#define PX_PHYSICS_VERSION_BUGFIX 1
/**
The constant PX_PHYSICS_VERSION is used when creating certain PhysX module objects.
diff --git a/PhysX_3.4/Include/PxRigidBody.h b/PhysX_3.4/Include/PxRigidBody.h
index 2ae9858a..01c18c61 100644
--- a/PhysX_3.4/Include/PxRigidBody.h
+++ b/PhysX_3.4/Include/PxRigidBody.h
@@ -126,7 +126,12 @@ struct PxRigidBodyFlag
/**
\brief Register a rigid body to dynamicly adjust contact offset based on velocity. This can be used to achieve a CCD effect.
*/
- eENABLE_SPECULATIVE_CCD = (1 << 5)
+ eENABLE_SPECULATIVE_CCD = (1 << 5),
+
+ /**
+ \brief Permit CCD to limit maxContactImpulse. This is useful for use-cases like a destruction system but can cause visual artefacts so is not enabled by default.
+ */
+ eENABLE_CCD_MAX_CONTACT_IMPULSE = (1 << 6)
};
};
@@ -532,6 +537,8 @@ public:
bodies will be the minimum of the two limit values. For a collision between a static and a dynamic body, the impulse is limited
by the value for the dynamic body.
+ This value is not used in CCD unless PxRigidBodyFlag::eENABLE_CCD_MAX_CONTACT_IMPULSE is raised on the body.
+
\param[in] maxImpulse the maximum contact impulse. <b>Range:</b> [0, PX_MAX_F32] <b>Default:</b> PX_MAX_F32
@see getMaxContactImpulse
diff --git a/PhysX_3.4/Include/PxRigidDynamic.h b/PhysX_3.4/Include/PxRigidDynamic.h
index ad8b261a..e299412d 100644
--- a/PhysX_3.4/Include/PxRigidDynamic.h
+++ b/PhysX_3.4/Include/PxRigidDynamic.h
@@ -76,7 +76,6 @@ Instances of this class are created by calling #PxPhysics::createRigidDynamic()
\li #PxVisualizationParameter::eBODY_MASS_AXES
\li #PxVisualizationParameter::eBODY_LIN_VELOCITY
\li #PxVisualizationParameter::eBODY_ANG_VELOCITY
-\li #PxVisualizationParameter::eBODY_JOINT_GROUPS
@see PxRigidBody PxPhysics.createRigidDynamic() release()
*/
diff --git a/PhysX_3.4/Include/PxScene.h b/PhysX_3.4/Include/PxScene.h
index 13c9d2fe..5e477cb1 100644
--- a/PhysX_3.4/Include/PxScene.h
+++ b/PhysX_3.4/Include/PxScene.h
@@ -149,9 +149,10 @@ struct PxActorTypeFlag
#if PX_USE_CLOTH_API
/**
\brief A cloth
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxCloth
*/
- eCLOTH = (1 << 5)
+ eCLOTH PX_DEPRECATED = (1 << 5)
#endif
};
};
@@ -743,14 +744,17 @@ class PxScene
\note The PxCloth objects that interact can be controlled through the filter
shader, @see PxSimulationFilterShader. Cloth objects with the PxClothFlag::eGPU
set can only interact with other GPU simulated cloth objects.
+
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
- virtual void setClothInterCollisionDistance(PxF32 distance) = 0;
+ PX_DEPRECATED virtual void setClothInterCollisionDistance(PxF32 distance) = 0;
/**
\brief Retrieves distance used for cloth inter-collision.
\return The distance used for cloth inter-collision.
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
- virtual PxF32 getClothInterCollisionDistance() const = 0;
+ PX_DEPRECATED virtual PxF32 getClothInterCollisionDistance() const = 0;
/**
\brief Sets the cloth inter-collision stiffness.
@@ -759,13 +763,15 @@ class PxScene
when they are closer than the inter-collision distance.
\param [in] stiffness Fraction of distance residual to resolve per iteration (default: 1.0).
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
- virtual void setClothInterCollisionStiffness(PxF32 stiffness) = 0;
+ PX_DEPRECATED virtual void setClothInterCollisionStiffness(PxF32 stiffness) = 0;
/**
\brief Retrieves the stiffness coefficient used for cloth inter-collision.
\return The stiffness coefficient used for cloth inter-collision.
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
- virtual PxF32 getClothInterCollisionStiffness() const = 0;
+ PX_DEPRECATED virtual PxF32 getClothInterCollisionStiffness() const = 0;
/**
\brief Sets the number of inter-collision separation iterations to perform.
@@ -774,13 +780,15 @@ class PxScene
of separation passes that are performed.
\param[in] nbIterations The number of iterations to perform (default: 1).
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
- virtual void setClothInterCollisionNbIterations(PxU32 nbIterations) = 0;
+ PX_DEPRECATED virtual void setClothInterCollisionNbIterations(PxU32 nbIterations) = 0;
/**
\brief Retrieves the number of iterations used for cloth inter-collision.
\return The number of iterations used for cloth inter-collision.
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
- virtual PxU32 getClothInterCollisionNbIterations() const = 0;
+ PX_DEPRECATED virtual PxU32 getClothInterCollisionNbIterations() const = 0;
//@}
#endif // PX_USE_CLOTH_API
@@ -1282,9 +1290,9 @@ class PxScene
/**
- \brief Defines a box in world space to which visualization geometry will be (conservatively) culled
+ \brief Defines a box in world space to which visualization geometry will be (conservatively) culled. Use a non-empty culling box to enable the feature, and an empty culling box to disable it.
- \param[in] box the box to which the geometry will be culled.
+ \param[in] box the box to which the geometry will be culled. Empty box to disable the feature.
@see setVisualizationParameter getVisualizationCullingBox getRenderBuffer()
*/
virtual void setVisualizationCullingBox(const PxBounds3& box) = 0;
diff --git a/PhysX_3.4/Include/PxSceneDesc.h b/PhysX_3.4/Include/PxSceneDesc.h
index 9c6d053d..236c2f0e 100644
--- a/PhysX_3.4/Include/PxSceneDesc.h
+++ b/PhysX_3.4/Include/PxSceneDesc.h
@@ -218,7 +218,7 @@ struct PxSceneFlag
\note This flag is not mutable, and must be set in PxSceneDesc at scene creation.
- <b>Default:</b> false
+ <b>Default:</b> true
*/
eENABLE_PCM = (1 << 9),
@@ -644,6 +644,16 @@ public:
PxReal ccdMaxSeparation;
/**
+ \brief A slop value used to zero contact offsets from the body's COM on an axis if the offset along that axis is smaller than this threshold. Can be used to compensate
+ for small numerical errors in contact generation.
+
+ <b>Range:</b> [0, PX_MAX_F32)<br>
+ <b>Default:</b> 0.0
+ */
+
+ PxReal solverOffsetSlop;
+
+ /**
\brief Flags used to select scene options.
@see PxSceneFlag PxSceneFlags
@@ -755,6 +765,24 @@ public:
PxU32 maxNbContactDataBlocks;
/**
+ \brief The maximum bias coefficient used in the constraint solver
+
+ When geometric errors are found in the constraint solver, either as a result of shapes penetrating
+ or joints becoming separated or violating limits, a bias is introduced in the solver position iterations
+ to correct these errors. This bias is proportional to 1/dt, meaning that the bias becomes increasingly
+ strong as the time-step passed to PxScene::simulate(...) becomes smaller. This coefficient allows the
+ application to restrict how large the bias coefficient is, to reduce how violent error corrections are.
+ This can improve simulation quality in cases where either variable time-steps or extremely small time-steps
+ are used.
+
+ <b>Default:</b> PX_MAX_F32
+
+ <b> Range</b> [0, PX_MAX_F32] <br>
+
+ */
+ PxReal maxBiasCoefficient;
+
+ /**
\brief Size of the contact report stream (in bytes).
The contact report stream buffer is used during the simulation to store all the contact reports.
@@ -888,6 +916,7 @@ PX_INLINE PxSceneDesc::PxSceneDesc(const PxTolerancesScale& scale):
bounceThresholdVelocity (0.2f * scale.speed),
frictionOffsetThreshold (0.04f * scale.length),
ccdMaxSeparation (0.04f * scale.length),
+ solverOffsetSlop (0.0f),
flags (PxSceneFlag::eENABLE_PCM),
@@ -904,14 +933,15 @@ PX_INLINE PxSceneDesc::PxSceneDesc(const PxTolerancesScale& scale):
nbContactDataBlocks (0),
maxNbContactDataBlocks (1<<16),
+ maxBiasCoefficient (PX_MAX_F32),
contactReportStreamBufferSize (8192),
ccdMaxPasses (1),
wakeCounterResetValue (20.0f*0.02f),
sanityBounds (PxBounds3(PxVec3(-PX_MAX_BOUNDS_EXTENTS), PxVec3(PX_MAX_BOUNDS_EXTENTS))),
-#if PX_SUPPORT_GPU_PHYSX
+
gpuMaxNumPartitions (8),
gpuComputeVersion (0),
-#endif
+
tolerancesScale (scale)
{
}
@@ -965,13 +995,11 @@ PX_INLINE bool PxSceneDesc::isValid() const
if(!sanityBounds.isValid())
return false;
-#if PX_SUPPORT_GPU_PHYSX
//gpuMaxNumPartitions must be power of 2
if((gpuMaxNumPartitions&(gpuMaxNumPartitions - 1)) != 0)
return false;
if (gpuMaxNumPartitions > 32)
return false;
-#endif
return true;
}
diff --git a/PhysX_3.4/Include/PxSimulationStatistics.h b/PhysX_3.4/Include/PxSimulationStatistics.h
index 87aaf10a..3cb49939 100644
--- a/PhysX_3.4/Include/PxSimulationStatistics.h
+++ b/PhysX_3.4/Include/PxSimulationStatistics.h
@@ -63,18 +63,23 @@ public:
*/
eRIGID_BODY,
+#if PX_USE_PARTICLE_SYSTEM_API
/**
\brief A volume belonging to a particle system (deprecated)
\deprecated The PhysX particle feature has been deprecated in PhysX version 3.4
@see PxParticleSystem PxParticleFluid
*/
ePARTICLE_SYSTEM PX_DEPRECATED,
+#endif
+#if PX_USE_CLOTH_API
/**
\brief A volume belonging to a cloth
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxCloth
*/
- eCLOTH,
+ eCLOTH PX_DEPRECATED,
+#endif
eVOLUME_COUNT
};
diff --git a/PhysX_3.4/Include/PxVisualizationParameter.h b/PhysX_3.4/Include/PxVisualizationParameter.h
index 98e1b5e9..6beb8b85 100644
--- a/PhysX_3.4/Include/PxVisualizationParameter.h
+++ b/PhysX_3.4/Include/PxVisualizationParameter.h
@@ -138,7 +138,7 @@ struct PxVisualizationParameter
@see PxBodyDesc.angularVelocity PxActor
*/
- eBODY_JOINT_GROUPS,
+ eDEPRECATED_BODY_JOINT_GROUPS,
/* Contact visualisations */
@@ -272,10 +272,8 @@ struct PxVisualizationParameter
*/
ePARTICLE_SYSTEM_MAX_MOTION_DISTANCE,
- /* Visualization subscene (culling box) */
-
/**
- \brief Debug visualization culling
+ \brief Visualize culling box
*/
eCULL_BOX,
diff --git a/PhysX_3.4/Include/cloth/PxCloth.h b/PhysX_3.4/Include/cloth/PxCloth.h
index 40c20c29..6c031a85 100644
--- a/PhysX_3.4/Include/cloth/PxCloth.h
+++ b/PhysX_3.4/Include/cloth/PxCloth.h
@@ -53,8 +53,9 @@ class PxScene;
\brief Solver configuration parameters for the vertical and horizontal stretch phase types.
\see PxCloth.setStretchConfig()
\see PxClothFabric for information on actual phase data in cloth fabric
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothStretchConfig
+struct PX_DEPRECATED PxClothStretchConfig
{
/**
\brief Stiffness of the stretch constraints.
@@ -104,8 +105,9 @@ struct PxClothStretchConfig
\brief Solver configuration parameters for the tether phases.
\see PxCloth.setTetherConfig()
\see PxClothFabric for information on actual tether constraints in cloth fabric.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothTetherConfig
+struct PX_DEPRECATED PxClothTetherConfig
{
/**
\brief Stiffness of the tether constraints.
@@ -136,8 +138,9 @@ struct PxClothTetherConfig
\brief Solver configuration parameters for the tether phases.
\see PxCloth.setTetherConfig()
\see PxClothFabric for information on actual tether constraints in cloth fabric.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothMotionConstraintConfig
+struct PX_DEPRECATED PxClothMotionConstraintConfig
{
/**
\brief Scale of motion constraint radii.
@@ -184,9 +187,11 @@ These shapes are all treated separately to the main PhysX rigid body scene.
\arg Virtual particles can be used to improve collision at a finer scale than the cloth sampling.
\arg Motion and separation constraints are used to limit the particle movement within or outside of a sphere.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+
@see PxPhysics.createCloth
*/
-class PxCloth : public PxActor
+class PX_DEPRECATED PxCloth : public PxActor
{
public:
/**
diff --git a/PhysX_3.4/Include/cloth/PxClothCollisionData.h b/PhysX_3.4/Include/cloth/PxClothCollisionData.h
index 6b2c4fd9..766113c3 100644
--- a/PhysX_3.4/Include/cloth/PxClothCollisionData.h
+++ b/PhysX_3.4/Include/cloth/PxClothCollisionData.h
@@ -46,8 +46,9 @@ namespace physx
\brief Sphere representation used for cloth-sphere and cloth-capsule collision.
\details Cloth can collide with spheres and capsules. Each capsule is represented by
a pair of spheres with possibly different radii.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothCollisionSphere
+struct PX_DEPRECATED PxClothCollisionSphere
{
PxVec3 pos; //!< position of the sphere
PxReal radius; //!< radius of the sphere.
@@ -64,8 +65,9 @@ struct PxClothCollisionSphere
\brief Plane representation used for cloth-convex collision.
\details Cloth can collide with convexes. Each convex is represented by
a mask of the planes that make up the convex.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothCollisionPlane
+struct PX_DEPRECATED PxClothCollisionPlane
{
PxVec3 normal; //!< The normal to the plane
PxReal distance; //!< The distance to the origin (in the normal direction)
@@ -80,8 +82,9 @@ struct PxClothCollisionPlane
/**
\brief Triangle representation used for cloth-mesh collision.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothCollisionTriangle
+struct PX_DEPRECATED PxClothCollisionTriangle
{
PxVec3 vertex0;
PxVec3 vertex1;
diff --git a/PhysX_3.4/Include/cloth/PxClothFabric.h b/PhysX_3.4/Include/cloth/PxClothFabric.h
index 994e5db9..9a67bc91 100644
--- a/PhysX_3.4/Include/cloth/PxClothFabric.h
+++ b/PhysX_3.4/Include/cloth/PxClothFabric.h
@@ -45,8 +45,9 @@ namespace physx
/**
\brief Describe type of phase in cloth fabric.
\see PxClothFabric for an explanation of concepts on phase and set.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothFabricPhaseType
+struct PX_DEPRECATED PxClothFabricPhaseType
{
enum Enum
{
@@ -62,8 +63,9 @@ struct PxClothFabricPhaseType
/**
\brief References a set of constraints that can be solved in parallel.
\see PxClothFabric for an explanation of the concepts on phase and set.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothFabricPhase
+struct PX_DEPRECATED PxClothFabricPhase
{
PxClothFabricPhase(PxClothFabricPhaseType::Enum type =
PxClothFabricPhaseType::eINVALID, PxU32 index = 0);
@@ -88,8 +90,9 @@ PX_INLINE PxClothFabricPhase::PxClothFabricPhase(
/**
\brief References all the data required to create a fabric.
\see PxPhysics.createClothFabric(), PxClothFabricCooker.getDescriptor()
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-class PxClothFabricDesc
+class PX_DEPRECATED PxClothFabricDesc
{
public:
/** \brief The number of particles needed when creating a PxCloth instance from the fabric. */
@@ -174,10 +177,12 @@ The tether anchor is the index of the other particle, and the tether length is t
these two particles are allowed to be away from each other. A tether constraint is momentum conserving
if the anchor particle has infinite mass (zero inverse weight).
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+
@see The fabric structure can be created from a mesh using PxClothFabricCreate. Alternatively, the fabric data can
be saved into a stream (see PxClothFabricCooker.save()) and later created from the stream using PxPhysics.createClothFabric(PxInputStream&).
*/
-class PxClothFabric : public PxBase
+class PX_DEPRECATED PxClothFabric : public PxBase
{
public:
/**
diff --git a/PhysX_3.4/Include/cloth/PxClothParticleData.h b/PhysX_3.4/Include/cloth/PxClothParticleData.h
index 35285d45..be10ca22 100644
--- a/PhysX_3.4/Include/cloth/PxClothParticleData.h
+++ b/PhysX_3.4/Include/cloth/PxClothParticleData.h
@@ -50,9 +50,10 @@ struct PxClothParticle;
/**
\brief Data layout descriptor for reading cloth data from the SDK.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxCloth.lockParticleData()
*/
-class PxClothParticleData : public PxLockedData
+class PX_DEPRECATED PxClothParticleData : public PxLockedData
{
public:
/**
diff --git a/PhysX_3.4/Include/cloth/PxClothTypes.h b/PhysX_3.4/Include/cloth/PxClothTypes.h
index ead83841..9cabc497 100644
--- a/PhysX_3.4/Include/cloth/PxClothTypes.h
+++ b/PhysX_3.4/Include/cloth/PxClothTypes.h
@@ -49,8 +49,10 @@ namespace physx
\details Defines flags to turn on/off features of the cloth solver.
The flag can be set during the cloth object construction (\see PxPhysics.createCloth() ),
or individually after the cloth has been created (\see PxCloth.setClothFlag() ).
+
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothFlag
+struct PX_DEPRECATED PxClothFlag
{
enum Enum
{
@@ -73,8 +75,9 @@ PX_FLAGS_OPERATORS(PxClothFlag::Enum, PxU16)
to the position during simulation.
\see PxPhysics.createCloth()
\see PxCloth.setParticles()
+ \deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
*/
-struct PxClothParticle
+struct PX_DEPRECATED PxClothParticle
{
PxVec3 pos; //!< position of the particle (in cloth local space)
PxReal invWeight; //!< inverse mass of the particle. If set to 0, the particle is fully constrained.
@@ -90,9 +93,10 @@ struct PxClothParticle
/**
\brief Constraints for cloth particle motion.
\details Defines a spherical volume to which the motion of a particle should be constrained.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxCloth.setMotionConstraints()
*/
-struct PxClothParticleMotionConstraint
+struct PX_DEPRECATED PxClothParticleMotionConstraint
{
PxVec3 pos; //!< Center of the motion constraint sphere (in cloth local space)
PxReal radius; //!< Maximum distance the particle can move away from the sphere center.
@@ -108,9 +112,10 @@ struct PxClothParticleMotionConstraint
/**
\brief Separation constraints for cloth particle movement
\details Defines a spherical volume such that corresponding particles should stay outside.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
@see PxCloth.setSeparationConstraints()
*/
-struct PxClothParticleSeparationConstraint
+struct PX_DEPRECATED PxClothParticleSeparationConstraint
{
PxVec3 pos; //!< Center of the constraint sphere (in cloth local space)
PxReal radius; //!< Radius of the constraint sphere such that the particle stay outside of this sphere.
diff --git a/PhysX_3.4/Include/common/PxPhysXCommonConfig.h b/PhysX_3.4/Include/common/PxPhysXCommonConfig.h
index 213eedd3..9dc71651 100644
--- a/PhysX_3.4/Include/common/PxPhysXCommonConfig.h
+++ b/PhysX_3.4/Include/common/PxPhysXCommonConfig.h
@@ -36,6 +36,12 @@
#include "foundation/Px.h"
+/*Temporary disable support for VS2017 for windows platform, as we wait for compiler fix:
+https://developercommunity.visualstudio.com/content/problem/66047/possible-compiler-bug.html
+*/
+#if (PX_VC == 15) && PX_WINDOWS
+#error Visual studio 2017 is not supported because of a compiler bug, support will be enabled once a fix is out.
+#endif
// define API function declaration (public API only needed because of extensions)
#if defined PX_PHYSX_STATIC_LIB || defined PX_PHYSX_CORE_STATIC_LIB
@@ -54,6 +60,25 @@
#endif
#endif
+#if PX_SUPPORT_GPU_PHYSX
+
+// define API function declaration
+#if PX_WINDOWS
+#if defined PX_PHYSX_GPU_EXPORTS
+#define PX_PHYSX_GPU_API __declspec(dllexport)
+#else
+#define PX_PHYSX_GPU_API __declspec(dllimport)
+#endif
+#elif PX_UNIX_FAMILY
+#define PX_PHYSX_GPU_API PX_UNIX_EXPORT
+#else
+#define PX_PHYSX_GPU_API
+#endif
+
+#else // PX_SUPPORT_GPU_PHYSX
+#define PX_PHYSX_GPU_API
+#endif // PX_SUPPORT_GPU_PHYSX
+
#if PX_WINDOWS && !defined(__CUDACC__)
#if defined PX_PHYSX_COMMON_EXPORTS
#define PX_PHYSX_COMMON_API __declspec(dllexport)
diff --git a/PhysX_3.4/Include/common/windows/PxWindowsDelayLoadHook.h b/PhysX_3.4/Include/common/windows/PxWindowsDelayLoadHook.h
index 4dd60cb4..f2cd06ff 100644
--- a/PhysX_3.4/Include/common/windows/PxWindowsDelayLoadHook.h
+++ b/PhysX_3.4/Include/common/windows/PxWindowsDelayLoadHook.h
@@ -34,11 +34,6 @@
#include "foundation/PxPreprocessor.h"
#include "foundation/windows/PxWindowsFoundationDelayLoadHook.h"
#include "common/PxPhysXCommonConfig.h"
-#if PX_SUPPORT_GPU_PHYSX
-#include "Pxg.h"
-#else
-#define PX_PHYSX_GPU_API
-#endif
/** \addtogroup foundation
@{
diff --git a/PhysX_3.4/Include/extensions/PxBinaryConverter.h b/PhysX_3.4/Include/extensions/PxBinaryConverter.h
index 2ef86edc..bb923682 100644
--- a/PhysX_3.4/Include/extensions/PxBinaryConverter.h
+++ b/PhysX_3.4/Include/extensions/PxBinaryConverter.h
@@ -95,6 +95,16 @@ public:
virtual bool setMetaData(PxInputStream& srcMetaData, PxInputStream& dstMetaData) = 0;
/**
+ \brief Test utility function to compare two sets of meta data.
+
+ The meta data needs to be set before calling the compareMetaData method.
+ This method will issue PxErrorCode::eDEBUG_INFO messages if mismatches are encountered.
+
+ \return True if meta data is equivalend
+ */
+ virtual bool compareMetaData() const = 0;
+
+ /**
\brief Converts binary stream from source platform to target platform
The converter needs to be configured with source and destination meta data before calling the conversion method.
diff --git a/PhysX_3.4/Include/extensions/PxClothFabricCooker.h b/PhysX_3.4/Include/extensions/PxClothFabricCooker.h
index 8ace189c..52086950 100644
--- a/PhysX_3.4/Include/extensions/PxClothFabricCooker.h
+++ b/PhysX_3.4/Include/extensions/PxClothFabricCooker.h
@@ -48,7 +48,10 @@ class PxPhysics;
struct PxFabricCookerImpl;
-class PxClothFabricCooker
+/**
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+*/
+class PX_DEPRECATED PxClothFabricCooker
{
public:
/**
diff --git a/PhysX_3.4/Include/extensions/PxClothMeshDesc.h b/PhysX_3.4/Include/extensions/PxClothMeshDesc.h
index 18d686a6..30527a0f 100644
--- a/PhysX_3.4/Include/extensions/PxClothMeshDesc.h
+++ b/PhysX_3.4/Include/extensions/PxClothMeshDesc.h
@@ -45,10 +45,12 @@ namespace physx
/**
\brief Descriptor class for a cloth mesh.
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+
@see PxCooking.cookClothMesh()
*/
-class PxClothMeshDesc
+class PX_DEPRECATED PxClothMeshDesc
{
public:
diff --git a/PhysX_3.4/Include/extensions/PxClothMeshQuadifier.h b/PhysX_3.4/Include/extensions/PxClothMeshQuadifier.h
index aab8d9f9..82f7d6dd 100644
--- a/PhysX_3.4/Include/extensions/PxClothMeshQuadifier.h
+++ b/PhysX_3.4/Include/extensions/PxClothMeshQuadifier.h
@@ -41,7 +41,10 @@ namespace physx
struct PxClothMeshQuadifierImpl;
-class PxClothMeshQuadifier
+/**
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+*/
+class PX_DEPRECATED PxClothMeshQuadifier
{
public:
/**
diff --git a/PhysX_3.4/Include/extensions/PxClothTetherCooker.h b/PhysX_3.4/Include/extensions/PxClothTetherCooker.h
index d095f390..6817df99 100644
--- a/PhysX_3.4/Include/extensions/PxClothTetherCooker.h
+++ b/PhysX_3.4/Include/extensions/PxClothTetherCooker.h
@@ -41,7 +41,10 @@ namespace physx
struct PxClothSimpleTetherCookerImpl;
-class PxClothSimpleTetherCooker
+/**
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+*/
+class PX_DEPRECATED PxClothSimpleTetherCooker
{
public:
/**
@@ -71,7 +74,10 @@ private:
struct PxClothGeodesicTetherCookerImpl;
-class PxClothGeodesicTetherCooker
+/**
+\deprecated The PhysX cloth feature has been deprecated in PhysX version 3.4.1
+*/
+class PX_DEPRECATED PxClothGeodesicTetherCooker
{
public:
/**
diff --git a/PhysX_3.4/Include/extensions/PxDefaultAllocator.h b/PhysX_3.4/Include/extensions/PxDefaultAllocator.h
index c9b96e0d..a2f8f8be 100644
--- a/PhysX_3.4/Include/extensions/PxDefaultAllocator.h
+++ b/PhysX_3.4/Include/extensions/PxDefaultAllocator.h
@@ -40,7 +40,7 @@
#include <stdlib.h>
-#if PX_WINDOWS || PX_LINUX_FAMILY || PX_NX
+#if PX_WINDOWS || PX_LINUX_FAMILY || PX_SWITCH
#include <malloc.h>
#endif
@@ -60,7 +60,7 @@ PX_FORCE_INLINE void platformAlignedFree(void* ptr)
{
_aligned_free(ptr);
}
-#elif PX_LINUX_FAMILY || PX_NX
+#elif PX_LINUX_FAMILY || PX_SWITCH
PX_FORCE_INLINE void* platformAlignedAlloc(size_t size)
{
return ::memalign(16, size);
diff --git a/PhysX_3.4/Include/geometry/PxConvexMeshGeometry.h b/PhysX_3.4/Include/geometry/PxConvexMeshGeometry.h
index 3500f10b..af6f0d81 100644
--- a/PhysX_3.4/Include/geometry/PxConvexMeshGeometry.h
+++ b/PhysX_3.4/Include/geometry/PxConvexMeshGeometry.h
@@ -88,7 +88,8 @@ public:
PX_INLINE PxConvexMeshGeometry() :
PxGeometry (PxGeometryType::eCONVEXMESH),
scale (PxMeshScale(1.0f)),
- convexMesh (NULL)
+ convexMesh (NULL),
+ maxMargin (3.4e38f)
{}
/**
@@ -96,14 +97,17 @@ public:
\param[in] mesh Mesh pointer. May be NULL, though this will not make the object valid for shape construction.
\param[in] scaling Scale factor.
\param[in] flags Mesh flags.
+ \param[in] margin The maximum margin. Used to limit how much PCM shrinks the geometry by in collision detection.
\
*/
PX_INLINE PxConvexMeshGeometry( PxConvexMesh* mesh,
const PxMeshScale& scaling = PxMeshScale(),
- PxConvexMeshGeometryFlags flags = PxConvexMeshGeometryFlags()) :
+ PxConvexMeshGeometryFlags flags = PxConvexMeshGeometryFlags(),
+ float margin = 3.4e38f) :
PxGeometry (PxGeometryType::eCONVEXMESH),
scale (scaling),
convexMesh (mesh),
+ maxMargin (margin),
meshFlags(flags)
{
}
@@ -123,6 +127,7 @@ public:
public:
PxMeshScale scale; //!< The scaling transformation (from vertex space to shape space).
PxConvexMesh* convexMesh; //!< A reference to the convex mesh object.
+ PxReal maxMargin; //!< Max shrunk amount permitted by PCM contact gen
PxConvexMeshGeometryFlags meshFlags; //!< Mesh flags.
PxPadding<3> paddingFromFlags; //!< padding for mesh flags
};
@@ -138,6 +143,9 @@ PX_INLINE bool PxConvexMeshGeometry::isValid() const
return false;
if(!convexMesh)
return false;
+ if (maxMargin < 0.0f)
+ return false;
+
return true;
}
diff --git a/PhysX_3.4/Include/solver/PxSolverDefs.h b/PhysX_3.4/Include/solver/PxSolverDefs.h
index 0d148185..72f94633 100644
--- a/PhysX_3.4/Include/solver/PxSolverDefs.h
+++ b/PhysX_3.4/Include/solver/PxSolverDefs.h
@@ -128,27 +128,24 @@ struct PxSolverConstraintDesc
Dy::FsData* articulationB; //!< Articulation pointer for body B
};
PxU16 linkIndexA; //!< Link index defining which link in Articulation A this constraint affects. If not an articulation, must be NO_LINK
+ PxU16 linkIndexB; //!< Link index defining which link in Articulation B this constraint affects. If not an articulation, must be NO_LINK.
union
{
PxU16 articulationALength; //!< The total length of articulation A in multiples of 16 bytes
- PxU16 bodyADataIndex; //!< Body A's index into the SolverBodyData array
+ PxU32 bodyADataIndex; //!< Body A's index into the SolverBodyData array
};
- PxU16 linkIndexB; //!< Link index defining which link in Articulation B this constraint affects. If not an articulation, must be NO_LINK.
union
{
PxU16 articulationBLength; //!< The total lengh of articulation B in multiples of 16 bytes.
- PxU16 bodyBDataIndex; //!< Body B's index into the SolverBodyData array
+ PxU32 bodyBDataIndex; //!< Body B's index into the SolverBodyData array
};
-
- PxU8* constraint; //!< Pointer to the constraint rows to be solved
- void* writeBack; //!< Pointer to the writeback structure results for this given constraint are to be written to
PxU16 writeBackLengthOver4; //!< writeBackLength/4, max writeback length is 256K, allows PxSolverConstraintDesc to fit in 32 bytes
PxU16 constraintLengthOver16; //!< constraintLength/16, max constraint length is 1MB, allows PxSolverConstraintDesc to fit in 32 bytes
- PxU16 bodyASolverProgress; //!< Required solver progress for this constraint
- PxU16 bodyBSolverProgress; //!< Required sovler progress for this constraint.
+ PxU8* constraint; //!< Pointer to the constraint rows to be solved
+ void* writeBack; //!< Pointer to the writeback structure results for this given constraint are to be written to
};
struct PxSolverConstraintPrepDescBase