| 2342 | /////////////////////////////////////////////////////////////////////////////// |
| 2343 | |
| 2344 | PxRigidDynamic* PhysXSample::createBox(const PxVec3& pos, const PxVec3& dims, const PxVec3* linVel, RenderMaterial* material, PxReal density) |
| 2345 | { |
| 2346 | PxSceneWriteLock scopedLock(*mScene); |
| 2347 | PxRigidDynamic* box = PxCreateDynamic(*mPhysics, PxTransform(pos), PxBoxGeometry(dims), *mMaterial, density); |
| 2348 | PX_ASSERT(box); |
| 2349 | |
| 2350 | SetupDefaultRigidDynamic(*box); |
| 2351 | mScene->addActor(*box); |
| 2352 | addPhysicsActors(box); |
| 2353 | |
| 2354 | if(linVel) |
| 2355 | box->setLinearVelocity(*linVel); |
| 2356 | |
| 2357 | createRenderObjectsFromActor(box, material); |
| 2358 | |
| 2359 | return box; |
| 2360 | } |
| 2361 | |
| 2362 | /////////////////////////////////////////////////////////////////////////////// |
| 2363 |
no test coverage detected