O'Reilly logo

Learning Physics Modeling with PhysX by Krishna Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a cloth fabric

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 PxClothMeshDesc , 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required