aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
diff options
context:
space:
mode:
authorsschirm <[email protected]>2017-01-06 14:45:46 +0100
committersschirm <[email protected]>2017-01-06 14:45:46 +0100
commitc7a921796332e8fcd51f3e05c1a318a41282e1e2 (patch)
tree770db0c76e954045fe5178a36a7519b26df6942a /PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
parentPhysX 3.4, APEX 1.4 release candidate update: @21511067-21511214 (diff)
downloadphysx-3.4-c7a921796332e8fcd51f3e05c1a318a41282e1e2.tar.xz
physx-3.4-c7a921796332e8fcd51f3e05c1a318a41282e1e2.zip
PhysX 3.4, APEX 1.4 release candidate update: @21542069
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;
};
}