| 1962 | } |
| 1963 | |
| 1964 | void 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 | |
| 1986 | void PxsRigidBody::advanceToToi(PxReal toi, PxReal dt, bool clip) |
no test coverage detected