| 172 | } |
| 173 | |
| 174 | void RenderBaseActor::setPhysicsShape(PxShape* shape, PxRigidActor* actor) |
| 175 | { |
| 176 | mPhysicsShape = shape; |
| 177 | mPhysicsActor = actor; |
| 178 | |
| 179 | if(shape) |
| 180 | { |
| 181 | mCCDWitness = getShapeCenter(actor, shape, mCCDWitnessOffset); |
| 182 | |
| 183 | const PxTransform newPose = PxShapeExt::getGlobalPose(*shape, *actor); |
| 184 | setTransform(PxTransform(newPose.p, newPose.q * mPhysicsToGraphicsRot)); |
| 185 | |
| 186 | PxRigidActor& ra = *actor; |
| 187 | mDynamicActor = ra.is<PxRigidDynamic>(); |
| 188 | mArticulationLink = ra.is<PxArticulationLink>(); |
| 189 | mWorldBounds = PxShapeExt::getWorldBounds(*mPhysicsShape, *mPhysicsActor); |
| 190 | } |
| 191 | else |
| 192 | { |
| 193 | mDynamicActor = NULL; |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | void RenderBaseActor::setRenderMaterial(RenderMaterial* material) |
| 198 | { |
no test coverage detected