| 992 | } |
| 993 | |
| 994 | PxRigidDynamic* SampleLargeWorld::createBox(const PxVec3& pos, const PxVec3& dims, const PxVec3* linVel, RenderMaterial* material, PxReal density) |
| 995 | { |
| 996 | PxSceneWriteLock scopedLock(*mScene); |
| 997 | |
| 998 | PxRigidDynamic* box = PxCreateDynamic(*mPhysics, PxTransform(pos), PxBoxGeometry(dims), *mMaterial, density); |
| 999 | PX_ASSERT(box); |
| 1000 | |
| 1001 | box->setActorFlag(PxActorFlag::eVISUALIZATION, true); |
| 1002 | box->setAngularDamping(0.5f); |
| 1003 | |
| 1004 | //Enable ccd of dynamic generated box |
| 1005 | PxShape* boxShape = getShape(*box); |
| 1006 | setCCDActive(*boxShape); |
| 1007 | |
| 1008 | boxShape->setQueryFilterData(PxFilterData(PICKING_COLLISION_GROUP,0,0,0)); |
| 1009 | |
| 1010 | getActiveScene().addActor(*box); |
| 1011 | |
| 1012 | if(linVel) |
| 1013 | box->setLinearVelocity(*linVel); |
| 1014 | |
| 1015 | createRenderObjectsFromActor(box, material); |
| 1016 | |
| 1017 | return box; |
| 1018 | } |
| 1019 | |
| 1020 | void SampleLargeWorld::setCollisionGroup(PxRigidActor* actor, PxU32 group) |
| 1021 | { |
nothing calls this directly
no test coverage detected