Ejemplo n.º 1
0
//-------------------------------------------------------------------------------------------------
bool sdPhysXCookUtility::CookClothMesh(const NxClothMeshDesc& kDesc, NxStream& kStream)
{
#ifdef COOKING_INTERFACE
	return ms_pkCooking->NxCookClothMesh(kDesc, kStream);
#else
	return NxCookClothMesh(kDesc, kStream);
#endif
}
Ejemplo n.º 2
0
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
}
Ejemplo n.º 3
0
// -----------------------------------------------------------------------
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;
}
Ejemplo n.º 4
0
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;
}