aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/LowLevelAABB/include
diff options
context:
space:
mode:
authorSheikh Dawood <[email protected]>2018-04-09 10:13:48 -0500
committerSheikh Dawood <[email protected]>2018-04-09 10:13:48 -0500
commit238605d8225a9135d6b60646e05d066e25424eee (patch)
tree2b013bd4946bb3c699d7a06ef1f21be85d367f63 /PhysX_3.4/Source/LowLevelAABB/include
parentAdd ParamTool.exe (diff)
downloadphysx-3.4-238605d8225a9135d6b60646e05d066e25424eee.tar.xz
physx-3.4-238605d8225a9135d6b60646e05d066e25424eee.zip
PhysX 3.4, APEX 1.4 patch release @23879214
Diffstat (limited to 'PhysX_3.4/Source/LowLevelAABB/include')
-rw-r--r--PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhase.h33
-rw-r--r--PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhaseUpdate.h5
-rw-r--r--PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h15
3 files changed, 18 insertions, 35 deletions
diff --git a/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhase.h b/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhase.h
index f30b41d0..5d96af54 100644
--- a/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhase.h
+++ b/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhase.h
@@ -180,38 +180,21 @@ BroadPhaseUpdateData::mCreated used by BroadPhase::update
*/
struct BroadPhasePair
{
- BroadPhasePair(ShapeHandle volA, ShapeHandle volB, void* userData)
+ BroadPhasePair(ShapeHandle volA, ShapeHandle volB) :
+ mVolA (PxMin(volA, volB)),
+ mVolB (PxMax(volA, volB))
{
- mVolA=PxMin(volA,volB);
- mVolB=PxMax(volA,volB);
- mUserData = userData;
}
- BroadPhasePair()
- : mVolA(BP_INVALID_BP_HANDLE),
- mVolB(BP_INVALID_BP_HANDLE),
- mUserData(NULL)
+ BroadPhasePair() :
+ mVolA (BP_INVALID_BP_HANDLE),
+ mVolB (BP_INVALID_BP_HANDLE)
{
}
ShapeHandle mVolA; // NB: mVolA < mVolB
ShapeHandle mVolB;
- void* mUserData;
};
-struct BroadPhasePairReport : public BroadPhasePair
-{
- PxU32 mHandle;
-
- BroadPhasePairReport(ShapeHandle volA, ShapeHandle volB, void* userData, PxU32 handle) : BroadPhasePair(volA, volB, userData), mHandle(handle)
- {
- }
-
- BroadPhasePairReport() : BroadPhasePair(), mHandle(BP_INVALID_BP_HANDLE)
- {
- }
-};
-
-
class BroadPhase : public BroadPhaseBase
{
public:
@@ -288,7 +271,7 @@ public:
The rule that minima(maxima) are even(odd) (see BroadPhaseUpdateData) removes the ambiguity of touching bounds.
*/
- virtual BroadPhasePairReport* getCreatedPairs() = 0;
+ virtual BroadPhasePair* getCreatedPairs() = 0;
/**
\brief Return the number of deleted overlap pairs computed in the execution of update() that has just completed.
@@ -304,7 +287,7 @@ public:
It is impossible for the same pair to appear simultaneously in the list of created and deleted pairs.
The test for overlap is conservative throughout, meaning that deleted pairs do not include touching pairs.
*/
- virtual BroadPhasePairReport* getDeletedPairs() = 0;
+ virtual BroadPhasePair* getDeletedPairs() = 0;
/**
\brief After the broadphase has completed its update() function and the created/deleted pairs have been queried
diff --git a/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhaseUpdate.h b/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhaseUpdate.h
index 08826da1..c6c738f1 100644
--- a/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhaseUpdate.h
+++ b/PhysX_3.4/Source/LowLevelAABB/include/BpBroadPhaseUpdate.h
@@ -103,11 +103,10 @@ public:
MAX_Z
};
- IntegerAABB();
-
IntegerAABB(const PxBounds3& b, PxReal contactDistance)
{
- encode(PxBounds3(b.minimum-PxVec3(contactDistance), b.maximum+PxVec3(contactDistance)));
+ const PxVec3 dist(contactDistance);
+ encode(PxBounds3(b.minimum - dist, b.maximum + dist));
}
/*
diff --git a/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h b/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h
index 89e231c8..0cc146bc 100644
--- a/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h
+++ b/PhysX_3.4/Source/LowLevelAABB/include/BpSimpleAABBManager.h
@@ -67,7 +67,7 @@ namespace Bp
typedef PxU32 AggregateHandle; // PT: currently an index in mAggregates array
typedef PxU32 ActorHandle;
- struct BroadPhasePairReport;
+ struct BroadPhasePair;
struct VolumeBuckets
{
@@ -89,15 +89,16 @@ namespace Bp
struct AABBOverlap
{
PX_FORCE_INLINE AABBOverlap() {}
- PX_FORCE_INLINE AABBOverlap(void* userData0, void* userData1, ActorHandle pairHandle) : mUserData0(userData0), mUserData1(userData1), mPairHandle(pairHandle) {}
+ PX_FORCE_INLINE AABBOverlap(void* userData0, void* userData1/*, ActorHandle pairHandle*/) : mUserData0(userData0), mUserData1(userData1)/*, mPairHandle(pairHandle)*/, mPairUserData(NULL) {}
void* mUserData0;
void* mUserData1;
- union
+/* union
{
ActorHandle mPairHandle; //For created pairs, this is the index into the pair in the pair manager
- void* mUserData; //For deleted pairs, this is the user data written by the application to the pair
- };
+ void* mPairUserData; //For deleted pairs, this is the user data written by the application to the pair
+ };*/
+ void* mPairUserData; //For deleted pairs, this is the user data written by the application to the pair
};
/*
@@ -528,8 +529,8 @@ namespace Bp
void updatePairs(PersistentPairs& p);
void handleOriginShift();
public:
- void processBPCreatedPair(const BroadPhasePairReport& pair);
- void processBPDeletedPair(const BroadPhasePairReport& pair);
+ void processBPCreatedPair(const BroadPhasePair& pair);
+ void processBPDeletedPair(const BroadPhasePair& pair);
// bool checkID(ShapeHandle id);
friend class PersistentActorAggregatePair;
friend class PersistentAggregateAggregatePair;