| 2362 | /////////////////////////////////////////////////////////////////////////////// |
| 2363 | |
| 2364 | PxRigidDynamic* PhysXSample::createSphere(const PxVec3& pos, PxReal radius, const PxVec3* linVel, RenderMaterial* material, PxReal density) |
| 2365 | { |
| 2366 | PxSceneWriteLock scopedLock(*mScene); |
| 2367 | PxRigidDynamic* sphere = PxCreateDynamic(*mPhysics, PxTransform(pos), PxSphereGeometry(radius), *mMaterial, density); |
| 2368 | PX_ASSERT(sphere); |
| 2369 | |
| 2370 | SetupDefaultRigidDynamic(*sphere); |
| 2371 | mScene->addActor(*sphere); |
| 2372 | addPhysicsActors(sphere); |
| 2373 | |
| 2374 | if(linVel) |
| 2375 | sphere->setLinearVelocity(*linVel); |
| 2376 | |
| 2377 | createRenderObjectsFromActor(sphere, material); |
| 2378 | |
| 2379 | return sphere; |
| 2380 | } |
| 2381 | |
| 2382 | /////////////////////////////////////////////////////////////////////////////// |
| 2383 |
nothing calls this directly
no test coverage detected