MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / createCompound

Method createCompound

physx/samples/samplebase/PhysXSample.cpp:2430–2442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2428///////////////////////////////////////////////////////////////////////////////
2429
2430PxRigidDynamic* PhysXSample::createCompound(const PxVec3& pos, const std::vector<PxTransform>& localPoses, const std::vector<const PxGeometry*>& geometries, const PxVec3* linVel, RenderMaterial* material, PxReal density)
2431{
2432 PxSceneWriteLock scopedLock(*mScene);
2433 PxRigidDynamic* compound = GenerateCompound(*mPhysics, mScene, mMaterial, pos, PxQuat(PxIdentity), localPoses, geometries, false, density);
2434
2435 addPhysicsActors(compound);
2436 if(linVel)
2437 compound->setLinearVelocity(*linVel);
2438
2439 createRenderObjectsFromActor(compound, material);
2440
2441 return compound;
2442}
2443
2444PxRigidDynamic* PhysXSample::createTestCompound(const PxVec3& pos, PxU32 nbBoxes, float boxSize, float amplitude, const PxVec3* vel, RenderMaterial* material, PxReal density, bool makeSureVolumeEmpty)
2445{

Callers 1

createLegMethod · 0.45

Calls 3

GenerateCompoundFunction · 0.85
PxQuatClass · 0.50
setLinearVelocityMethod · 0.45

Tested by

no test coverage detected