aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Include/geometry
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/geometry
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/geometry')
-rw-r--r--PhysX_3.4/Include/geometry/PxConvexMeshGeometry.h12
1 files changed, 10 insertions, 2 deletions
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;
}