aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
diff options
context:
space:
mode:
Diffstat (limited to 'PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h')
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
index 19ab68fe..cd8f766e 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2016 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
@@ -45,7 +45,8 @@ namespace physx
public:
// functions
ConvexHullLib(const PxConvexMeshDesc& desc, const PxCookingParams& params)
- : mConvexMeshDesc(desc), mCookingParams(params), mSwappedIndices(NULL)
+ : mConvexMeshDesc(desc), mCookingParams(params), mSwappedIndices(NULL),
+ mShiftedVerts(NULL)
{
}
@@ -70,12 +71,25 @@ namespace physx
PxVec3& scale, // scale
PxVec3& center); // center
+ // shift vertices around origin and clean input vertices from duplicates, normalize etc.
+ bool shiftAndcleanupVertices(PxU32 svcount, // input vertex count
+ const PxVec3* svertices, // vertices
+ PxU32 stride, // stride
+ PxU32& vcount, // output number of vertices
+ PxVec3* vertices, // location to store the results.
+ PxVec3& scale, // scale
+ PxVec3& center); // center
+
void swapLargestFace(PxConvexMeshDesc& desc);
+ void shiftConvexMeshDesc(PxConvexMeshDesc& desc);
+
protected:
const PxConvexMeshDesc& mConvexMeshDesc;
const PxCookingParams& mCookingParams;
- PxU32* mSwappedIndices;
+ PxU32* mSwappedIndices;
+ PxVec3 mOriginShift;
+ PxVec3* mShiftedVerts;
};
}