MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / advancePrevPoseToToi

Method advancePrevPoseToToi

physx/source/lowlevel/software/src/PxsCCD.cpp:1964–1983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1962}
1963
1964void PxsRigidBody::advancePrevPoseToToi(PxReal toi)
1965{
1966 //If this is kinematic, just return
1967 if (isKinematic())
1968 return;
1969
1970 //update latest pose
1971 PxVec3 newLastP = mLastTransform.p*(1.0f-toi) + mCore->body2World.p*toi; // advance mLastTransform position to toi
1972 mLastTransform.p = newLastP;
1973#if CCD_ROTATION_LOCKING
1974 mCore->body2World.q = getLastCCDTransform().q;
1975#else
1976 // slerp from last transform to current transform with ratio of toi
1977 PxQuat newLastQ = slerp(toi, getLastCCDTransform().q, mCore->body2World.q); // advance mLastTransform rotation to toi
1978 mLastTransform.q = newLastQ;
1979#endif
1980
1981
1982
1983}
1984
1985
1986void PxsRigidBody::advanceToToi(PxReal toi, PxReal dt, bool clip)

Callers 2

sweepAdvanceToToiMethod · 0.80
runInternalMethod · 0.80

Calls 1

isKinematicFunction · 0.85

Tested by

no test coverage detected