MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / createMaterial

Method createMaterial

deps/physx/physx/source/physx/src/NpFactory.cpp:433–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

431///////////////////////////////////////////////////////////////////////////////
432
433PxMaterial* NpFactory::createMaterial(PxReal staticFriction, PxReal dynamicFriction, PxReal restitution)
434{
435 PX_CHECK_AND_RETURN_NULL(dynamicFriction >= 0.0f, "createMaterial: dynamicFriction must be >= 0.");
436 PX_CHECK_AND_RETURN_NULL(staticFriction >= 0.0f, "createMaterial: staticFriction must be >= 0.");
437 PX_CHECK_AND_RETURN_NULL(restitution >= 0.0f || restitution <= 1.0f, "createMaterial: restitution must be between 0 and 1.");
438
439 Sc::MaterialData materialData;
440 materialData.staticFriction = staticFriction;
441 materialData.dynamicFriction = dynamicFriction;
442 materialData.restitution = restitution;
443
444 NpMaterial* npMaterial;
445 {
446 Ps::Mutex::ScopedLock lock(mMaterialPoolLock);
447 npMaterial = mMaterialPool.construct(materialData);
448 }
449 return npMaterial;
450}
451
452void NpFactory::releaseMaterialToPool(NpMaterial& material)
453{

Callers 15

PhysicsMaterialMethod · 0.45
createPhysicsAndSceneFunction · 0.45
initPhysicsFunction · 0.45
initPhysicsFunction · 0.45
createCollectionsFunction · 0.45
generateExampleFilesFunction · 0.45
initPhysicsFunction · 0.45
initPhysicsFunction · 0.45
initPhysicsFunction · 0.45
initPhysicsFunction · 0.45
initPhysicsFunction · 0.45
initPhysicsFunction · 0.45

Calls 1

constructMethod · 0.45

Tested by

no test coverage detected