diff options
Diffstat (limited to 'PhysX_3.4/Source/SimulationController/src')
| -rw-r--r-- | PhysX_3.4/Source/SimulationController/src/ScElementSim.cpp | 5 | ||||
| -rw-r--r-- | PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp | 9 |
2 files changed, 11 insertions, 3 deletions
diff --git a/PhysX_3.4/Source/SimulationController/src/ScElementSim.cpp b/PhysX_3.4/Source/SimulationController/src/ScElementSim.cpp index 9d9b2a7c..9ff82819 100644 --- a/PhysX_3.4/Source/SimulationController/src/ScElementSim.cpp +++ b/PhysX_3.4/Source/SimulationController/src/ScElementSim.cpp @@ -119,8 +119,13 @@ void Sc::ElementSim::setElementInteractionsDirty(InteractionDirtyFlag::Enum flag // we pun these constants in order to increment the stats when adding and removing from BP PX_COMPILE_TIME_ASSERT(PxU32(PxSimulationStatistics::eRIGID_BODY) == PxU32(Sc::ElementType::eSHAPE)); +#if PX_USE_CLOTH_API PX_COMPILE_TIME_ASSERT(PxU32(PxSimulationStatistics::eCLOTH) == PxU32(Sc::ElementType::eCLOTH)); +#endif + +#if PX_USE_PARTICLE_SYSTEM_API PX_COMPILE_TIME_ASSERT(PxU32(PxSimulationStatistics::ePARTICLE_SYSTEM) == PxU32(Sc::ElementType::ePARTICLE_PACKET)); +#endif void Sc::ElementSim::addToAABBMgr(PxReal contactDistance, PxU32 group, bool isTrigger) { diff --git a/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp b/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp index 06474839..cb3b5f66 100644 --- a/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp +++ b/PhysX_3.4/Source/SimulationController/src/ScShapeSim.cpp @@ -100,10 +100,13 @@ void Sc::ShapeSim::initSubsystemsDependingOnElementID() PX_PROFILE_ZONE("API.simAddShapeToBroadPhase", scScene.getContextId()); if(isBroadPhase(mCore.getFlags())) { - internalAddToBroadPhase(); - - scScene.updateContactDistance(index, getContactOffset()); + internalAddToBroadPhase(); + } + else + { + scScene.getAABBManager()->reserveSpaceForBounds(index); } + scScene.updateContactDistance(index, getContactOffset()); } if(scScene.getDirtyShapeSimMap().size() <= index) |