| 114 | |
| 115 | |
| 116 | void NpRigidDynamic::setKinematicTarget(const PxTransform& destination) |
| 117 | { |
| 118 | PX_CHECK_AND_RETURN(destination.isSane(), "PxRigidDynamic::setKinematicTarget: destination is not valid."); |
| 119 | NP_WRITE_CHECK(NpActor::getOwnerScene(*this)); |
| 120 | |
| 121 | #if PX_CHECKED |
| 122 | NpScene* scene = NpActor::getAPIScene(*this); |
| 123 | if(scene) |
| 124 | scene->checkPositionSanity(*this, destination, "PxRigidDynamic::setKinematicTarget"); |
| 125 | |
| 126 | Scb::Body& b = getScbBodyFast(); |
| 127 | PX_CHECK_AND_RETURN((b.getFlags() & PxRigidBodyFlag::eKINEMATIC), "PxRigidDynamic::setKinematicTarget: Body must be kinematic!"); |
| 128 | PX_CHECK_AND_RETURN(scene, "PxRigidDynamic::setKinematicTarget: Body must be in a scene!"); |
| 129 | PX_CHECK_AND_RETURN(!(b.getActorFlags() & PxActorFlag::eDISABLE_SIMULATION), "PxRigidDynamic::setKinematicTarget: Not allowed if PxActorFlag::eDISABLE_SIMULATION is set!"); |
| 130 | #endif |
| 131 | |
| 132 | setKinematicTargetInternal(destination.getNormalized()); |
| 133 | } |
| 134 | |
| 135 | |
| 136 | bool NpRigidDynamic::getKinematicTarget(PxTransform& target) const |
no test coverage detected