//------------------------------------------------------------------------------------------------- bool sdPhysXCookUtility::CookClothMesh(const NxClothMeshDesc& kDesc, NxStream& kStream) { #ifdef COOKING_INTERFACE return ms_pkCooking->NxCookClothMesh(kDesc, kStream); #else return NxCookClothMesh(kDesc, kStream); #endif }
bool CookClothMesh(const NxClothMeshDesc& desc, NxStream& stream) { #ifdef COOKING_INTERFACE hasCookingLibrary(); if ( !gCooking ) return false; return gCooking->NxCookClothMesh(desc,stream); #else return NxCookClothMesh(desc,stream); #endif }
// ----------------------------------------------------------------------- bool MyCloth::cookMesh(NxClothMeshDesc& desc) { // we cook the mesh on the fly through a memory stream // we could also use a file stream and pre-cook the mesh MemoryWriteBuffer wb; if (!NxCookClothMesh(desc, wb)) return false; MemoryReadBuffer rb(wb.data); mClothMesh = mScene->getPhysicsSDK().createClothMesh(rb); return true; }
bool PhysXCloth::cookMesh(NxClothMeshDesc &desc) { assert(desc.isValid()); MemoryWriteBuffer wb; if (!NxCookClothMesh(desc, wb)) return false; MemoryReadBuffer rb(wb.data); mClothMesh = mScene->getPhysicsSDK().createClothMesh(rb); return true; }