From d1c812f1162e5fdb13c215792725b2591d7428f5 Mon Sep 17 00:00:00 2001 From: Sheikh Dawood Abdul Ajees Date: Fri, 15 Sep 2017 15:41:57 -0500 Subject: PhysX 3.4.1, APEX 1.4.1 Release @22845541 --- .../Source/SimulationController/src/ScRigidSim.cpp | 25 +++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'PhysX_3.4/Source/SimulationController/src/ScRigidSim.cpp') diff --git a/PhysX_3.4/Source/SimulationController/src/ScRigidSim.cpp b/PhysX_3.4/Source/SimulationController/src/ScRigidSim.cpp index dd4829bd..573f7bb1 100644 --- a/PhysX_3.4/Source/SimulationController/src/ScRigidSim.cpp +++ b/PhysX_3.4/Source/SimulationController/src/ScRigidSim.cpp @@ -68,12 +68,31 @@ Sc::RigidSim::~RigidSim() scScene.getRigidIDTracker().releaseID(mRigidId); } +bool notifyActorInteractionsOfTransformChange(Sc::ActorSim& actor); void Sc::RigidSim::notifyShapesOfTransformChange() { - for(ElementSim* e = getElements_(); e!=0; e = e->mNextInActor) + if(0) { - if(e->getElementType() == ElementType::eSHAPE) - static_cast(e)->onVolumeOrTransformChange(true); + for(ElementSim* e = getElements_(); e!=0; e = e->mNextInActor) + { + if(e->getElementType() == ElementType::eSHAPE) + static_cast(e)->onVolumeOrTransformChange(true); + } + } + else + { + const bool isDynamic = notifyActorInteractionsOfTransformChange(*this); + + ElementSim* current = getElements_(); + while(current) + { + if(current->getElementType() == ElementType::eSHAPE) + { + ShapeSim* sim = static_cast(current); + sim->markBoundsForUpdate(false, isDynamic); + } + current = current->mNextInActor; + } } } -- cgit v1.2.3