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

Function setMaterials

physx/source/physx/src/PvdMetaDataPvdBinding.cpp:953–964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

951}
952
953static void setMaterials(PvdMetaDataBinding& metaBing, PvdDataStream& inStream, const PxShape& inObj, PsPvd* pvd, PvdMetaDataBindingData* mBindingData)
954{
955 PxU32 numMaterials = inObj.getNbMaterials();
956 PxMaterial** materialPtr = mBindingData->allocateTemp<PxMaterial*>(numMaterials);
957 inObj.getMaterials(materialPtr, numMaterials);
958 for(PxU32 idx = 0; idx < numMaterials; ++idx)
959 {
960 if(pvd->registerObject(materialPtr[idx]))
961 metaBing.createInstance(inStream, *materialPtr[idx], PxGetPhysics());
962 inStream.pushBackObjectRef(&inObj, "Materials", materialPtr[idx]);
963 }
964}
965
966void PvdMetaDataBinding::createInstance(PvdDataStream& inStream, const PxShape& inObj, const PxRigidActor& owner, const PxPhysics& ownerPhysics, PsPvd* pvd)
967{

Callers 2

createInstanceMethod · 0.85
updateMaterialsMethod · 0.85

Calls 5

registerObjectMethod · 0.80
pushBackObjectRefMethod · 0.80
getNbMaterialsMethod · 0.45
getMaterialsMethod · 0.45
createInstanceMethod · 0.45

Tested by

no test coverage detected