For creating a cloth in PhysX, we first require an instance of cloth fabric to be created, which basically stores the cloth particle constraints and rest values. A cloth fabric in PhysX is a type of
PxClothFabric, and to create an instance of it, we need to call the
PxClothFabricCreate() function that requires three parameters. The first parameter is a type of
PxPhysics, it is the reference of the created PhysX SDK. The second parameter is a type of
, which basically is a descriptor class for cloth mesh. The third parameter is a type of
PxVec3 and it represents the normalized vector specifying the direction of gravity. Here, we need to fill all the description of
PxClothMeshDesc that contains the information ...