| 2405 | /////////////////////////////////////////////////////////////////////////////// |
| 2406 | |
| 2407 | PxRigidDynamic* PhysXSample::createConvex(const PxVec3& pos, const PxVec3* linVel, RenderMaterial* material, PxReal density) |
| 2408 | { |
| 2409 | PxSceneWriteLock scopedLock(*mScene); |
| 2410 | PxConvexMesh* convexMesh = GenerateConvex(*mPhysics, *mCooking, getDebugConvexObjectScale(), false, true); |
| 2411 | PX_ASSERT(convexMesh); |
| 2412 | |
| 2413 | PxRigidDynamic* convex = PxCreateDynamic(*mPhysics, PxTransform(pos), PxConvexMeshGeometry(convexMesh), *mMaterial, density); |
| 2414 | PX_ASSERT(convex); |
| 2415 | |
| 2416 | SetupDefaultRigidDynamic(*convex); |
| 2417 | mScene->addActor(*convex); |
| 2418 | addPhysicsActors(convex); |
| 2419 | |
| 2420 | if(linVel) |
| 2421 | convex->setLinearVelocity(*linVel); |
| 2422 | |
| 2423 | createRenderObjectsFromActor(convex, material); |
| 2424 | |
| 2425 | return convex; |
| 2426 | } |
| 2427 | |
| 2428 | /////////////////////////////////////////////////////////////////////////////// |
| 2429 |
nothing calls this directly
no test coverage detected