aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/PhysXCooking/src/convex
diff options
context:
space:
mode:
authorSheikh Dawood <[email protected]>2018-05-25 09:54:38 -0500
committerSheikh Dawood <[email protected]>2018-05-25 09:54:38 -0500
commitb99b3783cd7e3fb1bb0a07dc472b2fc000c4cdc1 (patch)
treede67d7adc7cc66d44c3e0a399d94d1db6bcebd0c /PhysX_3.4/Source/PhysXCooking/src/convex
parentPhysX 3.4, APEX 1.4 patch release @23933511 (diff)
downloadphysx-3.4-b99b3783cd7e3fb1bb0a07dc472b2fc000c4cdc1.tar.xz
physx-3.4-b99b3783cd7e3fb1bb0a07dc472b2fc000c4cdc1.zip
PhysX 3.4, APEX 1.4 patch release @24214033v3.4.2
Diffstat (limited to 'PhysX_3.4/Source/PhysXCooking/src/convex')
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.cpp15
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.h2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.cpp2
-rw-r--r--PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.h2
18 files changed, 26 insertions, 23 deletions
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.cpp
index 0021d3a4..86ff5ae1 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
@@ -112,18 +112,21 @@ bool BigConvexDataBuilder::computeValencies(const ConvexHullBuilder& meshBuilder
const PxU32 numVertices = meshBuilder.mHull->mNbHullVertices;
mSVM->mData.mNbVerts = numVertices;
- // Get ram for valencies
- mSVM->mData.mValencies = PX_NEW(Gu::Valency)[mSVM->mData.mNbVerts];
+ // Get ram for valencies and adjacent verts
+ const PxU32 numAlignedVerts = (numVertices+3)&~3;
+ const PxU32 TotalSize = sizeof(Gu::Valency)*numAlignedVerts + sizeof(PxU8)*meshBuilder.mHull->mNbEdges*2u;
+ mSVM->mVBuffer = PX_ALLOC(TotalSize, "BigConvexData data");
+ mSVM->mData.mValencies = reinterpret_cast<Gu::Valency*>(mSVM->mVBuffer);
+ mSVM->mData.mAdjacentVerts = (reinterpret_cast<PxU8*>(mSVM->mVBuffer)) + sizeof(Gu::Valency)*numAlignedVerts;
+
PxMemZero(mSVM->mData.mValencies, numVertices*sizeof(Gu::Valency));
PxU8 vertexMarker[256];
PxMemZero(vertexMarker,numVertices);
- // Get ram for adjacent vertices references
- mSVM->mData.mAdjacentVerts = PX_NEW(PxU8)[meshBuilder.mHull->mNbEdges*2u];
// Compute valencies
for (PxU32 i = 0; i < meshBuilder.mHull->mNbPolygons; i++)
{
- PxU32 numVerts = meshBuilder.mHullDataPolygons[i].mNbVerts;
+ const PxU32 numVerts = meshBuilder.mHullDataPolygons[i].mNbVerts;
const PxU8* Data = meshBuilder.mHullDataVertexData8 + meshBuilder.mHullDataPolygons[i].mVRef8;
for (PxU32 j = 0; j < numVerts; j++)
{
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.h b/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.h
index 00c1db44..8ca93b80 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/BigConvexDataBuilder.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp
index 35dac326..24e8b6f1 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.h b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.h
index da0ffaf3..adf9739f 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullBuilder.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.cpp
index 90e8a66b..b82b612f 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullLib.h
index 06ff9adc..4d8885fe 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-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.cpp
index 947a674c..67f609ec 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.h b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.h
index ccdcd70e..4f73785a 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexHullUtils.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.cpp
index 851368c4..1c8fcf49 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.h b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.h
index e81c68cc..ebe1c005 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexMeshBuilder.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.cpp
index 68b53230..ddc01e57 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.h b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.h
index 2ee991af..e811602e 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/ConvexPolygonsBuilder.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.cpp
index e4fd034f..96016cfd 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.h b/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.h
index ee03a15d..ce143c71 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/InflationConvexHullLib.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp
index 5d933f73..a3e98f21 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.h b/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.h
index 0a9df992..5cf3c70c 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/QuickHullConvexHullLib.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.cpp b/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.cpp
index 4ccb53b0..fdd5fe0d 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.cpp
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.cpp
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.
diff --git a/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.h b/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.h
index fd628ee6..feef3864 100644
--- a/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.h
+++ b/PhysX_3.4/Source/PhysXCooking/src/convex/VolumeIntegration.h
@@ -23,7 +23,7 @@
// components in life support devices or systems without express written approval of
// NVIDIA Corporation.
//
-// Copyright (c) 2008-2017 NVIDIA Corporation. All rights reserved.
+// Copyright (c) 2008-2018 NVIDIA Corporation. All rights reserved.
// Copyright (c) 2004-2008 AGEIA Technologies, Inc. All rights reserved.
// Copyright (c) 2001-2004 NovodeX AG. All rights reserved.